FTMScan
HomeTwitterKnowledge Base API PRO
FTMScan
FTMScan
  • Introduction
  • ✨Getting Started
    • Creating an Account
    • Getting an API Key
    • Endpoint URLs
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Geth Proxy
    • Tokens
    • Gas Tracker
    • Stats
  • 🏆API PRO
    • FTMScan API PRO
    • API PRO Endpoints
  • 📖Tutorials
    • Integrating Google Sheets
    • Verifying Contracts Programmatically
  • 🤝Support
    • FAQ
    • Rate Limits
    • Common Error Messages
    • Getting Help
  • Visit FTMScan.com
Powered by GitBook
On this page
  • Get ERC-20 Token TotalSupply by ContractAddress
  • Get ERC-20 Token Account Balance by ContractAddress
  • Get Historical ERC-20 Token TotalSupply by ContractAddress & BlockNo
  • Get Historical ERC-20 Token Account Balance by ContractAddress & BlockNo​
  • Get Token Info by ContractAddress
  1. API Endpoints

Tokens

PreviousGeth ProxyNextGas Tracker

Last updated 2 years ago

Get ERC-20 Token TotalSupply by ContractAddress

Returns the total supply of a ERC-20 token.

https://api.ftmscan.com/api
   ?module=stats
   &action=tokensupply
   &contractaddress=0x841fad6eae12c286d1fd18d1d525dffa75c7effe
   &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":"8394545019028224261891720"
}

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 ERC-20 Token Account Balance by ContractAddress

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

https://api.ftmscan.com/api
   ?module=account
   &action=tokenbalance
   &contractaddress=8394545019028224261891720
   &address=0x5a411f084faa3259924a4764ff9b090c5780a159
   &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":"5073087897505327949"
}

Returns the historical amount of a ERC-20 token in circulation at a certain block height.

https://api.ftmscan.com/api
   ?module=stats
   &action=tokensupplyhistory
   &contractaddress=0x9879aBDea01a879644185341F7aF7d8343556B7a
   &blockno=29492602
   &apikey=YourApiKeyToken

Query Parameters

Parameter

Description

contractaddress

the contract address of the ERC-20 token

blockno

the integer block number to check total supply for eg. 4000000

Sample Response

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

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

Returns the balance of a ERC-20 token of an address at a certain block height.

https://api.ftmscan.com/api
   ?module=account
   &action=tokenbalancehistory
   &contractaddress=0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e
   &address=0x1Ae31D4F3A86AD57d7F7133c56684a1210e2F87c
   &blockno=42235183
   &apikey=YourApiKeyToken

Query Parameters

contractaddress

the contract address of the ERC-20 token

address

the string representing the address to check for balance

blockno

the integer block number for eg. 400000

Sample Response

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

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

Returns project information and social media links of an ERC-20/ERC-721 token.

https://api.ftmscan.com/api
   ?module=token
   &action=tokeninfo
   &contractaddress=0xe1146b9ac456fcbb60644c36fd3f868a9072fc6e
   &apikey=YourApiKeyToken

Query Parameters

Parameter

Description

contractaddress

the contract address of the ERC-20/ERC-721 token to retrieve token info

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "contractAddress":"0xe1146b9ac456fcbb60644c36fd3f868a9072fc6e",
         "tokenName":"fBTC",
         "symbol":"FBTC",
         "divisor":"18",
         "tokenType":"ERC20",
         "totalSupply":"2.508457000000000000",
         "blueCheckmark":"true",
         "description":"",
         "website":"https://fantom.foundation/defi/",
         "email":"contact@fantom.foundation",
         "blog":"https://medium.com/fantomfoundation",
         "reddit":"https://www.reddit.com/r/FantomFoundation/",
         "slack":"",
         "facebook":"",
         "twitter":"https://twitter.com/FantomFDN",
         "bitcointalk":"",
         "github":"https://github.com/Fantom-Foundation",
         "telegram":"https://t.me/Fantom_English",
         "wechat":"",
         "linkedin":"",
         "discord":"http://chat.fantom.network/",
         "whitepaper":"",
         "tokenPriceUSD":"20938.0000000000"
      }
   ]
}

Try this endpoint in your

Get Historical ERC-20 Token TotalSupply by ContractAddress & BlockNo

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Try this endpoint in your

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

Get Historical ERC-20 Token Account Balance by ContractAddress & BlockNo​

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Try this endpoint in your

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

Get Token Info by ContractAddress

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Try this endpoint in your

🎯
📝
📈
📝
📈
📝
🔗
📈
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser