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

# Balance Updates

> Receive real-time balance changes from settlements, transfers, and funding fees via WebSocket.

## Overview

Receive balance changes resulting from settlements, transfers, and funding via the `balance` channel.

## Channel information

| Property             | Value                 |
| -------------------- | --------------------- |
| **Channel Name**     | `balance`             |
| **Authentication**   | Required              |
| **Update Frequency** | On balance events     |
| **Data Type**        | Balance update object |

## Subscribe

<RequestExample>
  ```json Subscribe theme={null}
  {
    "op": "subscribe",
    "args": [ { "channel": "balance" } ]
  }
  ```
</RequestExample>

## Message format

<ResponseExample>
  ```json Balance Update theme={null}
  {
    "type": "balance",
    "data": {
      "accountId": "01234567-89ab-7def-8123-456789abcdef",
      "balanceBefore": "1.50000000",
      "balanceAfter": "1.49950000",
      "amount": "-0.00050000",
      "unit": "btc",
      "updateType": "ordersettle",
      "timestamp": 1640995200000000000
    }
  }
  ```
</ResponseExample>

<ResponseField name="data" type="object">
  Balance update fields

  <Expandable title="Balance properties">
    <ResponseField name="accountId" type="string">Account identifier (UUID)</ResponseField>
    <ResponseField name="balanceBefore" type="string">Balance before the update (BTC)</ResponseField>
    <ResponseField name="balanceAfter" type="string">Balance after the update (BTC)</ResponseField>
    <ResponseField name="amount" type="string">Delta amount (BTC)</ResponseField>
    <ResponseField name="unit" type="string">`btc`</ResponseField>
    <ResponseField name="updateType" type="string">One of: `ordersettle`, `transfer`, `fundingfee`, `insurancefundreimbursement`</ResponseField>
    <ResponseField name="timestamp" type="integer">Event time in nanoseconds</ResponseField>
  </Expandable>
</ResponseField>
