CoinGecko API icon

CoinGecko API

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

Get Coin OHLC

AI-generated

Overview

This node operation fetches OHLC (Open, High, Low, Close) data for a specified cryptocurrency from the CoinGecko API. It is useful for users who want to analyze historical price movements of a cryptocurrency over a certain number of days. For example, traders or analysts can use this data to study price trends and make informed decisions.

Use Case Examples

  1. Retrieve OHLC data for Bitcoin over the past 7 days to analyze its price fluctuations.
  2. Get OHLC data for Ethereum for the last 30 days to visualize market trends.

Properties

Name Meaning
Coin ID The identifier of the cryptocurrency for which OHLC data is requested. For example, 'bitcoin'.
Days The number of days of historical OHLC data to retrieve. Options include 1, 7, 14, 30, 90, 180, 365, or max (maximum available history).

Output

JSON

  • json - The OHLC data array containing open, high, low, and close prices for the specified cryptocurrency over the selected period.

Dependencies

  • CoinGecko public API

Troubleshooting

  • Ensure the Coin ID is valid and recognized by the CoinGecko API to avoid errors.
  • Verify the 'Days' parameter is set to one of the supported options to prevent request failures.
  • Handle API rate limits by implementing retry logic or reducing request frequency.
  • Common error messages include 'Operation not supported' if an invalid operation is selected, or network errors if the API is unreachable.

Links

Discussion