Skip to main content

Payload: Order update

Event Description#

Orders are updated with the executionReport event.

Execution types:

  • NEW - The order has been accepted into the engine.
  • CANCELED - The order has been canceled by the user.
  • REPLACED (currently unused)
  • REJECTED - The order has been rejected and was not processed (This message appears only with Cancel Replace Orders wherein the new order placement is rejected but the request to cancel request succeeds.)
  • TRADE - Part of the order or all of the order's quantity has filled.
  • EXPIRED - The order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance).
  • TRADE_PREVENTION - The order has expired due to STP trigger.

Check the Public API Definitions for more relevant enum definitions.

These are fields that appear in the payload only if certain conditions are met.

FieldNameDescriptionExamples
dTrailing DeltaAppears only for trailing stop orders."d": 4
DTrailing Time"D": 1668680518494
jStrategy IdAppears only if the strategyId parameter was provided upon order placement."j": 1
JStrategy TypeAppears only if the strategyType parameter was provided upon order placement."J": 1000000
vPrevented Match IdAppears only for orders that expired due to STP."v": 3
APrevented Quantity"A":"3.000000"
BLast Prevented Quantity"B":"3.000000"
uTrade Group Id"u":1
UCounter Order Id"U":37
CsCounter Symbol"Cs": "BTCUSDT"
plPrevented Execution Quantity"pl":"2.123456"
pLPrevented Execution Price"pL":"0.10000001"
pYPrevented Execution Quote Qty"pY":"0.21234562"
WWorking TimeAppears when the order is working on the book"W": 1668683798379
bMatch TypeAppears for orders that have allocations"b":"ONE_PARTY_TRADE_REPORT"
aAllocation ID"a":1234
kWorking FloorAppears for orders that could potentially have allocations"k":"SOR"
uSUsedSorAppears for orders that used SOR"uS":true

Event Name#

executionReport

Response Example#

Payload:

{  "e": "executionReport",        // Event type  "E": 1499405658658,            // Event time  "s": "ETHBTC",                 // Symbol  "c": "mUvoqJxFIILMdfAW5iGSOW", // Client order ID  "S": "BUY",                    // Side  "o": "LIMIT",                  // Order type  "f": "GTC",                    // Time in force  "q": "1.00000000",             // Order quantity  "p": "0.10264410",             // Order price  "P": "0.00000000",             // Stop price  "F": "0.00000000",             // Iceberg quantity  "g": -1,                       // OrderListId  "C": "",                       // Original client order ID; This is the ID of the order being canceled  "x": "NEW",                    // Current execution type  "X": "NEW",                    // Current order status  "r": "NONE",                   // Order reject reason; will be an error code.  "i": 4293153,                  // Order ID  "l": "0.00000000",             // Last executed quantity  "z": "0.00000000",             // Cumulative filled quantity  "L": "0.00000000",             // Last executed price  "n": "0",                      // Commission amount  "N": null,                     // Commission asset  "T": 1499405658657,            // Transaction time  "t": -1,                       // Trade ID  "I": 8641984,                  // Ignore  "w": true,                     // Is the order on the book?  "m": false,                    // Is this trade the maker side?  "M": false,                    // Ignore  "O": 1499405658657,            // Order creation time  "Z": "0.00000000",             // Cumulative quote asset transacted quantity  "Y": "0.00000000",             // Last quote asset transacted quantity (i.e. lastPrice * lastQty)  "Q": "0.00000000",             // Quote Order Quantity  "W": 1499405658657,            // Working Time; This is only visible if the order has been placed on the book.  "V": "NONE"                    // selfTradePreventionMode}

If the order is an OCO, an event will be displayed named ListStatus in addition to the executionReport event.

{  "e": "listStatus",                //Event Type  "E": 1564035303637,               //Event Time  "s": "ETHBTC",                    //Symbol  "g": 2,                           //OrderListId  "c": "OCO",                       //Contingency Type  "l": "EXEC_STARTED",              //List Status Type  "L": "EXECUTING",                 //List Order Status  "r": "NONE",                      //List Reject Reason  "C": "F4QN4G8DlFATFlIUQ0cjdD",    //List Client Order ID  "T": 1564035303625,               //Transaction Time  "O": [                            //An array of objects    {      "s": "ETHBTC",                //Symbol      "i": 17,                      // orderId      "c": "AJYsMjErWJesZvqlJCTUgL" //ClientOrderId    },    {      "s": "ETHBTC",      "i": 18,      "c": "bfYPSQdLoqAJeNrOr9adzq"    }  ]}