๐ฐ Get account balance
Code samples
GET /api/v1/trx/account/{address}/balance
curl 'https://settla.net/api/v1/trx/account/TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9/balance' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the address's TRX balance together with its TRC10 holdings and its balances of the whitelisted TRC20 tokens. This endpoint and GET /api/v1/trx/account/{address}/assets are the same handler under two names and return byte-identical payloads. Pick one. Watch out for two shapes in this response:
trc10is an object keyed by symbol when the address holds TRC10 tokens, but an empty array[]when it holds none. Check the type before iterating.trc20is keyed by contract address and holds raw strings;trc20_tokensis keyed by symbol and additionally carriesdecimalsand a human-readablebalance. Both cover only the whitelist fromGET /api/v1/trx/tokens/trc20, so an entry with"0"means "not held or not tracked", never "the token does not exist".
๐ ๏ธ 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 | Balance information | 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. |