Check Balance Token
API Documentation: Check Batch Balance Token
Overview
This API endpoint allows you to check your token balances from list of token addresses in a blockchain network
⚠️
Check Batch Balance Token is not supported for Solana & Bitcoin network
- HTTP Method: POST
 - Endpoint: 
/api/<VERSION>/wallet/batch-balance-token 
Request Body Parameters
network(required if chainId empty): The network used for transactions. You can see Networks Reference to get the network code.chainId(required if network empty): The chain ID of the network used for transactions.tokenAddresses(required): List of token addresses.
Example Request Body
{
    "network": "ethereum",
    "chainId": "1",
    "tokenAddresses": ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]
}Request
Request Headers
Authorization(required): JWT token which was generated when user login and do not have an MPC wallet.x-client-secret(required if x-app-id is empty): Client Secret which was generated when create an app in Xellar Dashboard.x-app-id(required if x-client-secret is empty): App Id which was generated when create an app in Xellar Dashboard. (You need to add your origin in Xellar Dashboard if using x-app-id)
Example Request Syntax
curl -X POST -H "Content-Type: application/json" -H "x-client-secret: $YOUR_CLIENT_SECRET" -H "x-app-id: $YOUR_APP_ID" -H "Authorization: Bearer $YOUR_ACCESS_TOKEN" -d '{
    "network": "ethereum",
    "chainId": "1",
    "tokenAddresses": ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]
}' <BASE_URL>/api/<VERSION>/wallet/batch-balance-tokenResponse
The response will include a JSON object with the following properties:
status(number): The HTTP status code of the response (e.g., 200 for success).message(string): A message providing additional information about the operation.data(object): An object containing the wallet address, token balances, token symbols & token decimals informations.
Example Response
{
    "status": 200,
    "message": "Check Token Balance is successfully",
    "data": {
        "address": "0xBfE64B4b628E0998A03e2522B051Cf1B4661c964",
        "tokens": [
            {
                "balance": "0.0",
                "symbol": "USDT",
                "decimals": 6
            },
            {
                "balance": "0.0",
                "symbol": "USDC",
                "decimals": 6
            }
        ]
    }
}Error Response (407 - Permission Required)
If the user hasn't granted permission to the connected app, the API will return a 407 status code. For more information about handling permission requirements, see User Permission System:
{
    "status": 407,
    "message": "https://passport-dev.xellar.co?ask_permission=true&app_id=<YOUR_APP_ID>",
    "data": null
}