# Account balances

Subscribe to get account balances as they update.

## Subscribe to account balances

> Subscribe balances request example


```json
{
  "creditBalanceSubscriptionRequest": {
    "type": "ACCOUNT",
    "customerAccountList": [
      "Margin",
      "Cash"
    ],
    "providersList": [
      "<brokername>"
    ],
    "action": "SUBSCRIBE"
  }
}
```

> Request body


| Attribute  | Description |
|  --- | --- |
| `type` | **string: (required)** Balance type `ACCOUNT`. |
| `customerAccountList` | **array [string]: (required)** The account types:* `Margin`: Margin balance
* `Cash`: Cash balance.

 |
| `providersList` | **array [string]: (required)** A list of broker IDs to request balances from. |
| `action` | **string: (required)** Requested action `SUBSCRIBE`. |


> Returns


> Balances example


```json
{
  "accountBalances": [
    {
      "orgName": "<customername>",
      "balances": [
        {
          "legalEntity": "Cash",
          "provider": "<brokername>",
          "currencyBalances": [
            {
              "currency": "BTC",
              "amount": 12.11
            },
            {
              "currency": "ETH",
              "amount": 163
            },
            {
              "currency": "SOL",
              "amount": 100
            },
            {
              "currency": "USD",
              "amount": 99425122.47
            }
          ]
        }
      ]
    }
  ]
}
```

| Attribute  | Description |
|  --- | --- |
| `orgName` | **string:** Requesting customer ID. |
| `balances` | **array [balances object]:** Balances by broker and account type (`Margin`|`Cash`). |
| `legalEntity` | **string:** Account type (`Margin`|`Cash`). |
| `provider` | **string:** Broker ID of balances. |
| `currencyBalances` | **array [amount objects]:** array of denominated balance amounts. |
| `currency` | **string:** Denomination of the balance amount. |
| `amount` | **double:** Balance amount. |