GET
/
v3
/
balances
/
aggregated-balance
Get aggregated balance
curl --request GET \
  --url https://be.staging.onebalance.io/api/v3/balances/aggregated-balance \
  --header 'x-api-key: <api-key>'
{
"balanceByAggregatedAsset": [
{
"aggregatedAssetId": "ds:eth",
"balance": "26720629499317191152",
"individualAssetBalances": [
{
"assetType": "eip155:42161/slip44:60",
"balance": "43872973277400073",
"fiatValue": 77.727114
},
{
"assetType": "eip155:8453/slip44:60",
"balance": "26488136306212020002",
"fiatValue": 46927.441806
}
],
"fiatValue": 47005.16892
},
{
"aggregatedAssetId": "ds:usdc",
"balance": "843936437",
"individualAssetBalances": [
{
"assetType": "eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"balance": "62459466",
"fiatValue": 62.456468
},
{
"assetType": "eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"balance": "774598041",
"fiatValue": 774.563184
}
],
"fiatValue": 837.019652
}
],
"balanceBySpecificAsset": [],
"totalBalance": {
"fiatValue": 47842.188572
}
}

Authorizations

x-api-key
string
header
required

The OneBalance API uses API keys to authenticate requests. All API requests require authentication using an API key passed in the x-api-key header:

curl -X 'GET' \
'https://be.onebalance.io/api/path-to/endpoint' \
-H 'x-api-key: ${ONEBALANCE_API_KEY}' \
...

A public API key is available for testing purposes with limited usage: 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Learn how to generate API access tokens at OneBalance Docs.

Query Parameters

assetId
string

Additional token assetIds to include, separated by commas

Example:

"eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

account
string
required

Account identifiers in CAIP-10 format or custom chain-agnostic format, separated by commas

Example:

"eip155:42161:0xfe52613d747E20F2f62e0A5cC36B0DFAe771C442,solana:J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"

Response

200
application/json

Successfully retrieved aggregated balance

Aggregated balance response for v3 endpoints supporting multiple accounts and chain types