Capital Markets Adapters 10.7 | Apama Capital Markets Adapters Documentation 10.7 | Reuters MAPI Adapter | Order management | Trade capture report
 
Trade capture report
In MAPI, you receive trade capture report (TCR) for every execution report (ER) which is a partial fill or fill. These reports carry 'MatchStatus' which says if the trade is 'Confirmed' or 'Unconfirmed'. If it is unconfirmed, then the client needs to contact Reuters support. In the monitor, on receiving a TCR, the com.apama.fix,mapi.TradeCaptureReportis routed if 'MatchStatus' is 'unconfirmed'. Then a warning is logged saying client needs to contact Reuters support.
How does our adapter/monitor handle TCR and ER?
In MAPI support monitor, on receiving an execution report with a partial fill or fill, a listener is opened for corresponding TCR with same matching Id. This execution report is sent to base FIX Ordermanager to process it. When you get a TCR, it is converted to com.apama.fix.mapi.TradeCaptureReport and is routed out. If you don’t receive a TCR within 120 seconds and the order is complete, the thread is deleted. If by any chance, TCR arrives after that, it will be logged in the system log at WARN level. com.apama.fix.mapi.TradeCaptureReport will be routed without OrderId.
Execution report and TCR carry same information except that TCR carries Root party and settlement information. The TCR can be delayed by up to 60 seconds. The execution report is sent quickly though so you are aware of the match and not adversely affected by the delay. This means the execution reports and TCRs could arrive in various different orders and you should not rely on any particular sequence.
In a scenario, you have ER’s arriving first followed by TCRs. Use __APAMA_ORDER_STATE extra parameter to handle order completion. On receiving final execution report, MAPI support monitor will add an extra parameter ‘__APAMA_ORDER_STATE’ :’final’
This parameter says that the order has reached done state but still need to received TCRs which carry settlement details. On receiving all TCRs, support monitor will route an order update with __APAMA_ORDER_STATE as settled and kill its thread.
In MAPI, an OrderUpdate with ‘__APAMA_ORDER_STATE’:'settled' will be the last after which order can be considered done.

event TradeCaptureReport {
string orderId;
string TRANSPORT;
string TradeID; ->Unique trade token assgined to order
string TradeTransactionType; -> It will 0
string MatchStatus; -> It can be 0(confirmed) or 1(unconfirmed)
string TradeReportType; -> It will be 2
string TrdType; -> It will be 54 (OTC Trade)
string TrdMatchID; -> Match token allocated by Matching engine
string Symbol;
float OrderQty;
float LastQty;
float LastPx;
string TradeDate; -> Date of Trade
string TransactTime; -> Time of the trade event associated with this TCR
string Side;
string Account;
boolean AggressorIndicator;
string OrderID;
string ClOrdID;
sequence <com.apama.fix.mapi.RootPartyIds>
NoRootPartyIds; -> Party information
sequence <com.apama.fix.mapi.TradeCapture_LimitAmt>
NoLimitAmts; -> LimitAmount information
sequence <com.apama.fix.mapi.TradeCaptureReport_SettlDetails>
NoSettlDetails; -> Settlement information
dictionary<string,string> extraParams;
}
Example:

com.apama.fix.mapi.TradeCaptureReport("1","MAPI_TRADING","136793964","0","0","2",
"54","142568747","eur/usd",6,6,1.2986,"20121129","20121129-10:30:48.912",

[com.apama.fix.TradeCaptureReport_RootPartyIds("BANK GENEVA LN","C",13,
[com.apama.fix.TradeCaptureReport_RootPartySubIds("NNLO",25,{}),
com.apama.fix.TradeCaptureReport_RootPartySubIds("USRF",2,{})],{}),
com.apama.fix.TradeCaptureReport_RootPartyIds("BANK GENEVA AB","C",56,
[com.apama.fix.TradeCaptureReport_RootPartySubIds("NNAB",25,{})],{})],

[com.apama.fix.mapi.MAPI_TradeCaptureReport_Side("2","RBCL",true,"88331","1:0:0",
[com.apama.fix.mapi.MAPI_TradeCapture_LimitAmt(0,0,-1,"USD",{})],
[com.apama.fix.mapi.MAPI_TradeCaptureReport_SettlDetails("5",
com.apama.fix.mapi.MAPI_TradeCaptureReport_SettlPartyIds
("No Instructions Specified","C",27,[],{})],{}),
com.apama.fix.mapi.MAPI_TradeCaptureReport_SettlDetails("4",
[com.apama.fix.mapi.MAPI_TradeCaptureReport_SettlPartyIds
("RBS London","C",27,
[com.apama.fix.mapi.MAPI_TradeCaptureReport_SettlPartySubIds
("123456",16,{})],{})],{})],{})],{"1056":"7791600","120":"USD",
"15":"EUR","150":"F","167":"FXSPOT","17":"09388ccc-246d-0000-0005-002481817554",
"231":"1000000","325":"Y","35":"AE","423":"20",
"52":"20121129-10:30:48.919","64":"20121204","854":"1"})