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 Name | Format | Req'd | Comments | |
---|---|---|---|---|
MsgType | String | ✓ | AB = NewOrderMultileg | |
MsgSeqNum | SeqNum | ✓ | User generated incremental number to allow receiver to identify possible message gaps | |
SendingTime | UTCTimestamp | ✓ | Time of sending this message | |
ClOrdID | String | ✓ | User generated, must ne unique | |
ClOrdLinkID | String | Allows 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. | ||
AllocID | String | Used to assign an identifier to the block of individual pre-allocations > FUTURE FUNCTION, NOT YET IMPLEMENTED < | ||
ExecInst | Char | G = All-or-None. Only supported value | ||
MinQty | Qty | Useful to avoid tiny partial fills, Instead of All or None | ||
MatchIncrement | Qty | In combination to MinQty to avoid uneconomicaly small executions | ||
Side | Char | ✓ | Identifies 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 | ✓ | |||
> | Symbol | String | ✓ | BTC/USD-ID-R |
<LegOrdGrp> Component block | Repeating group | |||
<InstrumentLeg> Repeating block | Must be provided if Number of legs > 0 | |||
>> | LegSymbol | String | BTC/USD | |
>> | LegSide | Char | Please populate this field to disambiguate Order direction 1 = Buy 2 = Sell | |
> | LegAllocID | String | User generated unique ID | |
<LegPreAllocGrp> Repeating block | ||||
>> | LegAllocAccount | String | E.g. Binance-My26, pre-agreed and whitelisted account aliases only > FUTURE FUNCTION, NOT YET IMPLEMENTED < | |
>> | LegIndividualAllocID | String | Reserved for future use if alloc is to be split | |
>> | LegAllocQty | Qty | Reserved for future use if alloc is to be split | |
>> | LegAllocSettlCurrency | Currency | Reserved for future use if multiple allocations. Useful to indicate USD Stablecoin of preference | |
>> | LegSettlType | Char | For Intra-day the Near_Leg is 1 = Cash, the Far_Leg is 0 = Spot (5pm NY) 0 = Regular / Spot 1 = Cash 2 = Next Day | |
>> | LegSettlDate | LocalMktDate | For dates not covered by LegSettlType | |
>> | LegSettlCurrency | Currency | Use to indicate replacement of USD with preffered Stablecoin | |
TransactTime | UTCTimestamp | ✓ | User side Order initiation timestamp | |
<OrderQtyData> Repeating block | required, if ClOrdLinkID is not filled disabled, if ClOrdLinkID is filled | |||
> | OrderQty | Qty | E.g. 150, always in Instrument base | |
> | OrdType | Char | 2 = Limit, only supported value | |
PriceType | Int | 6 = Spread | ||
Price | Price | ✓ | 3.22 | |
TimeInForce | Char | Supported 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) | ||
ExpireDate | LocalMktDate | In combination with GTD TimeInForce | ||
ExpireTime | UTCTimestamp | In combination with GTD TimeInForce | ||
Text | String | Free form field for non essential information | ||
SettlCurrency | String | ✓ |
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}