List subaccounts
curl --request GET \
--url https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"accruedFees": [
{
"startPeriod": "2024-06-01",
"endPeriod": "2024-06-15",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "121.33",
"state": "ONGOING"
},
{
"startPeriod": "2024-05-01",
"endPeriod": "2024-05-31",
"accruedValue": "1.12",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "112.33",
"state": "DONE"
},
{
"startPeriod": "2024-04-01",
"endPeriod": "2024-04-30",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "121.33",
"state": "DONE"
},
{
"startPeriod": "2024-06-01",
"endPeriod": "2024-06-15",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "ONGOING"
},
{
"startPeriod": "2024-05-01",
"endPeriod": "2024-05-31",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "DONE"
},
{
"startPeriod": "2024-04-01",
"endPeriod": "2024-04-30",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "DONE"
}
],
"balances": [
{
"assetType": "BTC",
"availableForTrading": "<string>",
"availableForWithdrawal": "<string>",
"entries": [
{
"amount": "<string>",
"description": "<string>"
}
],
"totalBalance": "<string>"
}
],
"createdAt": "2019-01-02T12:34:56.000Z",
"customerId": "<string>",
"externalSubaccountId": "<string>",
"fees": [
{
"type": "ADVISORY",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "MODEL",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "MANAGEMENT",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "CUSTODY",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
}
],
"name": "<string>",
"subaccountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"closedAt": "2019-01-03T12:34:56.000Z",
"customers": [
{
"customerId": "<string>",
"role": "PRIMARY"
}
],
"status": "OPEN",
"subType": "ROLLOVER",
"type": "IRA"
}
],
"page": {
"next": "<next page url>"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}List subaccounts
Permissions required: Subaccount or Read Subaccount
Return all subaccounts associated to a customerId
GET
/
subaccounts
/
customers
/
{customerId}
/
accounts
List subaccounts
curl --request GET \
--url https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/subaccounts/customers/{customerId}/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"accruedFees": [
{
"startPeriod": "2024-06-01",
"endPeriod": "2024-06-15",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "121.33",
"state": "ONGOING"
},
{
"startPeriod": "2024-05-01",
"endPeriod": "2024-05-31",
"accruedValue": "1.12",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "112.33",
"state": "DONE"
},
{
"startPeriod": "2024-04-01",
"endPeriod": "2024-04-30",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MANAGEMENT",
"totalBalanceInUSD": "121.33",
"state": "DONE"
},
{
"startPeriod": "2024-06-01",
"endPeriod": "2024-06-15",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "ONGOING"
},
{
"startPeriod": "2024-05-01",
"endPeriod": "2024-05-31",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "DONE"
},
{
"startPeriod": "2024-04-01",
"endPeriod": "2024-04-30",
"accruedValue": "1.21",
"rate": 0.01,
"type": "MODEL",
"totalBalanceInUSD": "121.33",
"state": "DONE"
}
],
"balances": [
{
"assetType": "BTC",
"availableForTrading": "<string>",
"availableForWithdrawal": "<string>",
"entries": [
{
"amount": "<string>",
"description": "<string>"
}
],
"totalBalance": "<string>"
}
],
"createdAt": "2019-01-02T12:34:56.000Z",
"customerId": "<string>",
"externalSubaccountId": "<string>",
"fees": [
{
"type": "ADVISORY",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "MODEL",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "MANAGEMENT",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
},
{
"type": "CUSTODY",
"rate": 0.01,
"startDate": "2023-08-01",
"isBillable": true
}
],
"name": "<string>",
"subaccountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"closedAt": "2019-01-03T12:34:56.000Z",
"customers": [
{
"customerId": "<string>",
"role": "PRIMARY"
}
],
"status": "OPEN",
"subType": "ROLLOVER",
"type": "IRA"
}
],
"page": {
"next": "<next page url>"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Query Parameters
The end date (inclusive) in YYYY-MM-DD format. The latest valid end date is the current date. Dates are always in UTC RFC 3339 'full-date'.
Was this page helpful?