order#
WS wss://api.pro.anboto.xyz/api/v2/ws
Channel for subscribing to order updates for a specific exchange
Authenticate the connection with a listenKey — see WebSocket.
Subscribe message#
topic string requiredorderexchange string requiredTrading exchange, case-insensitive
method enum requiredsubscribe / unsubscribeUpdate message fields#
orderStatus OrderStatusObjOrder Status
orderStatus.source stringComponent sending the status
orderStatus.orderId int64Anboto's order Id
orderStatus.clientOrderId stringClient referenced order Id
orderStatus.extId stringOrder Id from exchange
orderStatus.exchangeId integerExchange Id
orderStatus.status enumOrder Status —
PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values)orderStatus.createdAt integerUnix timestamp of this status change in milliseconds
orderStatus.filledQuantity integerfilled quantity of the order
orderStatus.leavesQuantity integerleave quantity of the order
orderStatus.side enumorder side —
BUY, SELLorderStatus.averagePrice decimalaverage price of the fills
orderStatus.message stringStatus message
orderStatus.errorCode stringError code
order objectThe order context: orderId, clientOrderId, exchangeId, exchangeName, subaccount, symbol, assetClass, side, quantity, limitPrice, strategy, orderType, tif, createdAt, startTime, endTime, clipSizeType, clipSizeVal, targetValue, feeUrgency, params, source, linkId. Multi-leg orders carry algo and legs[] instead of the single-symbol fields.
orderProgress numberExecution progress of the parent order, 0..1
mishedge numberMulti-leg only — current mishedge between the legs
Responses#
| code 0 | Acknowledgment of successful subscription |
| code ≠ 0 | Error response for failed subscription — see Errors |
{
"topic": "order",
"exchange": "BINANCE",
"method": "subscribe"
}
{
"topic": "order",
"exchange": "BINANCE",
"method": "unsubscribe"
}
Update order
{
"orderStatus": {
"clientOrderId": "554500941080543232",
"createdAt": 1773198526482,
"filledQuantity": 0,
"leavesQuantity": 0,
"orderId": "554500941080543233",
"side": "BUY",
"source": "ods-764fc58e30",
"status": "PENDING_NEW"
},
"order": {
"orderId": "554500941080543233",
"clientOrderId": "554500941080543232",
"exchangeId": 1,
"exchangeName": "BINANCE",
"symbol": "BTC/USDT",
"assetClass": "SPOT",
"side": "BUY",
"quantity": 1.0,
"strategy": "TWAP",
"orderType": "LIMIT",
"createdAt": 1773198526000,
"startTime": 1773198526000,
"endTime": 1773202126000
},
"orderProgress": 0
}
Ack code 0
{
"code": 0,
"message": "string"
}