/account/balance
POST https://rosetta.s0.b.hmny.io/account/balance
Overview
This endpoint gets an array of all AccountBalances
for an AccountIdentifier
and the BlockIdentifier at which the balance lookup was performed.
Reference Rosetta Documentation
Harmony Specific Documentation
Supported Blocks
Only a node running in archival mode (with a full archival DB) can fetch the balance of an account at any block. Nodes running in state-pruned mode (most validators) can only fetch account balance at the last 50-ish synced blocks. For state-pruned nodes, any block after the oldest_block_identifier
(from the /network/status
endpoint) will return the balance at that block.
Request Body
{"network_identifier"=>{"blockchain"=>"Harmony", "network"=>"Testnet", "sub_network_identifier"=>{"network"=>"shard 0", "metadata"=>{"is_beacon"=>true}}}, "account_identifier"=>{"address"=>"one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur", "metadata"=>{"hex_address"=>"0x15a128e599b74842BCcBa860311Efa92991bffb5"}}, "block_identifier"=>{"index"=>1123941}}
RESPONSES
status: OK
{"block_identifier":{"index":1123941,"hash":"0xc36aa0c2878fcc8d9b8359932dc80a56af6dcfc8a0231474f933087313be2518"},"balances":[{"value":"4937075263744361682000000000","currency":{"symbol":"ONE","decimals":18}}]}