Arbitrum One
Arbitrum One
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getBalance returns the native-token balance of an account at a specified block. On Arbitrum One the native token is ETH (used to pay gas on the rollup), and the balance comes back as hex-encoded wei. Query any address against latest, a named tag, or a historical block height through https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161).
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | address | string (hex) | 是 | The account address to query. |
| 2 | blockTag | string | 否 | Block at which to read the balance.默认值: latest |
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded balance in wei. Convert with BigInt(value); divide by 10n**18n to get the chain's base unit. |
Try it live in the Arbitrum One playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Address is malformed, missing 0x prefix, or block tag is unrecognised. |
-32000 | Missing trie node | Queried a historical block that the node has pruned (non-archive node). |
Number() on the raw hex value — ETH balances above 2^53 wei lose precision; always parse with BigInt(value) and divide by 10n**18n for whole ETH.latest reflects the sequencer's soft confirmation and is not yet final — for a system of record, read at "finalized", since Arbitrum finality follows the L1 challenge window.eth_call to that token's balanceOf.参数
0x-prefixed 20-byte address
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"