# Crypto OHLC Candlestick Data API

> Crypto OHLC Candlestick Data API is a paid API for AI agents from market-data-x402-5wh8-ivory.vercel.app, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Returns OHLC (open/high/low/close) candlestick price data for a cryptocurrency over a specified time period

## Facts

- Endpoint: GET https://market-data-x402-5wh8-ivory.vercel.app/api/crypto/ohlc
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-ohlc-candlestick-data-api-feb3a2b2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YiszUDJrduzoLGPrPIIMU

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 crypto-ohlc-candlestick-data-api-feb3a2b2
```

Example prompt: Can you pull the OHLC candlestick data for Bitcoin over the last 30 days so I can analyze the price trend?

## When to prefer this

Choose this endpoint when you need structured OHLC candlestick price data for cryptocurrencies for charting or technical analysis, especially when you require historical data across standard time windows (1, 7, 14, 30, 90, 180, 365 days, or max). It is well-suited for agents automating trading strategies, portfolio analytics dashboards, or financial research workflows that consume candle-format price data.

## Known failure modes

- Invalid cryptocurrency ID returns empty candles array or error
- Unsupported 'days' value outside the allowed enum causes validation error
- Payment not provided or insufficient USDC results in HTTP 402 Payment Required
- Network or upstream data provider outage may return 5xx error
- Missing required query parameters 'id' or 'days' causes 400 Bad Request

## How this service works

Pay-per-request crypto &amp; stock market data for AI agents and developers, settled in USDC on Base via x402.

## Output

A JSON object containing the cryptocurrency ID and an array of OHLC candles, where each candle represents open, high, low, and close prices for a time interval within the requested period.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id",
      "days"
     ],
     "properties": {
      "id": {
       "type": "string"
      },
      "days": {
       "enum": [
        "1",
        "7",
        "14",
        "30",
        "90",
        "180",
        "365",
        "max"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "bitcoin",
  "candles": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-ohlc-candlestick-data-api-feb3a2b2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market-data-x402-5wh8-ivory.vercel.app](https://www.zero.xyz/host/market-data-x402-5wh8-ivory.vercel.app/llms.txt)
