Actions19
- Block Actions
- DeFi Actions
- NFT Actions
- Token Actions
- Transaction Actions
- Wallet Actions
Token → Get Token Metadata
AI-generatedOverview
This node interacts with the Moralis Web3 API to retrieve metadata for a specified token on a selected blockchain. It is useful for obtaining detailed information about a token contract, such as its name, symbol, decimals, and other metadata. This can be applied in scenarios like blockchain analytics, portfolio tracking, or token information display in decentralized applications.
Use Case Examples
- Retrieve metadata for an Ethereum-based ERC20 token by providing its contract address and selecting the Ethereum chain.
- Query token metadata on Polygon or Binance Smart Chain by selecting the respective chain and entering the token contract address.
Properties
| Name | Meaning |
|---|---|
| Chain | The blockchain network to query for the token metadata, e.g., Ethereum, Polygon, BSC. |
| Token Address | The contract address of the token to retrieve metadata for. This is a required field. |
| Additional Fields | Optional parameters to customize the request, including limit, cursor for pagination, whether to include metadata, and number format (decimal or hex). |
Output
JSON
name- The name of the token.symbol- The symbol or ticker of the token.decimals- The number of decimals the token uses.address- The contract address of the token.logo- URL to the token's logo image, if available.operation- The operation performed, here 'getTokenMetadata'.resource- The resource type, here 'token'.chain- The blockchain network queried.timestamp- The timestamp when the data was retrieved.
Dependencies
- Moralis Web3 API
- An API key credential for Moralis
Troubleshooting
- Ensure the token contract address is correct and corresponds to the selected blockchain network.
- Verify that the Moralis API key credential is valid and has sufficient permissions.
- If no data is returned, check if the token exists on the specified chain or if the API endpoint is temporarily unavailable.
- Common error messages include network errors, invalid API key, or rate limiting by the Moralis API. Resolving these involves checking network connectivity, API key validity, and possibly upgrading the API plan.
Links
- Moralis Token Metadata API - Official Moralis documentation for the token metadata endpoint.