# CoinGecko OHLC Candlestick Data

> CoinGecko OHLC Candlestick Data is a paid API for AI agents from stablecrypto.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns OHLC (open, high, low, close) candlestick price data for a cryptocurrency over a specified time range against a target currency.

## Facts

- Endpoint: POST https://stablecrypto.dev/api/coingecko/ohlc
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coingecko-ohlc-candlestick-data-03040df3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-otjgDtkVgo3lJzzkv77o

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability coingecko-ohlc-candlestick-data-03040df3 -d '<json body>'
```

Example prompt: Can you get me the OHLC candlestick data for Bitcoin (coin ID: bitcoin) vs USD for the last 30 days so I can see its price action?

## When to prefer this

Use this endpoint when you need structured OHLC candlestick price history for a specific cryptocurrency for technical analysis, charting, or trading signal generation. Prefer this over simple price lookups when you need open/high/low/close granularity rather than just current or average price.

## Known failure modes

- Invalid coin ID returns an error or empty response
- Unsupported days value (not in 1,7,14,30,90,180,365) may return an error
- Unsupported vs_currency value returns an error
- Network or upstream CoinGecko API unavailability causes failure
- Payment failure if x402 micropayment is not properly handled

## How this service works

Pay-per-request access to CoinGecko, DefiLlama, Alchemy, and Etherscan APIs. No auth, no subscriptions.

## Output

An array of candlestick arrays, each containing [timestamp, open, high, low, close] price values for the specified coin and time range, suitable for charting or technical analysis.

## Example request

```json
{
 "id": "bitcoin",
 "days": "30",
 "vs_currency": "usd"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "description": "Coin ID"
  },
  "days": {
   "type": "string",
   "description": "Data range (1, 7, 14, 30, 90, 180, 365)"
  },
  "precision": {
   "type": "string"
  },
  "vs_currency": {
   "type": "string",
   "description": "Target currency"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coingecko-ohlc-candlestick-data-03040df3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablecrypto.dev](https://www.zero.xyz/host/stablecrypto.dev/llms.txt)
