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"