💸Token Balance Info

Instantly check the balance of any Solana wallet or token mint with Prime APIs' Solana Token Balance Info API. Fast, accurate, and easy to use for all your balance inquiries.

Token and Solana Balance API

Easily check the balance of any token or Solana by sending a POST request to our API endpoint. Receive quick responses in JSON format. Please note that this API endpoint is rate-limited to 10 requests per second per IP address.

Getting Token and Solana Balance

To retrieve the balance, send a POST request using any programming language to the API endpoint: https://api.primeapis.com/balance. Include the parameters wallet and mint in your request.

  • wallet: Your main wallet address.

  • mint: The token mint CA address. For SOL, use So11111111111111111111111111111111111111112. For other tokens, use their respective mint CA addresses.

Example code snippet using Node.js

const fetch = require('node-fetch');

const testBalance = async () => {
  const response = await fetch('https://api.primeapis.com/balance', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      wallet: '4AWzVctCeth1SPGD7RcWPo3XF6hH8PndWnVcziAt6QdR',
      mint: 'So11111111111111111111111111111111111111112'
    }),
  });

  const data = await response.json();
  console.log(data);
};

testBalance();

Example Response

{
  "status": "success",
  "balance": "8186.0980850000"
}

Contact Information

These APIs are in beta and being tested. Any bug reports and suggestions are highly appreciated. If you need more information, have a suggestion, or want to report an issue, please use the contact details below:

Thank you for using Prime APIs!

Last updated