Endpoints with are under the API Pro subscription. To upgrade your API plan, browse through the PolygonScan APIs page.
Get ERC-20 Token TotalSupply by ContractAddress
Returns the total supply of a ERC-20 token.
https://api.polygonscan.com/api
?module=stats
&action=tokensupply
&contractaddress=0x7ceb23fd6bc0add59e62ac25578270cff1b9f619
&apikey=YourApiKeyToken
Try this endpoint in your browser
Query Parameters
the contract address
of the ERC-20 token
Sample Response
{
"status":"1",
"message":"OK",
"result":"476738052697606400198601"
}
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.polygonscan.com/api
?module=account
&action=tokenbalance
&contractaddress=0x8a953cfe442c5e8855cc6c61b1293fa648bae472
&address=0xe04c9c8b5939fb0bb2ce58573fa4fa0411093506
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
the contract address
of the ERC-20 token
the string
representing the address to check for token balance
Sample Response
{
"status":"1",
"message":"OK",
"result":"46845461145279332930893089378"
}
Eg. a token with a balance of 215.241526476136819398
and 18 decimal places will be returned as 215241526476136819398
Returns the historical amount of a ERC-20 token in circulation at a certain block height.
https://api.polygonscan.com/api
?module=stats
&action=tokensupplyhistory
&contractaddress=0x831753dd7087cac61ab5644b308642cc1c33dc13
&blockno=20071631
&apikey=YourApiKeyToken
Query Parameters
the contract address
of the ERC-20 token
the integer
block number to check total supply for eg. 4000000
Sample Response
{
"status":"1",
"message":"OK",
"result":"951911913447326414573422"
}
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.polygonscan.com/api
?module=account
&action=tokenbalancehistory
&contractaddress=0x831753dd7087cac61ab5644b308642cc1c33dc13
&address=0x019ba0325f1988213d448b3472fa1cf8d07618d7
&blockno=20169066
&apikey=YourApiKeyToken
Query Parameters
the contract address
of the ERC-20 token
the string
representing the address to check for balance
the integer
block number to check total supply for eg. 400000
Sample Response
{
"status":"1",
"message":"OK",
"result":"21475814538620954598134"
}
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.polygonscan.com/api
?module=token
&action=tokeninfo
&contractaddress=0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39
&apikey=YourApiKeyToken
Query Parameters
the contract address
of the ERC-20/ERC-721 token to retrieve token info
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"contractAddress":"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
"tokenName":"ChainLink Token",
"symbol":"LINK",
"divisor":"18",
"tokenType":"ERC20",
"totalSupply":"1573879.616930000000000000",
"blueCheckmark":"true",
"description":"A blockchain-based middleware, acting as a bridge between cryptocurrency smart contracts, data feeds, APIs and traditional bank account payments.",
"website":"https://chain.link/",
"email":"support@chain.link",
"blog":"",
"reddit":"",
"slack":"",
"facebook":"",
"twitter":"https://twitter.com/chainlink",
"bitcointalk":"",
"github":"",
"telegram":"",
"wechat":"",
"linkedin":"",
"discord":"",
"whitepaper":"https://link.smartcontract.com/whitepaper",
"tokenPriceUSD":"24.5400000000"
}
]
}
Returns the ERC-20 tokens and amount held by an address.
Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.
https://api.polygonscan.com/api
?module=account
&action=addresstokenbalance
&address=0x4c569c1e541a19132ac893748e0ad54c7c989ff4
&page=1
&offset=100
&apikey=YourApiKeyToken
Query Parameters
the string
representing the address to check for balance
the integer
page number, if pagination is enabled
the number of transactions displayed per page
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"TokenAddress": "0xba6f652fa17384af20a2d59813345b0ee0128d48",
"TokenName": "AAVEPool.org",
"TokenSymbol": "AAVE",
"TokenQuantity": "7638",
"TokenDivisor": "2"
},
{
"TokenAddress": "0x85b9406bcbe33ba5cec12434b3c0818446c621fd",
"TokenName": "AAVEPool.org",
"TokenSymbol": "AAVE",
"TokenQuantity": "5602",
"TokenDivisor": "2"
}
]
}
Returns the ERC-721 tokens and amount held by an address.
Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.
https://api.polygonscan.com/api
?module=account
&action=addresstokennftbalance
&address=0x4c569c1e541a19132ac893748e0ad54c7c989ff4
&page=1
&offset=100
&apikey=YourApiKeyToken
Query Parameters
the string
representing the address to check for balance
the integer
page number, if pagination is enabled
the number of transactions displayed per page
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"TokenAddress": "0x0c88de91cd73b16e570a08efb068f7eade5e6107",
"TokenName": "ETHStation 1672549036942",
"TokenSymbol": "ETHStation 1672549036942",
"TokenQuantity": "1"
},
{
"TokenAddress": "0xbf6f84eb656d8bb2a1b15a0aeb3c881557e5093f",
"TokenName": "MiningSite 1682068466711",
"TokenSymbol": "MiningSite 1682068466711",
"TokenQuantity": "1"
}
]
}
Returns the ERC-721 token inventory of an address, filtered by contract address.
https://api.polygonscan.com/api
?module=account
&action=addresstokennftinventory
&address=0x04c9874AC0D2d9a460Fe8057ed3818F1005538e2
&contractaddress=0x9e8ea82e76262e957d4cc24e04857a34b0d8f062
&page=1
&offset=100
&apikey=YourApiKeyToken
Query Parameters
the string
representing the address to check for inventory
the string
representing the ERC-721 token contractaddress to check for inventory
the integer
page number, if pagination is enabled
the number of records displayed per page
limited to 1000 records per query, use the page
parameter for subsequent records
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"TokenAddress": "0x9e8ea82e76262e957d4cc24e04857a34b0d8f062",
"TokenId": "11439"
},
{
"TokenAddress": "0x9e8ea82e76262e957d4cc24e04857a34b0d8f062",
"TokenId": "11472"
}
]
}