eth_getBalance
PolygonC1Returns the balance of an account in wei at the requested block. Pass a historic block number to read a past balance — this resolves against our archive nodes, so old heights work, not just the latest state.
Endpoint
POST https://api.1st-node.com/v1/polygon/rpcParameters
| Name | Type | Description |
|---|---|---|
| address | DATA, 20 bytes | Address to query the balance for. |
| block | QUANTITY | TAG | Block number, or "latest"/"earliest"/"pending". |
Returns
QUANTITY — the current balance in wei, hex-encoded.
Request
curl https://api.1st-node.com/v1/polygon/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBalance",
"params": ["0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be", "latest"]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBalance",
"params": ["0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be", "latest"]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7c2562030800"
}More state methods on Polygon
常见问题
Can I read a historic balance?
Yes — pass a past block number and our archive nodes resolve the balance at that height.
What unit is the balance in?
Wei, hex-encoded. Divide by 1e18 for the native token amount.
充值、拿密钥、上线。
自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。
获取 API 密钥