Listing accounts

List accounts

GET /api/public/v1/accounts

This endpoint returns your master accounts and subaccounts, including current balances.

Example request

Use the base URL for your environment. See Environments.

curl
curl -X GET "https://api.sandbox.txn.io/api/public/v1/accounts?page=1&per_page=50" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer <api_key>"

Authentication details: Authenticating the API.

Headers

Name
Value

Content-Type

application/vnd.api+json

Authorization

Bearer <api_key>

URL Parameters

Name
Type
Description

per_page

number

Number of accounts to return per page.

page

number

Page number to return.

Response

{
  "data": [
    {
      "id": "13a85b45-8543-41c7-b963-394d4ea128ae",
      "type": "accounts",
      "attributes": {
        "master": true,
        "currencyCode": "EUR",
        "label": "master",
        "bankReference": "BDR6421088115176062",
        "balance": "38475.76",
        "totalBalance": "38687.80",
        "currencyType": "fiat"
      }
    },
    {
      "id": "dd5016e1-43bb-4be5-b6d6-79e8d0f662b1",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "EUR_1",
        "bankReference": "BDR4778763138567183",
        "balance": "80.54",
        "totalBalance": "80.54",
        "currencyType": "fiat"
      }
    },
    {
      "id": "ad5e0084-91d3-46c8-9f79-9231a75442e5",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "EUR_2",
        "bankReference": "BDR8258604421708687",
        "balance": "52.89",
        "totalBalance": "52.89",
        "currencyType": "fiat"
      }
    },
    {
      "id": "0c201594-19fe-461b-bf37-0d14e51c3f3a",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "EUR",
        "label": "EUR_3",
        "bankReference": "BDR7130670178476243",
        "balance": "78.61",
        "totalBalance": "78.61",
        "currencyType": "fiat"
      }
    },
    {
      "id": "e289de2b-37bd-4eff-b832-f754c31a2d95",
      "type": "accounts",
      "attributes": {
        "master": true,
        "currencyCode": "USDT",
        "label": "master",
        "bankReference": "BDR4180381621673581",
        "balance": "344086.455299",
        "totalBalance": "344219.499753",
        "currencyType": "crypto"
      }
    },
    {
      "id": "fbae9123-59bb-49db-bc6b-0f766c189494",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_1",
        "bankReference": "BDR4654328482173537",
        "balance": "78.915973",
        "totalBalance": "78.915973",
        "currencyType": "crypto"
      }
    },
    {
      "id": "2df68c92-b9dd-4ff4-b7f2-5aeb381bf6fc",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_2",
        "bankReference": "BDR0042354445442825",
        "balance": "31.434196",
        "totalBalance": "31.434196",
        "currencyType": "crypto"
      }
    },
    {
      "id": "c20dec56-10ce-49e0-ad00-916579f0c04a",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_3",
        "bankReference": "BDR3865252360837137",
        "balance": "10.301300",
        "totalBalance": "10.301300",
        "currencyType": "crypto"
      }
    },
    {
      "id": "468a0e31-d9e5-4ad8-86aa-6c4806d40a2d",
      "type": "accounts",
      "attributes": {
        "master": false,
        "currencyCode": "USDT",
        "label": "USDT_4",
        "bankReference": "BDR8606155657480464",
        "balance": "12.392985",
        "totalBalance": "12.392985",
        "currencyType": "crypto"
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total": 34
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Response Body

Name
Type
Description

data[].id

string

Account ID.

data[].type

string

Entity type returned. Always accounts.

data[].attributes

object

Account attributes.

data[].attributes.master

boolean

If true, the account is a master account. If false, the account is a subaccount.

data[].attributes.currencyCode

string

Account currency code. See Supported currencies.

data[].attributes.currencyType

string

Currency type. Either fiat or crypto.

data[].attributes.label

string

Account label. Master accounts use master. Subaccounts use a user-defined label.

data[].attributes.bankReference

string

Unique bank deposit reference (when applicable). Example: BDR6421088115176062.

data[].attributes.balance

string

Account balance. Returned as a string for decimal precision.

data[].attributes.totalBalance

string

For master accounts only. Total balance across the master account and its subaccounts.

meta.page

number

Current page number.

meta.per_page

number

Page size used for the response.

meta.total

number

Total number of accounts available.

jsonapi.version

string

JSON:API version.

Errors

Last updated