Tokens in a contract
Fetch all unique tokens in a particular ERC20/721/1155 contract, including total supplies
Fetches token supplies and metadata for any ERC20, ERC721, ERC1155 contract.This query is helpful to render all tokens in a token contract, or to query the total token supplies. In this example, we use the Skyweaver token contract address 0x631998e91476DA5B870D741192fc5Cbc55F5a52E on the Polygon network. You may query any contract address on any of the supported networks (but make sure to query the indexer of the corresponding network).
Sequence Indexer GetTokenSupplies
Method:
- Request: POST /rpc/Indexer/GetTokenSupplies
- Content-Type: application/json
- Body (in JSON):
contractAddress
(string) -- a ERC20 / ERC721 / ERC1155 contract addressincludeMetadata
(boolean - optional - default: false) -- toggle token metadata to be included in the responsemetadataOptions
(object - optional) -- additional options for metadataverifiedOnly
(boolean - optional) -- return only contracts which are 'verified' to help reduce spamincludeContracts
([]string - optional) -- list of specific contract addresses to always be included, even if verifiedOnly is enabled.
Example:
GetTokenSupplies
of Skyweaver contract on Polygon using an AQAAAAAAAF_JvPALhBthL7VGn6jV0YDqaFY
cURL
curl -X POST -H "Content-Type: application/json" -H "X-Access-Key: AQAAAAAAAF_JvPALhBthL7VGn6jV0YDqaFY" https://polygon-indexer.sequence.app/rpc/Indexer/GetTokenSupplies -d '{ "contractAddress": "0x631998e91476DA5B870D741192fc5Cbc55F5a52E", "includeMetadata": true }'