Xaiscan
HomeKnowledge Base
Xaiscan
Xaiscan
  • Welcome
    • Introduction
  • ✨GETTING STARTED
    • Creating an Account
    • Getting an API key
    • Endpoint URLs
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Geth/Parity Proxy
    • Tokens
    • Stats
  • Visit Xaiscan
Powered by GitBook
On this page
  • Get ERC20-Token TotalSupply by ContractAddress
  • Get ERC20-Token Account Balance for TokenContractAddress
  1. API Endpoints

Tokens

PreviousGeth/Parity ProxyNextStats

Last updated 9 months ago

Get ERC20-Token TotalSupply by ContractAddress

Returns the current amount of an ERC-20 token in circulation.

https://api.xaiscan.io/api
   ?module=stats
   &action=tokensupply
   &contractaddress=0x8DF2CDec3ec9a8A65998c866422c152D3dA52fB2
   &apikey=YourApiKeyToken

Try this endpoint in your

Query Parameters

Parameter
Description

contractaddress

the contract address of the ERC-20 token

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":"17475895000000000000000000"
}

Tip : The result is returned in the token's smallest decimal representation.

Eg. a token with a balance of 215.241526476136819398 and 18 decimal places will be returned as 215241526476136819398

Get ERC20-Token Account Balance for TokenContractAddress

Returns the current balance of an ERC-20 token of an address.

https://api.xaiscan.io/api
   ?module=account
   &action=tokenbalance
   &contractaddress=0x8DF2CDec3ec9a8A65998c866422c152D3dA52fB2
   &address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
   &tag=latest&apikey=YourApiKeyToken

Query Parameters

Parameter
Description

contractaddress

the contract address of the ERC-20 token

address

the string representing the address to check for token balance

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":"17270000000000000000000"
}

Eg. a token with a balance of 215.241526476136819398 and 18 decimal places will be returned as 215241526476136819398

Try this endpoint in your

Tip : The result is returned in the token's smallest decimal representation.

🎯
📈
🔗
📈
browser
🔗
browser