Apama FIX Adapter Documentation 10.0 : Symbol Normalization : Requesting the security definition for multi-leg securities
Requesting the security definition for multi-leg securities
Following are the request/response events for getting the security definition:
package com.apama.fix

event InstrumentDataRequest {
string marketId;
string key;
string symbol;
dictionary <string,string> extraParams;
sequence<string> requiredParams;
}

event InstrumentDataResponse {
string marketId;
string key;
boolean success;
string errorMessage;
dictionary <string,string> parameters;
}
Depth/Tick Subscription Errors
When the session configuration parameter SubscriptionManager.ReturnZeroPricesOnError is set to true, the adapter will send depth/tick events in place of DepthSubscriptionError/TickSubscriptionError. The extraparam of this depth/tick event will have the following values:
*_ERROR. The error message (corresponds to DepthSubscriptionError.status)
*_FAULT. Flag to indicate whether an unsubscribe is necessary or not (corresponds to DepthSubscriptionError.fault)
Requesting required information
In the extraParams field of the InstrumentDataRequest, you can give the filtering information so that the matching security definitions are received as InstrumentDataResponse() for each matched security.
Example: To fetch the security definition for the multi-leg instrument whose leg information is as follows
309 : 217922 (tag 309 is UnderlyingSecurityID)
309 : 217951

com.apama.fix.InstrumentDataRequest
("MARKET_DATA","40","",{"167":"MLEG","207":"ICE_IPE","146":"
[{309:\"217922\"},{309:\"217951\"}]"},["55","48","207"])
This request will result in unique/multiple InstrumentDataResponse() events. If there are more than one security available with this legs information, then user gets multiple responses. In case of multiple responses the boolean flag "success" of response event is set to false.
Receiving multi-leg information as part of InstrumentDataResponse
The 'parameters' field of the InstrumentDataResponse() is populated based on the tag list mentioned in requiredParams field of the InstrumentDataRequest. The requiredParams sequence field now accepts repeating group as a string.
Example: To receive the repeating field tags 310 311 313, the request has to be
com.apama.fix.InstrumentDataRequest
("MARKET_DATA","40","",{"167":"MLEG","207":"ICE_IPE"},
["55","48","207","[146 310 311 313]"])
The response would be
com.apama.fix.InstrumentDataResponse
("MARKET_DATA","40",true,"",{"146":"[{\"310\":\"FUT\",\"311\":
\"IPE e-Brent\",\"313\":\"201103\"},
{\"310\":\"FUT\",\"311\":\"IPE e-Brent\",\"313\":\"201108\"}]",
"207":"ICE_IPE","48":"219924","55":"
IPE e-Brent","MAPPED_SYMBOL":"MLEG:ICE_IPE:_:ICE_IPE:217922:
FUT:201103-ICE_IPE:217951:FUT:201108"})
Note:  
Always mention the tags in requiredParams field of the InstrumentDataRequest(). The tags mentioned in this parameter are the out going tags in each request. The mapped symbol cache is formed against these tags as Mapped symbol.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback