Capital Markets Adapters 10.7 | Apama Capital Markets Adapters Documentation 10.7 | HSBC FX FIX Adapter | Order placing
 
Order placing
Order should be place based on the latest depth received:

com.apama.marketdata.Depth("EUR/JPY",[103.084,103.083,103.082],
[103.105,103.106,103.108],[103.09450000000001,103.0945,103.095],
[1000000,3000000,7000000],[1000000,3000000,7000000],
{"35":"W","52":"20120213-08:46:16.370","9063":"SP","ASK1_9063":"SP",
"ASK1_MDEntryDate":"20120215",
"ASK1_QuoteEntryID":"1329122776023.1157442.P-1M",
"ASK2_9063":"SP","ASK2_MDEntryDate":"20120215",
"ASK2_QuoteEntryID":"1329122776023.1157442.P-3M",
"ASK3_9063":"SP","ASK3_MDEntryDate":"20120215",
"ASK3_QuoteEntryID":"1329122776023.1157442.P-7M",
"BID1_9063":"SP","BID1_MDEntryDate":"20120215",
"BID1_QuoteEntryID":"1329122776023.1157442.P-1M",
"BID2_9063":"SP","BID2_MDEntryDate":"20120215",
"BID2_QuoteEntryID":"1329122776023.1157442.P-3M",
"BID3_9063":"SP","BID3_MDEntryDate":"20120215",
"BID3_QuoteEntryID":"1329122776023.1157442.P-7M",
"HSBC.PFVbands":"1000000,3000000,7000000",
"Market":"HSBC-TEST","Quote":"Y",
"SERVICE_NAME":"HSBC-FIX"})
From the depth the following things need to be chosen:
*Price: based on order qty the price corresponding volume band should be chosen.
*QuoteId: Quote Id corresponding to the price must be chosen. It is of the form "ASK2_QuoteEntryID" (where 2 signifies the 2nd volume band).
For example,

com.apama.oms.NewOrder("HSBC-TEST:1","EUR/JPY",103.112,"BUY",
"FOREX - PREVIOUSLY QUOTED",1000000,"HSBC-FIX","","",
"HSBC-TEST","","",{"117":"1329122775918.1157412.P-1M",
"15":"EUR","59":"4","75":"20120202","9063":"SP"})
*Order with party information
Parties info should be provided in extraparams as: "Party0":"APAMA,D,3". Here PartyID(448)=APAMA, PartyIDSource(447)=D, PartyRole(452)="3"
For example,

com.apama.oms.NewOrder("HSBC-TEST:2","EUR/JPY",103.126,"BUY",
"FOREX - PREVIOUSLY QUOTED",1000000,"HSBC-FIX","","",
"HSBC-TEST","","",{"117":"1329123422020.1167519.P-1M",
"15":"EUR","59":"4","75":"20120202",
"9063":"SP","Party0":"APAMA,D,3"})