Actions19
- Block Actions
- DeFi Actions
- NFT Actions
- Token Actions
- Transaction Actions
- Wallet Actions
Token → Get Token Price
AI-generatedOverview
This node interacts with the Moralis Web3 API to fetch the current price of a specified token on a selected blockchain. It is useful for applications that need real-time token price data, such as portfolio trackers, trading bots, or financial dashboards. For example, a user can input a token contract address and select the blockchain (e.g., Ethereum, Polygon) to retrieve the latest price information of that token.
Use Case Examples
- Retrieve the current price of a specific ERC20 token on the Ethereum blockchain by providing its contract address.
- Get the price of a token on the Polygon network to display in a DeFi dashboard.
Properties
| Name | Meaning |
|---|---|
| Chain | The blockchain network to query for the token price (e.g., Ethereum, BSC, Polygon). |
| Token Address | The contract address of the token for which the price is requested. |
| Additional Fields | Optional parameters to customize the request, including limit, cursor for pagination, whether to include metadata, and the number format (decimal or hex). |
Output
JSON
price- The current price of the token.currency- The currency in which the price is denominated.timestamp- The timestamp when the price data was retrieved.operation- The operation performed, here it is 'getTokenPrice'.resource- The resource type, here it is 'token'.chain- The blockchain network queried for the token price.
Dependencies
- Moralis Web3 API
- An API key credential for Moralis
Troubleshooting
- Ensure the token contract address is correct and valid on the selected blockchain.
- Verify that the API key credential for Moralis is correctly configured and has the necessary permissions.
- Check network connectivity and that the Moralis API endpoint is reachable.
- If the response is empty or 'No data found', confirm that the token exists and is supported on the selected chain.
Links
- Moralis Web3 API - Get Token Price - Official documentation for the Moralis API endpoint to get token price.