Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.0

Get native balance for multiple wallets

GEThttps://deep-index.moralis.io/api/v2/wallets/balances

Get the native balances for a set of specific addresses

QUERY PARAMS
chainstring
The chain to query
to_blocknumber
The block number on which the balances should be checked
wallet_addressesarrayrequired
The addresses to get metadata for (max 25 addresses)
No items in the array
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.balance.getNativeBalancesForAddresses({
"chain": "0x1"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
[
{
"chain": "eth_mainnet",
"chain_id": "2",
"total_balance": "57499206466583095",
"block_number": "123456789",
"block_timestamp": "0.057",
"total_balance_formatted": "123456789",
"wallet_balances": [
{
"address": "0x123",
"balance": "28499206466583095",
"balance_formatted": "0.0285"
}
]
}
]