# Subaccount Balance

{% hint style="success" %}
**Your business must have a custodial services agreement with Beta Ramps to use this service.**
{% endhint %}

## Retrieve the balance of an specific asset for a specific account or subaccount

<mark style="color:blue;">`GET`</mark> `https://live.betaapp.com/v1/balance`

#### Query Parameters

| Name                                    | Type   | Description                                             |
| --------------------------------------- | ------ | ------------------------------------------------------- |
| asset<mark style="color:red;">\*</mark> | String | Check Crypto and Fiat capabilities for more information |

#### Headers

| Name                                               | Type   | Description            |
| -------------------------------------------------- | ------ | ---------------------- |
| Authorization<mark style="color:red;">\*</mark>    | String | Bearer {access\_token} |
| x-sub-account-id<mark style="color:red;">\*</mark> | String | Subaccount ID.         |

{% tabs %}
{% tab title="200: OK Sucess" %}

```json
{
  "message": "string",
  "number_of_orders_associated": 0,
  "total_asset": "string",
  "total_amount": 0,
}
```

{% endtab %}

{% tab title="400: Bad Request Error message " %}

```json
{
  "message": "string"
}
```

{% endtab %}
{% endtabs %}

**Request Example:**

{% code overflow="wrap" %}

```json
curl -X 'GET' \
  'https://live.betaapp.com/v1/balance?asset=BRL' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g'
```

{% endcode %}

**Response Example:**

```json
{
  "total_amount": 18500,
  "total_fees": 185,
  "number_of_orders_associated": 22
}
```

{% hint style="info" %}
The `total_fees` parameter represents the amount in fees that will be discounted during the settlement process.
{% endhint %}
