I can query the current balance from the mirror node using this request:
curl --request GET \
'https://testnet.mirrornode.hedera.com/api/v1/balances?account.id=0.0.3996280' \
--header 'Content-Type: application/json'
Based on the documentation found here, for /api/v1/balances.
However, the only query params available for this endpoint are account.id, account.balance, account.publickey, limit, and order.
Is there an alternative way to do this?
Note: I have thought of a possible alternative way to do this,
using eth_getBalance over JSON-RPC instead of the Mirror node APIs, like so:
curl -X POST \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params":
[
"0x7394111093687e9710b7a7aeba3ba0f417c54474",
"latest"
],
"id": 0
}'
... however, I'm not sure how I would need specify:
- a native-Hedera (non-EVM) address like
0.0.3996280as the first parameter inparams - a block number as the 2nd parameter in
params, since Hedera does not have blocks AFAICT