# Listing subaccounts for master account

## List subaccounts for a master account

<mark style="color:green;">`GET`</mark> `/api/public/v1/accounts/:account_id/subaccounts`

This endpoint returns all subaccounts along with their current balances on Txn for a given master account ID.

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Path Parameters**

| Name        | Type   | Description        |
| ----------- | ------ | ------------------ |
| account\_id | string | Master account ID. |

**URL Parameters**

<table><thead><tr><th width="183">Name</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td>per_page</td><td>number</td><td>Number of accounts per page to return.</td></tr><tr><td>page</td><td>number</td><td>Page for which you want to return accounts.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

```json
{
  "data": [
    {
      "id": "dc9c1c6e-3fa6-4fce-8c5f-714dfcecf3ee",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "Sub-account Adam Goodman",
        "bankReference": "BDR7013714686525702",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "89a401e2-bd3b-4a87-95b0-6ff99c0a3b7c",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "5",
        "bankReference": "BDR4357564686428100",
        "balance": "0.000000",
        "totalBalance": "0.000000",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "468a0e31-d9e5-4ad8-86aa-6c4806d40a2d",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_4",
        "bankReference": "BDR8606155657480464",
        "balance": "12.392985",
        "totalBalance": "12.392985",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "c20dec56-10ce-49e0-ad00-916579f0c04a",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_3",
        "bankReference": "BDR3865252360837137",
        "balance": "10.301300",
        "totalBalance": "10.301300",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "2df68c92-b9dd-4ff4-b7f2-5aeb381bf6fc",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_2",
        "bankReference": "BDR0042354445442825",
        "balance": "31.434196",
        "totalBalance": "31.434196",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "fbae9123-59bb-49db-bc6b-0f766c189494",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_1",
        "bankReference": "BDR4654328482173537",
        "balance": "78.915973",
        "totalBalance": "78.915973",
        "bankWithdrawalAvailable": false,
        "currencyType": "crypto"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total": 6
  },
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}
{% endtabs %}

**Response Body**

<table><thead><tr><th>Name</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.id</td><td>string</td><td>Account ID.</td></tr><tr><td>data.type</td><td>string</td><td>Entity type returned. Always <code>accounts</code>.</td></tr><tr><td>data.attributes</td><td>object</td><td>A set of account attributes.</td></tr><tr><td>data.attributes.master</td><td>boolean</td><td>If <code>ture</code>, accoint is master. If <code>false</code>, account is subaccount.</td></tr><tr><td>data.attributes.bankReference</td><td>string</td><td>Unique bank deposit reference for each account and subaccount. Example: <code>BDR6421088115176062</code>.</td></tr><tr><td>data.attributes.currencyCode</td><td>string</td><td>Account currency code. Refer to the list of <a href="../api-basics/supported-currencies">supported currencies</a>.</td></tr><tr><td>data.attributes.balance</td><td>string</td><td>Account balance.</td></tr><tr><td>data.attributes.totalBalance</td><td>string</td><td>Total balance across the master account and all subaccounts (applicable to master accounts).</td></tr><tr><td>data.attributes.bankWithdrawalAvailable</td><td>bool</td><td>When set to <code>true</code>, users can initiate bank withdrawals from the specified account. When set to <code>false</code>, bank withdrawals are restricted.</td></tr><tr><td>data.attributes.currencyType</td><td>string</td><td>Account currency type. Can be either <code>fiat</code> or <code>crypto</code>.</td></tr></tbody></table>
