Capital Markets Adapters 10.11 | Apama Capital Markets Adapters Documentation 10.11 | Morgan Stanley FX FIX Adapter | MSFX Ladder Pricing | Sample events
 
Sample events
Laddered pricing stream subscription and unsubscription requests

com.apama.marketdata.SubscribeDepth("MSFX-FIX", "MSFX_MD_Connection",
"GBP/USD",{"167":"FOR","63":"0"})
com.apama.marketdata.SubscribeDepth("MSFX-FIX", "MSFX_MD_Connection",
"EUR/USD",{"167":"FOR","63":"0"})

com.apama.marketdata.UnsubscribeDepth("MSFX-FIX", "MSFX_MD_Connection",
"GBP/USD",{"167":"FOR","63":"0"})
com.apama.marketdata.UnsubscribeDepth("MSFX-FIX", "MSFX_MD_Connection",
"EUR/USD",{"167":"FOR","63":"0"})

NewOrder events for the Laddered pricing stream

com.apama.oms.NewOrder("0","EUR/USD",0,"BUY","FOREX - PREVIOUSLY QUOTED",1000000,
"MSFX-FIX","","","MSFX_TD_Connection","","",{"117":"d19a1","131":"20110916-16:09:35.2",
"15":"EUR","167":"FOR","18":"W","59":"4","Account":"TEST1"})
com.apama.oms.NewOrder("2","GBP/USD",0,"BUY","FOREX - PREVIOUSLY QUOTED",4000000,
"MSFX-FIX","","","MSFX_TD_Connection","","",{"117":"d21a3","131":"20110916-16:09:35.1",
"15":"GBP","167":"FOR","18":"W","59":"4","Account":"TEST1"} )
where,
*Tag 131 (MDReqID): MDReqID used to subscribe to the particular ladder stream, users have to set "SubscriptionManager.ForwardMDReqID":"true" to get the MDReqID in the Depth updates
*Tag 117: QuoteID: Should be the value of QuoteEntryID picked up from the Depth update
*Tag 18: W/X: The message from which this QuoteID is picked up (W=Snapshot, X=Incremental)
Sample depth update

com.apama.marketdata.Depth("GBP/USD",
[1.5815,1.58148,1.58123,1.5811,1.5811],
[1.58162,1.58164,1.58189,1.58202,1.58202],
[1.58156,1.58156,1.58156,1.58156,1.58156],
[1000000,1000000,2000000,3000000,3000000],
[1000000,1000000,2000000,3000000,3000000],
{"167":"FOR","264":"0","35":"W","52":"20110916-10:39:39.400",
"60":"20110916-10:39:39.400","63":"0",
"ASK1_1023":"1","ASK1_1070":"1","ASK1_FutSettDate":"20110920",
"ASK1_QuoteEntryID":"d1a1","ASK1_SettlmntTyp":"0",
"ASK2_1023":"2","ASK2_1070":"1","ASK2_FutSettDate":"20110920",
"ASK2_QuoteEntryID":"d1a2","ASK2_SettlmntTyp":"0",
"ASK3_1023":"3","ASK3_1070":"1","ASK3_FutSettDate":"20110920",
"ASK3_QuoteEntryID":"d1a3","ASK3_SettlmntTyp":"0",
"ASK4_1023":"4","ASK4_1070":"1","ASK4_FutSettDate":"20110920",
"ASK4_QuoteEntryID":"d1a4","ASK4_SettlmntTyp":"0",
"ASK5_1023":"5","ASK5_1070":"1","ASK5_FutSettDate":"20110920",
"ASK5_QuoteEntryID":"d1a5","ASK5_SettlmntTyp":"0",
"BID1_1023":"1","BID1_1070":"1","BID1_FutSettDate":"20110920",
"BID1_QuoteEntryID":"d1b1","BID1_SettlmntTyp":"0",
"BID2_1023":"2","BID2_1070":"1","BID2_FutSettDate":"20110920",
"BID2_QuoteEntryID":"d1b2","BID2_SettlmntTyp":"0",
"BID3_1023":"3","BID3_1070":"1","BID3_FutSettDate":"20110920",
"BID3_QuoteEntryID":"d1b3","BID3_SettlmntTyp":"0",
"BID4_1023":"4","BID4_1070":"1","BID4_FutSettDate":"20110920"
,"BID4_QuoteEntryID":"d1b4","BID4_SettlmntTyp":"0",
"BID5_1023":"5","BID5_1070":"1","BID5_FutSettDate":"20110920",
"BID5_QuoteEntryID":"d1b5","BID5_SettlmntTyp":"0",
"MDReqID":"20010909-07:16:40.1","Market":"MSFX_MD_Connection",
"SERVICE_NAME":"MSFX-FIX"})
where,
ASK1_1070, ASK2_1070 ..., BID1_1070, BID2_1070 ... represent the MDQuoteType for each corresponding bid/offer entries. The possible values for MDQuotType (1070) are:
*1: Implies a Tradable Quote
*2: Implies a Indicative Quote
If this field is omitted, it defaults to 1 (Tradable Quote) and ASK1_QuoteEntryID .... BID1_QuoteEntryID .... represent the QuoteID for the corresponding bid/offer entry. users have to use this value as the value of Tag 117 when generating the New Orders.