Tokens API
Fetches list of ERC20, ERC721 and ERC1155 tokens and metadata in any wallet.
Sequence Indexer GetTokenBalances
Method:
- Request: POST /rpc/Indexer/GetTokenBalances
- Content-Type: application/json
- Body (in JSON):
accountAddress
(string) -- the wallet account 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.
includeCollectionTokens
(boolean - optional - default: true) -- toggle to represent ERC721 / ERC1155 tokens as a single summary item in the response
Curl
curl -X POST -H "Content-Type: application/json" -H "X-Access-Key: AQAAAAAAAF_JvPALhBthL7VGn6jV0YDqaFY" https://polygon-indexer.sequence.app/rpc/Indexer/GetTokenBalances -d '{ "accountAddress": "0x8e3E38fe7367dd3b52D1e281E4e8400447C8d8B9", "includeMetadata": true }'
Fetch token IDs, balances and metadata of ERC721 and ERC1155 collections.
Sequence Indexer GetTokenBalances
Method:
- Request: POST /rpc/Indexer/GetTokenBalances
- Content-Type: application/json
- Body (in JSON):
accountAddress
(string) -- the wallet account addresscontractAddress
(string) -- the contract address of the ERC721 / ERC1155 collectionincludeMetadata
(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:
GetTokenBalances
of a contract + account address on Polygon using an PROJECT_ACCESS_KEY
Curl
curl -X POST -H "Content-Type: application/json" -H "X-Access-Key: PROJECT_ACCESS_KEY" https://polygon-indexer.sequence.app/rpc/Indexer/GetTokenBalances -d '{ "contractAddress": "0x631998e91476DA5B870D741192fc5Cbc55F5a52E", "accountAddress": "0x8e3E38fe7367dd3b52D1e281E4e8400447C8d8B9", "includeMetadata": true }'