Skip to content

balance#

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

Channel for subscribing to asset balance updates for a specific exchange

Authenticate the connection with a listenKey — see WebSocket.

Subscribe message#

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

Update message fields#

balance decimal
Total balance
free decimal
Available balance
symbol string required
Asset symbol
timestamp integer required
Unix timestamp in milliseconds

Responses#

code 0 Acknowledgment of successful subscription
code ≠ 0 Error response for failed subscription — see Errors
{
  "topic": "balance",
  "exchange": "OKX",
  "method": "subscribe"
}
{
  "topic": "balance",
  "exchange": "OKX",
  "method": "unsubscribe"
}

Update balance

{
  "balance": "100000.00",
  "free": "95000.00",
  "symbol": "USDT",
  "timestamp": 1708840800000
}

Ack code 0

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