trade#
WS wss://api.pro.anboto.xyz/api/v2/ws
Channel for subscribing to trade (fill) updates for a specific exchange
Authenticate the connection with a listenKey — see WebSocket.
Subscribe message#
topic string requiredtradeexchange string requiredTrading exchange, case-insensitive
method enum requiredsubscribe / unsubscribeUpdate message fields#
trade_id stringAnboto's trade Id
order_id integerThe Anboto id of the child (slice) order that executed on the exchange
parent_order_id integerThe Anboto id of the parent order the filled child order belongs to; the order_id reported by the REST order endpoints and the order topic
exchange_id integerThe platform exchange id of the filled child order (see GET /api/v2/data/exchanges). A trade subscription delivers fills of its subscribed exchange; fills with an unresolved exchange (child order not yet cached) are passed through
symbol stringthe symbol of the trade
side enumtrade side —
BUY, SELLtaker_or_maker enummaker or taker of the trade —
MAKER, TAKERprice decimalthe price of the trade
amount decimalthe quantity of the trade
cost decimalthe notional of the trade
fee_currency stringfee currency
fee_cost decimalthe fee of the trade
timestamp integerUnix timestamp of this status change in milliseconds
ext_trade_id stringtrade Id from exchange
ext_order_id stringorder Id of the trade from exchnage
Responses#
| code 0 | Acknowledgment of successful subscription |
| code ≠ 0 | Error response for failed subscription — see Errors |
{
"topic": "trade",
"exchange": "BINANCE",
"method": "subscribe"
}
{
"topic": "order",
"exchange": "BINANCE",
"method": "unsubscribe"
}
Update trade
{
"trade_id": "151990408",
"order_id": 558547168212975616,
"symbol": "KITE/USDT:USDT",
"side": "SELL",
"taker_or_maker": "MAKER",
"price": 0.21735,
"amount": 153,
"cost": 33.25455,
"fee_currency": "BNB",
"fee_cost": 7.55e-06,
"timestamp": 1719224096000,
"ext_trade_id": "1204004183",
"ext_order_id": "151990408",
"client_order_id": "554500941080543232",
"parent_order_id": 558547165436166144,
"exchange_id": 1
}
Ack code 0
{
"code": 0,
"message": "string"
}