# 2s.io DEX OHLCV Candlestick Data

> 2s.io DEX OHLCV Candlestick Data is a paid API for AI agents from 2s.io, paid per call via x402, $0.0036/call, status unknown (last checked 2026-09-15).

Fetches OHLCV (open/high/low/close/volume) candlestick bars for a specific decentralized exchange pool, sourced from GeckoTerminal, for on-chain technical analysis.

## Facts

- Endpoint: GET https://2s.io/api/crypto/dex-ohlcv
- Price: $0.0036/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-dex-ohlcv-candlestick-data-c989a187
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_spzHD2yh2Q5p0ZClPMB5R

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 2s-io-dex-ohlcv-candlestick-data-c989a187
```

Example prompt: Pull the last 200 hourly OHLCV candles for the Uniswap ETH/USDC pool at address 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 on Ethereum so I can run some technical analysis on it.

## When to prefer this

Use this endpoint when you need historical OHLCV price and volume data for a specific on-chain DEX liquidity pool for charting or technical analysis. It is free/keyless (no API key required) and proxies GeckoTerminal data. Best used after identifying the pool address via a pool-discovery endpoint. Prefer this over CEX OHLCV endpoints when the token you need only trades on decentralized exchanges.

## Known failure modes

- Invalid or non-existent pool address returns an error or empty result
- Unsupported network slug causes a lookup failure
- Aggregate value out of range (must be 1–60) returns a validation error
- Limit exceeding 1000 returns a validation error
- Pool exists but has insufficient trading history for the requested range, returning fewer bars than requested
- GeckoTerminal upstream unavailability causes a timeout or 503 error

## How this service works

OHLCV candlesticks for a DEX pool (via GeckoTerminal, free/keyless). Pass network + pool address + timeframe (day/hour/minute) with optional aggregate (e.g. 4 = 4-hour) and limit. Returns time/open/high/low/close/volumeUsd bars for on-chain technical analysis. Pair with crypto.dex-pools / dex-token-pools to find a pool address.

## Output

Returns an array of OHLCV candlestick bars, each containing a Unix timestamp, open price, high price, low price, close price, and trading volume in USD, covering the requested timeframe and aggregate interval for the specified DEX pool.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "network",
      "address"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 1000,
       "minimum": 1
      },
      "address": {
       "type": "string",
       "maxLength": 120,
       "minLength": 1,
       "description": "Pool address (not token address)."
      },
      "network": {
       "type": "string",
       "maxLength": 40,
       "minLength": 1
      },
      "aggregate": {
       "type": "integer",
       "maximum": 60,
       "minimum": 1
      },
      "timeframe": {
       "enum": [
        "day",
        "hour",
        "minute"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-dex-ohlcv-candlestick-data-c989a187/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
