Skip to main content

kaia_getBalance

POST

Returns the native token balance owned by a specific account address.
param[0]
addressstringrequired
Address is expressed as a 20-byte hexadecimal string, the address format used on EVM-compatible blockchains.
param[1]
blockNumberOrHashOrTagstringrequired
Use one of block hash, block number, or block tag to specify the block.
  • Block number: Hexadecimal string (e.g. "0x1")
  • Block hash: 64-digit hexadecimal string (e.g. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
  • Block tag: Enum string (e.g. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://kaia-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "kaia_getBalance",
"params": [
"0xc90d3Ac75D1D36dF0b0a229E73D8409FB7F3c4ab",
"latest"
]
}'