# Token OHLCV Candles API

> Token OHLCV Candles API is a paid API for AI agents from token-ohlcv.api.klymax402.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns historical OHLCV (open, high, low, close, volume) candlestick data for any token by CoinGecko ID or on-chain contract address

## Facts

- Endpoint: GET https://token-ohlcv.api.klymax402.com/api/candles
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-ohlcv-candles-api-e6916a0f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nd2n6s77tHMkGcsr2-ubs

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 token-ohlcv-candles-api-e6916a0f
```

Example prompt: Can you pull the daily OHLCV candles for Ethereum over the last 90 days using the CoinGecko token ID 'ethereum'?

## When to prefer this

Use this endpoint when you need historical OHLCV candlestick data for any token — whether a major coin by CoinGecko ID or a long-tail DeFi token by on-chain contract address across multiple chains including Base, Ethereum, Solana, Arbitrum, Polygon, Optimism, and BSC. Prefer this over generic price APIs when you need structured candlestick intervals (daily, 4h, 1h) for charting, backtesting, or price analysis.

## Known failure modes

- Invalid or unknown token ID returns an error or empty result
- Contract address provided without chain parameter causes lookup failure
- Requested interval not supported for the given number of days (e.g. 1h interval with more than 2 days) returns an error
- Unsupported blockchain network in chain parameter returns an error
- Exceeding the 365-day maximum history returns a validation error
- Payment not processed (x402 payment required) returns 402 status

## How this service works

Get historical OHLCV candles for any token by ID or contract address (POST variant)

## Output

Returns an array of OHLCV candlestick objects for the requested token, each containing timestamp, open, high, low, close, and volume values at the specified interval (daily, 4h, or 1h) over the requested time window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "days": {
       "type": "number",
       "description": "Number of days of history (default 30, max 365). For 1h interval max 2 days, for 4h max 90 days."
      },
      "chain": {
       "type": "string",
       "description": "Blockchain network for contract lookup: base, ethereum, solana, arbitrum, polygon, optimism, bsc."
      },
      "token": {
       "type": "string",
       "description": "CoinGecko token ID (e.g. bitcoin, ethereum, solana). Use this OR contract+chain."
      },
      "contract": {
       "type": "string",
       "description": "On-chain contract address (e.g. 0x...). Use with chain parameter for GeckoTerminal lookup."
      },
      "interval": {
       "type": "string",
       "description": "Candle interval: daily (default), 4h (if days <= 90), 1h (if days <= 2)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-ohlcv-candles-api-e6916a0f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from token-ohlcv.api.klymax402.com](https://www.zero.xyz/host/token-ohlcv.api.klymax402.com/llms.txt)
