WebSockets · Your account

Not a REST call: this is the WebSocket handshake. Connect to the URL below and the exchange answers 101 Switching Protocols; everything after that is frames, not requests.

One frame whenever a balance on any Unified Trading Account you own changes: spot holds, futures margin, deposits, withdrawals, and fees.

No subscribe frame. The authenticated handshake binds this socket to your user.

{
  "accountId": "721397d0-dae0-4ff3-ab1b-d7288ed6034c",
  "currency": "USDT",
  "balance": 1234.5,
  "blocked": 100
}

balance is the total and blocked is the part held in orders or margin. accountId matches GET /api/uta/accounts. This is per account and currency, not the aggregate shape returned by GET /api/wallets/balances. Reconcile both GET /api/wallets/balances and GET /api/uta/accounts after reconnecting.

get/user-balances

Request

  • Base URL
    wss://ws.azbit.com
  • URL
    wss://ws.azbit.com/user-balances
  • Auth
    none declared. Required headers: API-PublicKey, API-Signature

Query parameters

timestampinteger required

Unix milliseconds, within 30 seconds of server time, and part of the signed URL. A REST signature covers a request that happens once; a socket URL is requested once and then stays open, so without this a captured handshake would mirror your private stream indefinitely.

Headers

API-PublicKeystring required

Your API public key.

API-Signaturestring required

hex(HMAC_SHA256(privateKey, publicKey + connectUrl)). A handshake has no body, so nothing is appended after the URL. Sign the wss:// form, exactly as you connect.

Changes