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

# WebSocket 余额频道 - 实时信用额度、现金、敞口与可用余额

> 在 Apexium API WebSocket 上，登录后立即并在每次变化时收到您账户的余额。

`balance` 频道发送您 API 密钥所属账户的余额。

紧接在 `login_ok` 之后，以及四个金额中任意一个发生变化时，您会收到：

```json theme={null}
{
  "channel": "balance",
  "type": "balance",
  "payload": {
    "givenCredit": { "amount": "5000.00", "amountCents": 500000, "currency": "USD" },
    "cashBalance": { "amount": "120.00", "amountCents": 12000, "currency": "USD" },
    "exposure": { "amount": "830.50", "amountCents": 83050, "currency": "USD" },
    "available": { "amount": "4289.50", "amountCents": 428950, "currency": "USD" }
  },
  "ts": 1791413359090,
  "seq": 1
}
```

数据内容的结构和数值与 [`GET /v1/balance`](https://docs.apexiumbet.com/zh/api-reference/overview#账户) 相同。变化通常在半秒内到达：下单、成交、撤单、结算，或账户的信用额度或现金发生变化。

每条消息都包含完整的余额，因此该频道没有 `eventId`，也没有恢复机制。重连后，当前余额会紧接在 `login_ok` 之后到达。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.