New Order Multileg

Repo Pricing Method Repo Orders on REPO/Lend are placed using the Spread PriceType: sum of the Far_Leg Price minus the Near_Leg Price.

· If Side = F, this means Lending the Base Asset (a.k.a. "buying" the Repo, very confusing at first). The Far_Leg direction is BUY; the Near_Leg direction is SELL.
· If Side = G, this means Borrowing the Base Asset (a.k.a "selling" the Repo). The Far_Leg direction is SELL; the Near_Leg is BUY

=> The Repo "price" is always that of the Far_Leg minus that of the Near_Leg.

Execution Reports The simple ExecutionReport message (MsgType=8) is send by XCDE to provide Repo Order statuses and fills.

Message format

Field NameFormatReq'dComments
MsgTypeStringAB = NewOrderMultileg
MsgSeqNumSeqNumUser generated incremental number to allow receiver to identify possible message gaps
SendingTimeUTCTimestampTime of sending this message
ClOrdIDStringUser generated, must ne unique
ClOrdLinkIDStringAllows to tie together groups of orders, e.g the OCAO (One Cancells ALL the Other) in which trades resulting from these orders would be cancelled pro-rata of the execution.
AllocIDStringUsed to assign an identifier to the block of individual pre-allocations
> FUTURE FUNCTION, NOT YET IMPLEMENTED <
ExecInstCharG = All-or-None. Only supported value
MinQtyQtyUseful to avoid tiny partial fills, Instead of All or None
MatchIncrementQtyIn combination to MinQty to avoid uneconomicaly small executions
SideCharIdentifies Near_Leg direction for Base currency.
F = Lend (a.k.a repo Bid price)
G = Borrow (a.k.a. Repo Offer price)
<Instrument> Component block
SymbolStringBTC/USD-ID-R
<LegOrdGrp> Component blockRepeating group
<InstrumentLeg> Repeating blockMust be provided if Number of legs > 0
>> LegSymbolStringBTC/USD
>> LegSideCharPlease populate this field to disambiguate Order direction
1 = Buy
2 = Sell
LegAllocIDStringUser generated unique ID
<LegPreAllocGrp> Repeating block
>> LegAllocAccountStringE.g. Binance-My26, pre-agreed and whitelisted account aliases only
> FUTURE FUNCTION, NOT YET IMPLEMENTED <
>> LegIndividualAllocIDStringReserved for future use if alloc is to be split
>> LegAllocQtyQtyReserved for future use if alloc is to be split
>> LegAllocSettlCurrencyCurrencyReserved for future use if multiple allocations. Useful to indicate USD Stablecoin of preference
>> LegSettlTypeCharFor Intra-day the Near_Leg is 1 = Cash, the Far_Leg is 0 = Spot (5pm NY)
0 = Regular / Spot
1 = Cash
2 = Next Day
>> LegSettlDateLocalMktDateFor dates not covered by LegSettlType
>> LegSettlCurrencyCurrencyUse to indicate replacement of USD with preffered Stablecoin
TransactTimeUTCTimestampUser side Order initiation timestamp
<OrderQtyData> Repeating blockrequired, if ClOrdLinkID is not filled disabled, if ClOrdLinkID is filled
OrderQtyQtyE.g. 150, always in Instrument base
OrdTypeChar2 = Limit, only supported value
PriceTypeInt6 = Spread
PricePrice3.22
TimeInForceCharSupported values: (only GTC supported for now)
0 =Day (or session)
1 =Good Till Cancel (GTC)
3 =Immediate Or Cancel (IOC)
4 =Fill Or Kill (FOK)
6 =Good Till Date (GTD)
ExpireDateLocalMktDateIn combination with GTD TimeInForce
ExpireTimeUTCTimestampIn combination with GTD TimeInForce
TextStringFree form field for non essential information
SettlCurrencyString
Message example:
 1MsgType: AB
 2MsgSeqNum: 872763456750
 3SendingTime: 20220906-23:57:22.722
 4ClOrdID: jsd663524k-753
 5MinQty: 10
 6Side: F
 7Symbol: BTC/USD-ON-R
 8LegOrdGrp
 9InstrumentLeg
10  LegSymbol: BTC/USD-SPOT
11  LegSide: 2
12  LegSettlType: 0
13InstrumentLeg
14  LegSymbol: BTC/USD-SPOT
15  LegSide: 1
16  LegSettlType: 2
17TransactTime: 20220906-23:57:22.458
18OrderQtyData
19  OrderQty: 200
20  OrdType: 2
21PriceType: 6
22Price: 3.15
23TimeInForce: 1
24Text: New Lend BTC Order (borrow USD)
 1{
 2  "Header": {
 3    "MsgType": "AB",
 4    "MsgSeqNum": "872763456750",
 5    "SenderCompID": "SENDER",
 6    "TargetCompID": "TARGET",
 7    "SendingTime": "20220906-23:57:22.722"
 8  },
 9  "ClOrdID": "jsd663524k-753",
10  "MinQty": "10",
11  "Side": "F",
12  "Instrument": {
13    "Symbol": "BTC/USD-ON-R"
14  },
15  "LegOrdGrp": {
16    "InstrumentLeg": [
17      {
18        "LegSymbol": "BTC/USD-SPOT",
19        "LegSide": "2",
20        "LegSettlType": "0"
21      },
22      {
23        "LegSymbol": "BTC/USD-SPOT",
24        "LegSide": "1",
25        "LegSettlType": "2"
26      }
27    ]
28  },
29  "TransactTime": "20220906-23:57:22.458",
30  "OrderQtyData": [
31    {
32      "OrderQty": "200",
33      "OrdType": "2"
34    }
35  ],
36  "PriceType": "6",
37  "Price": "3.15",
38  "TimeInForce": "1",
39  "Text": "New Lend BTC Order (borrow USD)"
40}