Apama Capital Markets Adapters 10.2 | Apama Capital Markets Adapters Documentation 10.2 | Currenex FIX Adapter | Order management
 
Order management
Examples
//Limit: Buy Base
com.apama.oms.NewOrder("Currenex:1","EUR/USD",1.2899,"BUY","FOREX LIMIT",
40000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"xxx"})

//Market: Buy Base
com.apama.oms.NewOrder("Currenex:3","GBP/USD",0.0,"BUY","FOREX MARKET",
20000,"FIX","","","CURRENEX_TRADING","","",
{"15":"GBP","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"progress"})


//Stop Loss: Sell Terms - Stop Side (Bid)
com.apama.oms.NewOrder("Currenex:17","EUR/USD",0.0,"SELL","STOP MARKET",
5000000,"FIX","","","CURRENEX_TRADING","","",
{"15":"USD","7534":"1","99":"1.2653","460":"4","59":"1"})

//Stop Limit: Buy Base - Stop Side (Bid)
com.apama.oms.NewOrder("Currenex:17","EUR/USD",1.2670,"BUY","STOP LIMIT",
1000000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","7534":"1","99":"1.2650","460":"4","59":"1"})

//Trailing Stop Sell - Trail the Bid by 2 pips
com.apama.oms.NewOrder("Currenex:17","EUR/JPY",0.0,"SELL","TRAILING STOP",
30000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","7534":"1","7587":"0.02","460":"4","59":"1"})

//OCO: Leg 1 is Limit; Leg 2 is Stop
com.apama.oms.NewOrder("Currenex:26","EUR/USD",0.0,"BUY","LIMIT IF TOUCHED",
3000000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","7534":"1","59":"0","167":"FOR","460":"4","1":"xxx","7540":"1.0482",
"7541":"3","7542":"1.0482","7543":"1"})


//IFDOCO order for 2000000 EUR/USD
com.apama.oms.NewOrder("Currenex:32","EUR/USD",0.0,"BUY","BEST LIMIT IF TOUCHED",2000000,
"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","59":"0","167":"FOR","460":"4","1":"progress","7535":"3","7536":"2",
"7537":"1.10382","7539":"1","7569":"3","7570":"1.10382"})

//ICEBERG Order with hidden quantity. Tag 210 (MaxShow)
indicates quantity to be displayed. The Quantity field of NewOrder holds
the total quantity including the hidden amount.
com.apama.oms.NewOrder("Currenex:17", "EUR/USD",1.27378,"BUY","FOREX ICEBERG",500000,
"FIX","","", "CURRENEX_TRADING", "", "",
{"15":"EUR","59":"0","210":"200000","460":"4"})
Amending an order
//Limit order rate is modified
com.apama.oms.NewOrder("Currenex:11","EUR/USD",1.0378,"BUY","FOREX LIMIT",
500000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"xxx"})
com.apama.oms.AmendOrder("Currenex:11","FIX","EUR/USD",1.27374,"BUY","FOREX LIMIT",
500000,{"15":"EUR","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"xxx"})
Cancelling an order
com.apama.oms.NewOrder("Currenex:12","EUR/USD",1.0378,"BUY","FOREX LIMIT",
400000,"FIX","","","CURRENEX_TRADING","","",
{"15":"EUR","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"progress"})
com.apama.oms.CancelOrder("Currenex:12","FIX",
{"15":"EUR","460":"4","21":"1","60":"20141002-00:16:40","59":"1","1":"progress"})

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release