/accounts/{accountId}/balance-info - Polkadot
Example code for the /accounts/{accountId}/balance-info REST method. Complete guide on how to use /accounts/{accountId}/balance-info REST in GetBlock Web3 documentation.
This endpoint returns the balance details for an account: free, reserved, and frozen amounts, the nonce, and any balance locks, at the latest or a specified block.
Endpoint
GET /accounts/{accountId}/balance-infoPath Parameters
accountId
string
SS58 account address
Query Parameters
at
string
No
Block height or hash to query at. Defaults to the latest block
Request
curl --location 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/accounts/15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5/balance-info'const response = await fetch('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/accounts/15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5/balance-info');
const data = await response.json();
console.log(data);import requests
response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/accounts/15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5/balance-info')
print(response.json())Response
{
"at": {
"hash": "0x255bc00927df8d33d561792635cbc6bde480a0a505eef5ff28630ece3fc15b32",
"height": "6754362"
},
"nonce": "1234",
"tokenSymbol": "DOT",
"free": "50000000000",
"reserved": "1000000000",
"frozen": "0",
"locks": []
}Response Fields
nonce
string
Account nonce
tokenSymbol
string
Native token symbol (DOT)
free
string
Free balance in Planck
reserved
string
Reserved balance in Planck
frozen
string
Frozen balance in Planck
locks
array
Active balance locks
Use Cases
Balance Display: Show an account's spendable and reserved balance
Wallets: Read balance and nonce in a single call
Accounting: Reconcile free, reserved, and frozen amounts
Transfer Checks: Confirm sufficient free balance before a transfer
Last updated
Was this helpful?