Skip to content

child_order#

WS wss://api.pro.anboto.xyz/api/v2/ws

Channel for subscribing to child-order (slice) updates; subscribe with {"topic":"child_order","exchange":...,"method":"subscribe"}

Authenticate the connection with a listenKey — see WebSocket.

Subscribe message#

topic string required
child_order
exchange string required
Trading exchange, case-insensitive
Example: BINANCE
method enum required
subscribe / unsubscribe

Update message fields#

orderStatus OrderStatusObj
Order Status
orderStatus.source string
Component sending the status
orderStatus.orderId int64
Anboto's order Id
orderStatus.clientOrderId string
Client referenced order Id
orderStatus.extId string
Order Id from exchange
orderStatus.exchangeId integer
Exchange Id
orderStatus.status enum
Order Status — PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values)
orderStatus.createdAt integer
Unix timestamp of this status change in milliseconds
orderStatus.filledQuantity integer
filled quantity of the order
orderStatus.leavesQuantity integer
leave quantity of the order
orderStatus.side enum
order side — BUY, SELL
orderStatus.averagePrice decimal
average price of the fills
orderStatus.message string
Status message
orderStatus.errorCode string
Error code
order object
Child order context: orderId, clientOrderId, parentOrderId, exchangeId, exchangeName, symbol, assetClass, side, quantity, limitPrice, tif, expiryTime, createdAt, orderType.
orderProgress number
Execution progress of the parent order, 0..1

Responses#

code 0 Acknowledgment of successful subscription
code ≠ 0 Error response for failed subscription — see Errors

Update child_order

{
  "orderStatus": {
    "source": "string",
    "orderId": "string",
    "clientOrderId": "string",
    "extId": "string",
    "exchangeId": 0,
    "status": "PENDING_NEW",
    "createdAt": 0,
    "filledQuantity": 0,
    "leavesQuantity": 0,
    "side": "BUY",
    "averagePrice": "string",
    "message": "string",
    "errorCode": "string"
  },
  "order": {},
  "orderProgress": 0.0
}

Ack code 0

{
  "code": 0,
  "message": "string"
}