CoinGecko API icon

CoinGecko API

Accède aux données de cryptomonnaies via l'API CoinGecko - Prix, marchés, historiques

Get Coin Contract Market Chart Range

AI-generated

Overview

This node operation retrieves the market chart data of a cryptocurrency token by its contract address on a specified asset platform over a defined date range. It is useful for analyzing the historical price and market trends of tokens on blockchains such as Ethereum. For example, users can fetch the price chart of a token from January 1, 2023, to March 1, 2023, in USD to study its market performance during that period.

Use Case Examples

  1. Fetch the market chart range for an Ethereum token by providing the asset platform ID 'ethereum', the token's contract address, the start date, the end date, and the reference currency (e.g., USD).
  2. Analyze the price trends of a token on Binance Smart Chain by specifying the appropriate asset platform ID and contract address with a custom date range.

Properties

Name Meaning
Asset Platform ID The identifier of the blockchain platform where the token contract is deployed (e.g., 'ethereum'). This is required to specify the platform context for the token.
Contract Address The smart contract address of the token whose market chart data is to be retrieved. This uniquely identifies the token on the specified platform.
From Date The start date of the date range for which the market chart data is requested. It should be provided as a Unix timestamp.
To Date The end date of the date range for which the market chart data is requested. It should be provided as a Unix timestamp.
VS Currency The reference currency in which the market data prices are expressed (e.g., USD, EUR, BTC).

Output

JSON

  • prices - Array of price points over the specified date range, each containing a timestamp and price value.
  • market_caps - Array of market capitalization data points over the specified date range.
  • total_volumes - Array of total volume data points over the specified date range.

Dependencies

  • CoinGecko public API

Troubleshooting

  • Ensure the 'Asset Platform ID' and 'Contract Address' are correctly specified; incorrect values will result in API errors or empty data.
  • The 'From Date' and 'To Date' must be valid date strings convertible to Unix timestamps; invalid dates will cause request failures.
  • The CoinGecko API has rate limits; excessive requests may lead to temporary blocking or errors.
  • If the token contract is not recognized by CoinGecko, the response may be empty or an error may be returned.

Links

Discussion