⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_getBalance

Overview

Returns the balance (in wei) of the given EVM address at the specified block.

Movement-Specific Considerations

  • Works identically to Ethereum. Fast finality means recent balances stabilize quickly.
  • Dual VM note: this is the EVM balance. Move-side balances are Move resources and queried via REST.

Parameters

NameTypeRequiredDescription
address0x-prefixed hexYesEVM address to query
blockTagstringYeslatest, earliest, pending, or hex block number

Returns

Hex string balance in wei, e.g., 0xde0b6b3a7640000 (1 ETH).

Code Examples

cURL

curl -X POST https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x0000000000000000000000000000000000000000", "latest"],
"id": 1
}'

Ethers.js v6

import { JsonRpcProvider, formatEther } from 'ethers';
const provider = new JsonRpcProvider('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
const balHex = await provider.send('eth_getBalance', ['0x0000000000000000000000000000000000000000','latest']);
console.log('wei:', balHex);

Web3.js

import Web3 from 'web3';
const web3 = new Web3('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
const bal = await web3.eth.getBalance('0x0000000000000000000000000000000000000000');
console.log(bal);

viem

import { createPublicClient, http } from 'viem';

const movement = {
id: 3073,
name: 'Movement',
nativeCurrency: { name: 'MOVE', symbol: 'MOVE', decimals: 18 },
rpcUrls: { default: { http: ['https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1'] } },
} as const;

const client = createPublicClient({
chain: movement,
transport: http('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1'),
});

const balance = await client.getBalance({
address: '0x0000000000000000000000000000000000000000',
blockTag: 'latest',
});
console.log(balance); // bigint wei

Move Equivalent

Use /v1/accounts/ and /v1/accounts/{address}/resources to query Move coin resources.

Common Errors

  • invalid address: ensure 20-byte EVM address with 0x prefix.