Skip to content

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 required
trade
exchange string required
Trading exchange, case-insensitive
Example: BINANCE
method enum required
subscribe / unsubscribe

Update message fields#

tradeId string
Anboto's trade Id
orderId integer
Order where the trade belong
symbol string
the symbol of the trade
takerOrMaker enum
maker or taker of the trade — MAKER, TAKER
price decimal
the price of the trade
amount decimal
the quantity of the trade
cost decimal
the notional of the trade
feeCurrency string
fee currency
feeCost decimal
the fee of the trade
timestamp integer
Unix timestamp of this status change in milliseconds
extTradeId string
trade Id from exchange
extOrderId string
order 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

{
  "tradeId": 151990408,
  "orderId": "558547168212975616",
  "symbol": "KITE/USDT:USDT",
  "side": "SELL",
  "takerOrMaker": "MAKER",
  "price": 0.21735,
  "amount": 153,
  "cost": 33.25455,
  "feeCurrency": "BNB",
  "feeCost": 7.55e-06,
  "timestamp": null,
  "extTradeId": 1204004183,
  "extOrderId": 151990408,
  "clientOrderId": "554500941080543232"
}

Ack code 0

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