# TradeSonar Candlestick OHLCV Data

> TradeSonar Candlestick OHLCV Data is a paid API for AI agents from api.tradesonar.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Returns historical OHLCV candlestick data for a market ticker at resolutions from 1 minute to 1 day

## Facts

- Endpoint: GET https://api.tradesonar.io/v1/markets/:ticker/candles?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tradesonar-candlestick-ohlcv-data-c1625936
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GusOm1Yh9K44y90RqPuju

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 tradesonar-candlestick-ohlcv-data-c1625936
```

Example prompt: Pull the last 200 one-hour candles for ETH-USD from TradeSonar so I can run a technical analysis on recent price action.

## When to prefer this

Use this endpoint when you need structured OHLCV candlestick price history for a crypto market at minute-to-day granularity, especially for technical analysis, chart rendering, or strategy backtesting. Prefer this over tick-level or trade-level data when you need aggregated price buckets rather than individual fills. Not suitable for sub-minute data needs.

## Known failure modes

- Invalid or unsupported ticker returns an error — use /v1/markets to discover valid tickers (e.g. ETH-USD, not ETH-USDT)
- Sub-minute resolution requested returns an error — minimum resolution is 1MIN
- limit out of range (below 1 or above 1000) returns a validation error
- Invalid ISO8601 format for from or to parameters returns a parsing error
- Payment failure or insufficient USDC balance prevents the request from completing
- Requesting a time range with no data (e.g. future dates or pre-listing dates) may return an empty array

## How this service works

Candlesticks (1-minute minimum; no sub-minute)

## Output

An array of candlestick (OHLCV) records for the requested market and resolution, each containing open, high, low, close prices and volume for the time bucket, ordered chronologically. The number of records is capped at the requested limit (default 200, max 1000).

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "ticker"
     ],
     "properties": {
      "ticker": {
       "type": "string",
       "description": "Market ticker, e.g. ETH-USD (NOT ETH-USDT). See /v1/markets for valid tickers."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "to": {
       "type": "string",
       "description": "End time, ISO8601 (optional)"
      },
      "from": {
       "type": "string",
       "description": "Start time, ISO8601 e.g. 2026-10-01T00:00:00Z (optional)"
      },
      "limit": {
       "type": "integer",
       "default": 200,
       "maximum": 1000,
       "minimum": 1,
       "description": "Max candles to return, 1-1000"
      },
      "resolution": {
       "type": "string",
       "default": "1MIN",
       "description": "Candle size: 1MIN/5MINS/15MINS/30MINS/1HOUR/4HOURS/1DAY (no sub-minute)"
      }
     }
    }
   },
   "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/tradesonar-candlestick-ohlcv-data-c1625936/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradesonar.io](https://www.zero.xyz/host/api.tradesonar.io/llms.txt)
