Listing subaccounts for master account
List subaccounts for a master account
GET /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
Content-Type
application/vnd.api+json
Authorization
Bearer <api_key>
Path Parameters
account_id
string
Master account ID.
URL Parameters
per_page
number
Number of accounts per page to return.
page
number
Page for which you want to return accounts.
Response
{
"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",
"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",
"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",
"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",
"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",
"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",
"currencyType": "crypto"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
}
}
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 6
},
"jsonapi": {
"version": "1.0"
}
}Response Body
data.id
string
Account ID.
data.type
string
Entity type returned. Always accounts.
data.attributes
object
A set of account attributes.
data.attributes.master
boolean
If ture, accoint is master. If false, account is subaccount.
data.attributes.bankReference
string
Unique bank deposit reference for each account and subaccount. Example: BDR6421088115176062.
data.attributes.balance
string
Account balance.
data.attributes.totalBalance
string
Total balance across the master account and all subaccounts (applicable to master accounts).
data.attributes.currencyType
string
Account currency type. Can be either fiat or crypto.
Last updated