AccountingTrade True Rebook

How It Works

Tags from EagleML message are compared with tags from database for the trade with same originalTradeTicketNumber:

  • If at least one tag is different, then trade in database will be canceled by using cancel panel and then new trade will be loaded with data from EagleML message

  • If all tags are same, then load will be skipped, and record will be ignored in Message Center

How to Activate

There are two ways to activate Rebook logic for AccountingTrade:

  1. Use allowAutoRebookFlag element in AccountingTrade EagleML message to activate Rebook logic only for this message:

    <EagleML xmlns="http://www.eagleinvsys.com/2011/EagleML-2-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:SchemaLocation="http://www.eagleinvsys.com/2011/EagleML-2-0 eagleml-ext-2-0.xsd" xsi:type="AccountingTransactionMessage"> <accountingTransaction> <header> <objectType>AccountingTrade</objectType> </header> <accountingTrade> [...] <allowAutoRebookFlag>Y</allowAutoRebookFlag> [...] </accountingTrade> </accountingTransaction> </EagleML>
  2. Use global option W_ACCTTRADE_ALLOW_AUTOREBOOK that can be set in w_config_custom.inc file to activate Rebook logic for all AccountingTrade messages:

    <CODE> :W_ACCTTRADE_ALLOW_AUTOREBOOK: := 'Y'; </CODE>

Supported buySellIndicators

The next set of buySellIndicators supports Rebook logic: BUY, SELL, BUYCVR, SHORTSELL, TRADEFWD, OPENSWAP, CLOSESWAP, DEL, REC, WROFF.

Tags Compared in Rebook logic

Common Trades (not Forward)

Element

Tag

EagleML Xpath

Element

Tag

EagleML Xpath

tradeDate

35

EagleML/accountingTransaction/accountingTrade/tradeDate

settlementDate

37

EagleML/accountingTransaction/accountingTrade/settlementDate

sharesParQuantity

40

EagleML/accountingTransaction/accountingTrade/sharesParQuantity

price

45

EagleML/accountingTransaction/accountingTrade/price

commission

47

EagleML/accountingTransaction/accountingTrade/commission

secFee

48

EagleML/accountingTransaction/accountingTrade/secFee

taxAmount

46

EagleML/accountingTransaction/accountingTrade/taxAmount

stampDutyTax

51

EagleML/accountingTransaction/accountingTrade/stampDutyTax

otherFee

3752

EagleML/accountingTransaction/accountingTrade/otherFee

clearingBrokerCode

1237

EagleML/accountingTransaction/accountingTrade/clearingBrokerCode

tradedInterest

49

EagleML/accountingTransaction/accountingTrade/tradedInterest

buySellIndicator

55

EagleML/accountingTransaction/accountingTrade/buySellIndicator

brokerCode

88

EagleML/accountingTransaction/accountingTrade/brokerCode

principal

165

EagleML/accountingTransaction/accountingTrade/principal

settlementCurrency

63

EagleML/accountingTransaction/accountingTrade/settlementCurrency

currentFactor

91

EagleML/accountingTransaction/accountingTrade/currentFactor

originalFace

41

EagleML/accountingTransaction/accountingTrade/originalFace

NOTE: Tags 91 and 41 are compared only when Sink Flag (tag 1780) is set to Y on the security master file.

Forward Trades

Element

Tag

EagleML Xpath

Element

Tag

EagleML Xpath

tradeDate

35

EagleML/accountingTransaction/accountingTrade/tradeDate

buyQuantity

316

EagleML/accountingTransaction/accountingTrade/forward/buyQuantity

sellQuantity

366

EagleML/accountingTransaction/accountingTrade/forward/sellQuantity

commission

47

EagleML/accountingTransaction/accountingTrade/commission

otherFee

3752

EagleML/accountingTransaction/accountingTrade/otherFee

otherFeeSettlementDate

9357

EagleML/accountingTransaction/accountingTrade/otherFeeSettlementDate

buySellIndicator

55

EagleML/accountingTransaction/accountingTrade/buySellIndicator

brokerCode

88

EagleML/accountingTransaction/accountingTrade/brokerCode

settlementCurrency

63

EagleML/accountingTransaction/accountingTrade/settlementCurrency