OpenAny
Get API keyAPI Key
APICrypto & DeFi

coingecko logo
CoinGecko Coin OHLC Chart API

Get CoinGecko OHLC candles via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by CoinGecko, pass parameters such as days, vs_currency, and retrieve structured data including structured JSON records, identifiers, and response metadata for candlestick charts, and chart comparisons, ready for production pipelines and AI agent automation using a single OpenAny API key.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
0Selected implementation · last 30 days
Success rate · 30d
—No requests in this period
USE THIS API

CoinGecko Coin OHLC Chart API

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
API
Pricing
Connect your agent
On this page

Overview

Overview
CoinGecko Coin OHLC Chart API

CoinGecko Coin OHLC Chart API

Supply id, vs_currency and a days value from the supported enum. Each response row is ordered as timestamp, open, high, low and close. Timestamps use milliseconds, and this selected implementation exposes precision but no interval parameter.

Quick Facts

Fact Value
Access OpenAny REST
Authentication OpenAny API key in the Authorization header
Core inputs path: id; query: vs_currency, days, precision
Selected implementation coingecko · CoinGecko — Coin OHLC Chart by ID
Billing See the pricing area for the selected implementation and request options

What You Can Build

  • Candlestick charts: Render the four price values in their documented order.
  • Chart comparisons: Keep OHLC rows separate from point-price and volume series.

Documented Response Fields

Field Meaning
[] OHLC row: Unix timestamp in milliseconds, open, high, low, close

Quick Start

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
curl --request GET --get \
  https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/bitcoin/ohlc \
  -H "Authorization: Bearer ${OPENANY_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data-urlencode days=1 \
  --data-urlencode vs_currency=usd

Request and Response Examples

The response is an official documentation reference that may contain historical values or optional sections. The calling template is independent; match returned resource identifiers, timestamps and requested options before using the data.

Published CoinGecko Coin OHLC Chart API implementation contract.

Pricing and Billing

The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.

Frequently Asked Questions

View FAQ

Related APIs

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Coin ID. *refers to [`/coins/list`](/reference/coins-list).
Target currency of price data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).
Data up to number of days ago.
Decimal place for currency price value.

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
CoinGeckoCurrent
CoinGecko — Coin OHLC Chart by ID · GET · View API reference
$0 / call0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · CoinGeckoUSD / call
Unit price
$0

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.

calls

Total $0

API

Method
GET
Endpoint
https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/{id}/ohlc
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
idURL path parameterspathstringYes

Coin ID. *refers to [`/coins/list`](/reference/coins-list).

vs_currencyURL query parametersquerystringYes

Target currency of price data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).

daysURL query parametersquerystringYes

Data up to number of days ago.

enum: "1", "7", "14", "30", "90", "180", "365"

precisionURL query parametersquerystringNo

Decimal place for currency price value.

enum: "full", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"

Required markers inside a nested object or variant apply when that object or variant is used.

Response structure

Inferred from examples
responsenumber[][]

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Official example · Official response / contract request

Example from the provider's documentation. Field values in your results will differ.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 4

    Review these request fields before running. Keep the published provider and request method unchanged.

    id
    Coin ID. *refers to [`/coins/list`](/reference/coins-list).
    vs_currency
    Target currency of price data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).
    days
    Data up to number of days ago.
    precision
    Decimal place for currency price value.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/bitcoin/ohlc?days=1&vs_currency=usd' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    [
      [
        1779199200000,
        76769.0,
        76889.0,
        76744.0,
        76818.0
      ],
      [
        1779201000000,
        76712.0,
        76712.0,
        76321.0,
        76422.0
      ]
    ]

Common questions

Which days values are accepted?

Use one of the strings 1, 7, 14, 30, 90, 180 or 365. Unlike some market-chart endpoints, this contract does not accept max.

Does each row include trading volume?

No. The documented row contains timestamp and four price values. It is OHLC, not an OHLCV row.

Can I select hourly candles with interval?

This selected contract exposes id, vs_currency, days and precision only. Do not add an interval parameter from another implementation.

Are these values interchangeable with a daily chart snapshot?

No. Candle open/high/low/close and sampled chart observations describe different measurements. Keep the endpoint and time aggregation attached to the values.

Which API key should I use?

Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

Where can I check the current request price?

Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

Use CoinGecko Coin OHLC Chart API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.