๐ฐ Get all asset balances
Code samples
GET /api/v1/trx/account/{address}/assets
curl 'https://settla.net/api/v1/trx/account/TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9/assets' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns TRX, TRC10 and whitelisted TRC20 balances for the address. This is an alias of GET /api/v1/trx/account/{address}/balance โ same handler, byte-identical response. See that endpoint for the shape caveats around trc10 and the whitelist.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| address | path | string | true | Base58 Tron address. |
Example responses
200 Response
{
"address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
"balance": 35216519,
"trc10": {
"CPRO": {
"name": "CexProToken",
"id": "1004108",
"balance": 10399700
},
"BIRD": {
"name": "BIRD",
"id": "1002962",
"balance": 10000000
}
},
"trc20": {
"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t": "3100000"
},
"trc20_tokens": {
"USDT": {
"contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"name": "Tether USD",
"decimals": 6,
"balance_raw": "3100000",
"balance": "3.1"
}
}
}
500 Response
{
"error": "Could not connect to TRX node."
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Aggregated asset balances | Inline |
| 500 | Internal Server Error | Could not connect to TRX node | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป address | string | false | none | none |
| ยป balance | integer(int64) | false | none | TRX balance in SUN. |
| ยป trc10 | [oneOf] | false | none | TRC10 holdings keyed by token symbol โ or an empty array [] when the address holds none. |
| ยป trc20 | object | false | none | Raw balances of the whitelisted TRC20 tokens, keyed by contract address. Values are decimal strings so precision survives JSON. |
| ยป trc20_tokens | object | false | none | The same balances keyed by symbol, with metadata and a scaled balance. An object, not an array. |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |
| ยป details | object | false | none | Present only on a few validation errors. |