Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns all token balances for an account across all networks.
cURL
curl --request GET \ --url https://api.onchainden.com/api/v1/accounts/{accountId}/balances \ --header 'Authorization: Bearer <token>'
const client = new DenClient({ apiKey: 'ck_live_...' }); const balances = await client.getAccountBalances('acc_123'); console.log(`${balances.balances.length} tokens`);
{ "data": { "accountId": "acc_123", "balances": [ { "networkId": 1, "symbol": "ETH", "name": "Ether", "amount": "1.5", "decimals": 123, "contractAddress": "0xdef...abc" } ], "updatedAt": "2023-11-07T05:31:56Z" } }
{ "error": { "code": "unauthorized", "message": "Invalid API key" } }
{ "error": { "code": "notFound", "message": "Resource not found" } }
API key authentication. Include your API key in the Authorization header.
Account balances
Show child attributes