Skip to main content
POST
/
v1
/
getBalance
GetBalance
curl --request POST \
  --url https://api.mpcvault.com/v1/getBalance \
  --header 'Content-Type: application/json' \
  --header 'x-mtoken: <api-key>' \
  --data '
{
  "networkType": 0,
  "walletAddress": "<string>",
  "chainId": "<string>",
  "tokenAddress": "<string>"
}
'
{
  "balance": "<string>",
  "error": {
    "executeSigningRequestsErrorCode": "EXECUTE_SIGNING_REQUESTS_ERROR_CODE_UNSPECIFIED",
    "message": "<string>"
  }
}
Returns the balance for a wallet address—native token or a specific ERC-20/SPL token. Balance is a string for precision; use the token’s decimals to convert (e.g. ETH 18, USDC 6, SOL 9).

Authorizations

x-mtoken
string
header
required

Your API token. Required for all API requests.

Body

application/json
networkType
enum<integer>
required

Network type. 0=Unknown, 1=EVM, 2=Bitcoin, 3=Tron, 4=Aptos, 5=Sui, 6=Solana, 7=TON

Available options:
0,
1,
2,
3,
4,
5,
6,
7
walletAddress
string
required

Default:null wallet_address this is the wallet address.

chainId

The chain id of the network. Required only for EVM (networkType=1).

tokenAddress
string

Default:null token_address this is the token address,if not set, it will return the balance of the native token.

Response

200 - application/json

Success

balance
string

The balance is in the smallest denomination.

error
Execute SRs Error Code · object

The error is null when success.