Skip to main content

Getting balance

Getting the wallet's balance.

Parameters

Request

curl -X GET -H "X-Wallet-Id: {wallet-id}" http://localhost:8000/wallet/balance

Response

{"available":2,"locked":0}
info

Attribute **locked** : Mined blocks need to wait some more blocks to spend the rewards, so when a miner mines a block, the reward is locked for 300 blocks. Besides that, the wallet can send an output with a timelock, which basically says the miner can't spend a given output until some date and time. Those output values show in a wallet as locked.

Balance of a Custom Token

By default, the wallet gets the balance from HTR tokens. For getting the balance of a different token, the token UID must be informed in the URL through the token parameter.

curl -H "X-Wallet-Id: 112358" \
http://localhost:8000/wallet/balance?token="00000000bd12f79457574ab06fdf9e6d7867896bb217c65d718f7fd4bab0dc77"