Skip to main content
POST
https://api.mpcvault.com
/
v1
/
getBalance
curl -X POST https://api.mpcvault.com/v1/getBalance \
  -H "Content-Type: application/json" \
  -H "x-mtoken: YOUR_API_TOKEN" \
  -d '{
    "networkType": "NETWORK_TYPE_ETHEREUM",
    "chainId": 1,
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD58"
  }'
{
  "balance": "1500000000000000000"
}
Returns the native token or ERC-20/SPL token balance for a wallet address. The balance is returned as a string to preserve precision for large numbers. Convert using the token’s decimals (e.g., ETH: 18 decimals, USDC: 6 decimals, SOL: 9 decimals).

Headers

x-mtoken
string
required
Your API token

Body

networkType
string
required
Blockchain network type
walletAddress
string
required
Wallet address to check
chainId
integer
Chain ID (required for EVM networks)
tokenAddress
string
Token contract address (omit for native token)

Common Chain IDs

Chain IDNetwork
1Ethereum Mainnet
137Polygon
56BNB Chain
42161Arbitrum One
10Optimism
8453Base
43114Avalanche C-Chain

Response

balance
string
Balance in smallest denomination (wei, lamports, etc.)
error
object
Error details (if failed)
curl -X POST https://api.mpcvault.com/v1/getBalance \
  -H "Content-Type: application/json" \
  -H "x-mtoken: YOUR_API_TOKEN" \
  -d '{
    "networkType": "NETWORK_TYPE_ETHEREUM",
    "chainId": 1,
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD58"
  }'
{
  "balance": "1500000000000000000"
}