kamiPay LogokamiPay Docs

Address Balance

Check the balance of a specific wallet address

This endpoint allows you to check the balance in a given address. Balance will be provided for Matic and USDT only.

Query Parameters

NameTypeDescription
chainstringRequired. Only 'polygon' is accepted.
addressstringRequired. Address to check. It must be a previously assigned address to your user.

Example Request

const chain = "polygon";
const address = "0x1c0aCFxxxxxxxxxxA8fEdce1ab4";
 
const url = `${baseURL}/v1/wallet/get_address_balance?address=${address}&chain=${chain}`;
 
const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
    "Content-Type": "application/json",
  },
});

Response

{
    "status": "ok",
    "msg": "Matic and USDt Balance",
    "data": {
        "address": "0x1c0aCFxxxxxxxxxxA8fEdce1ab4",
        "tokens": [
            {
                "token": "MATIC",
                "balance": 0.35916607409480106
            },
            {
                "token": "USDT",
                "balance": 1.758236
            }
        ]
    }
}

This endpoint provides real-time balance information for both MATIC (gas token) and USDT in the specified wallet address.

On this page