Quote subscription or unsubscription
Request For Quotes (Spots)
#Request for base currency: EUR/USD Buy EUR 101,000 Spot
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"EUR","38":"101000","64":"Spot","54":"1"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"EUR","38":"101000","64":"Spot","54":"1"})
#Request for 2-way Base currency: GBP/USD 2-way GBP 103,000 Spot
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "GBP/USD",
{"Quote":"Y","303":"102","15":"GBP","38":"103000","64":"Spot"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "GBP/USD",
{"Quote":"Y","303":"102","15":"GBP","38":"103000","64":"Spot"})
#Request for term currency: USD/CAD Sell CAD 105,000 Spot
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "USD/CAD",
{"Quote":"Y","303":"102","15":"CAD","38":"105000","64":"Spot","54":"2"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "USD/CAD",
{"Quote":"Y","303":"102","15":"CAD","38":"105000","64":"Spot","54":"2"})
Request For Quotes (Forwards)
#Request for base currency: EUR/USD Buy EUR 201,000 TOD
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"EUR","38":"201000","64":"Today","54":"1"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"EUR","38":"201000","64":"Today","54":"1"})
#Request for 2-way term currency: EUR/JPY 2-way JPY 204,000 1M
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/JPG",
{"Quote":"Y","303":"102","15":"JPG","38":"204000","64":"1M"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/JPG",
{"Quote":"Y","303":"102","15":"JPG","38":"204000","64":"1M"})
#Requests for term currency – Broken date (3m+3d): EUR/USD Buy USD 205,000 3M+3 days
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"USD","38":"205000","64":"20100430","54":"1"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"102","15":"USD","38":"205000","64":"20100430","54":"1"})
Request For Stream (Spots)
#Requests one-way stream base currency: EUR/USD Buy EUR 401,000 Spot
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"103","15":"EUR","38":"401000","64":"Spot","54":"1"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/USD",
{"Quote":"Y","303":"103","15":"EUR","38":"401000","64":"Spot","54":"1"})
Request For Stream (Forwards)
#Requests 2-way stream term currency: EUR/JPY 2-way JPY 504,000 1M
com.apama.marketdata.SubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/JPY",
{"Quote":"Y","303":"103","15":"JPY","38":"504000","64":"1M"})
com.apama.marketdata.UnsubscribeDepth("BOA-FIX", "BOA_MARKET_DATA", "EUR/JPY",
{"Quote":"Y","303":"103","15":"JPY","38":"504000","64":"1M"})
NewOrders
Previously-quoted orders:
QuoteID (Tag 117) must be copied from the Quote (reported to the application as com.apama.marketdata.Depth) to NewOrder.
HandlInst(tag 21) must be set to "1" in the extraparams of NewOrder.
Orders can be placed in the base or term currency. The appropriate price must be chosen from Depth when placing an order.
For example,
com.apama.oms.NewOrder("BOA:1","EUR/USD",1.40065,"BUY","PREVIOUSLY QUOTED",
101000,"BOA-FIX","","","BOA_TRADING","","",
{"117":"te-1-4-21515252-22:sm-3:12981","15":"EUR","21":"1"})
Market orders:
HandlInst(tag 21) must be set to "1" in the extraparams of NewOrder.
Orders can be placed in the base or term currency. The Price will be set to 0 even if provided.
For example,
com.apama.oms.NewOrder("BOA:1","EUR/USD",0,"BUY","FOREX MARKET",6,
"BOA-FIX","","","BOA_TRADING","","", {"15":"EUR","21":"1","40":"C","6215":"Spot"})