# CoinGecko OnChain Pool OHLCV

> CoinGecko OnChain Pool OHLCV is a paid API for AI agents from stablecrypto.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Fetches OHLCV (open, high, low, close, volume) candlestick chart data for a specific on-chain liquidity pool

## Facts

- Endpoint: POST https://stablecrypto.dev/api/coingecko/onchain/pool/ohlcv
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coingecko-onchain-pool-ohlcv-a2be7f3c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YyHeb29QwuVd-SclKwIAT

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-onchain-pool-ohlcv-a2be7f3c -d '<json body>'
```

Example prompt: Get me the last 100 hourly OHLCV candles for the Uniswap v3 pool at 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640 on Ethereum mainnet, priced in USD for the base token.

## When to prefer this

Use this endpoint when you need candlestick/OHLCV price history for a specific on-chain DEX liquidity pool by contract address, especially when you want flexible timeframe granularity (minute/hour/day) and currency denomination options. Prefer this over generic token price endpoints when working with pool-level data from GeckoTerminal-indexed networks.

## Known failure modes

- Invalid or unsupported network ID returns error or empty data
- Pool contract address not found on the specified network returns empty or error response
- Unsupported timeframe or aggregate value may return validation error
- before_timestamp in wrong format may cause query failure
- Exceeding API rate limits or payment failure returns 402 or rate limit error

## How this service works

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

## Output

Returns an object with a 'data' field containing OHLCV candlestick records for the specified pool, including open, high, low, close prices and volume values aggregated over the requested timeframe and period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "number",
   "description": "Number of results"
  },
  "token": {
   "type": "string",
   "description": "Token side (e.g. \"base\", \"quote\")"
  },
  "address": {
   "type": "string",
   "description": "Pool contract address"
  },
  "network": {
   "type": "string",
   "description": "Network ID"
  },
  "currency": {
   "type": "string",
   "description": "Price currency (e.g. \"usd\", \"token\")"
  },
  "aggregate": {
   "type": "string",
   "description": "Aggregate period"
  },
  "timeframe": {
   "type": "string",
   "description": "Timeframe (e.g. \"day\", \"hour\", \"minute\")"
  },
  "before_timestamp": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coingecko-onchain-pool-ohlcv-a2be7f3c/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)
