> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Balance Margin

> Subscribe to real-time margin balance updates for a WhiteBIT account via WebSocket.

Query or subscribe to collateral (margin) balance updates. The response includes total balance, borrowed amount, and available amounts with and without borrowing. Updates are pushed every 1.5 seconds when the margin balance changes. Use the query operation for a one-time snapshot; use subscribe for continuous updates.

<Note>
  Balance available for margin trade equals `balance × leverage` and depends on orderbook liquidity and open positions. When a position opens, the balance does not change, but the amount available for trading decreases.
</Note>

<Note>Connect to `wss://api.whitebit.com/ws` — see [WebSocket Overview](/websocket/overview) for protocol details and keepalive requirements.</Note>

## Rate limits

## Query margin balance (one-time)

Fetch current margin balances for specific assets without subscribing.

`params`: `[asset, asset, ...]`. Pass asset tickers to query specific balances. Pass an empty array to query all assets.

**Request**

**Response**

## Subscribe to margin balance

<Tip>
  Updates include only assets whose margin balance changed. To hydrate full state on startup or after reconnection, send a `balanceMargin_request` query before subscribing. See [Reconnection and state recovery](/guides/websocket-quickstart#state-recovery-after-reconnect) for the full pattern.
</Tip>

## Update frequency

The server pushes updates every **1.5 seconds** when the margin balance changes.

## Error codes

## Balance object

* [Collateral Account Balance](/api-reference/collateral-trading/collateral-account-balance) — margin balance snapshot via REST.
* [Balance Spot](/websocket/account-streams/balance-spot) — spot (trade) balance updates via WebSocket.
