evm_api.balance
evm_api.balance.get_native_balance()
Get the native balance for a specific wallet address.
from moralis import evm_api
api_key = "YOUR_API_KEY"
params = {
"address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
"chain": "eth",
"to_block": 1.2,
}
result = evm_api.balance.get_native_balance(
api_key=api_key,
params=params,
)
print(result)
Name | Type | Description | Required | Default | Example |
---|---|---|---|---|---|
address | str | The address from which the native balance will be checked | Yes | “0x057Ec652A4F150f7FF94f089A38008f49a0DF88e” | |
chain | enum[str]: - “eth” - “0x1” - “goerli” - “0x5” - “sepolia” - “0xaa36a7” - “polygon” - “0x89” - “mumbai” - “0x13881” - “bsc” - “0x38” - “bsc testnet” - “0x61” - “avalanche” - “0xa86a” - “fantom” - “0xfa” - “palm” - “0x2a15c308d” - “cronos” - “0x19” - “arbitrum” - “0xa4b1” |
The chain to query | “eth” | “eth” | |
to_block | float | The block number from which the balances should be checked | 1.2 |
evm_api.balance.get_native_balances_for_addresses()
Get the native balances for a set of specific addresses
from moralis import evm_api
api_key = "YOUR_API_KEY"
params = {
"wallet_addresses": [],
"chain": "eth",
"to_block": 1.2,
}
result = evm_api.balance.get_native_balances_for_addresses(
api_key=api_key,
params=params,
)
print(result)
Name | Type | Description | Required | Default | Example |
---|---|---|---|---|---|
wallet_addresses | List of str | The addresses to get metadata for | Yes | [] | |
chain | enum[str]: - “eth” - “0x1” - “goerli” - “0x5” - “sepolia” - “0xaa36a7” - “polygon” - “0x89” - “mumbai” - “0x13881” - “bsc” - “0x38” - “bsc testnet” - “0x61” - “avalanche” - “0xa86a” - “fantom” - “0xfa” - “palm” - “0x2a15c308d” - “cronos” - “0x19” - “arbitrum” - “0xa4b1” |
The chain to query | “eth” | “eth” | |
to_block | float | The block number on which the balances should be checked | 1.2 |