Tokens
Returns the total supply of a ERC-20 token.
https://api-testnet.polygonscan.com/api
?module=stats
&action=tokensupply
&contractaddress=0xb7d8378f720723f9bd51d8c739bb1adefa3fa11d
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
contractaddress | the contract address of the ERC-20 token |
Sample Response
{
"status":"1",
"message":"OK",
"result":"972940843225859605990"
}
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
Returns the current balance of a ERC-20 token of an address.
https://api-testnet.polygonscan.com/api
?module=account
&action=tokenbalance
&contractaddress=0x326c977e6efc84e512bb9c30f76e30c160ed06fb
&address=0x71c05a4ea5e9d5b1ac87bf962a043f5265d4bdc8
&tag=latest
&apikey=YourApiKeyToken
Request
Response
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":"999884800000000000000000"
}
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
Last modified 11mo ago