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 requiredbalanceexchange string requiredTrading exchange, case-insensitive
method enum requiredsubscribe / unsubscribeUpdate message fields#
balance decimalTotal balance
free decimalAvailable balance
symbol string requiredAsset symbol
timestamp integer requiredUnix 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"
}