Skip to main content

Get the native balances for a set of specific addresses

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
providerUrlstring
The web3 provider URL to use when using local dev chain
to_blocknumber
The block number on which the balances should be checked
wallet_addressesarrayrequired
The addresses to get metadata for
Responses
200 Returns a collection of balancesarray
chainstringrequired
The chain
chain_idstringrequired
The chain id
total_balancestringrequired
The total balances for all the walttes
block_numberstringrequired
The block Number
block_timestampstringrequired
The block timestamp
total_balance_formattedstringrequired
The total balances for all the walttes formatted
wallet_balancesarrayrequired
addressstringrequired
address
balancestringrequired
balance
balance_formattedstringrequired
balance formatted
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'GET',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};

fetch('https://deep-index.moralis.io/api/v2/wallets/balances?chain=eth', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
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"
}
]
}
]