# Agent402 Perpetuals OHLCV Klines

> Agent402 Perpetuals OHLCV Klines is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns OHLCV candlestick data for perpetual futures contracts from Hyperliquid, with configurable interval and candle count.

## Facts

- Endpoint: POST https://agent402.tools/api/perp-klines
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-perpetuals-ohlcv-klines-1228ada8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RitUY6z9fZg6Fn9E2ko0C

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 agent402-perpetuals-ohlcv-klines-1228ada8 -d '<json body>'
```

Example prompt: Pull the last 24 hourly candles for ETH perp so I can see the recent price action — open, high, low, close, and volume for each candle.

## When to prefer this

Use this endpoint when you need historical or recent OHLCV candlestick data specifically for perpetual futures contracts sourced from Hyperliquid, paid per-call with no API key required. Prefer this over spot price feeds when you need structured candle arrays with interval flexibility (1m to 1M) and a built-in summary. Best for trading agents, technical analysis workflows, and volatility monitoring on perp markets.

## Known failure modes

- Invalid coin ticker returns an error or empty candle set
- Limit exceeding 500 is rejected or capped
- Unsupported interval string returns a validation error
- Hyperliquid data source unavailable causes a fetch failure
- Network timeout on large candle requests

## How this service works

OHLCV candles for one perpetual at any interval from 1 minute to 1 month, up to the venue's history, with a window summary of open, close, change, high, low and volume. Use it when an agent needs price history for a chart, a backtest or an indicator without an exchange account or API key.

## Output

Returns a JSON object with the ticker symbol, candle count, source (Hyperliquid), an array of OHLCV candles each containing open, high, low, close, timestamp, volume, and trade count, plus a summary with overall high, low, open, close, total volume, and percentage change over the requested period, along with the interval and fetch timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "coin": {
   "type": "string",
   "description": "Perp ticker, e.g. BTC, ETH, SOL."
  },
  "limit": {
   "type": "number",
   "description": "Candles to return (default 100, max 500)."
  },
  "interval": {
   "type": "string",
   "description": "Candle interval (default 1h): 1m 3m 5m 15m 30m 1h 2h 4h 8h 12h 1d 3d 1w 1M."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "coin": "ETH",
  "count": 24,
  "source": "hyperliquid",
  "candles": [
   {
    "c": 2429.3,
    "h": 2431,
    "l": 2415.5,
    "o": 2420.1,
    "t": "2026-08-22T11:00:00.000Z",
    "v": 1234.5,
    "trades": 8800
   }
  ],
  "summary": {
   "low": 2370.1,
   "high": 2440,
   "open": 2380.3,
   "close": 2429.3,
   "volume": 30000.2,
   "changePct": 2.06
  },
  "interval": "1h",
  "fetchedAt": "2026-08-22T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-perpetuals-ohlcv-klines-1228ada8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
