# TradeOS Get Market Candles

> TradeOS Get Market Candles is a paid API for AI agents from ai.tradeos.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-18).

Retrieve historical OHLCV (open/high/low/close/volume) candlestick data for a stock, ETF, forex pair, commodity, or crypto ticker — including two-ticker spreads.

## Facts

- Endpoint: POST https://ai.tradeos.xyz/api/x402/get_market_candles?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tradeos-get-market-candles-6a73f1a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YbVfxlzu6QttThApA20Bq

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 tradeos-get-market-candles-6a73f1a4 -d '<json body>'
```

Example prompt: Pull the last 200 daily OHLCV candles for BTCUSD (X:BTCUSD) on TradeOS, going back from now.

## When to prefer this

Use this endpoint when you need historical price bars (OHLCV) for backtesting, charting, or time-series analysis across equities, ETFs, forex, metals, or crypto. It supports two-ticker spread queries which is rare. Pair with get_market_snapshot for the latest price and get_market_technical_analysis for pre-computed chart signals. Prefer this over snapshot endpoints when you need multiple historical bars rather than a single current price.

## Known failure modes

- Invalid ticker format — FX/metals must use C: prefix, crypto must use X: prefix
- startTime or endTime out of valid range (exceeds 9999999999 or negative)
- Limit exceeds 1000 or is below 1
- Unsupported interval value not in allowed enum
- Ticker not found or no data for specified time range
- Payment failure — $0.02 USDC not provided or rejected

## How this service works

Retrieve historical OHLCV candles for an instrument or two-ticker spread. Returns up to 1000 bars per paid request, with UTC timestamps in seconds and data-delay information. Use search_tickers to find a ticker, get_market_snapshot for its latest market data, and get_market_technical_analysis for chart analysis of the same ticker. Popular examples include AAPL, SPY, gold XAUUSD (C:XAUUSD), EURUSD (C:EURUSD), BTCUSD (X:BTCUSD), and ETHUSD (X:ETHUSD). FX/metals require C:; crypto requires X:.

## Output

Returns up to 1000 OHLCV bars for the requested instrument or two-ticker spread. Each bar includes open, high, low, close, and volume values with a UTC Unix timestamp in seconds, plus data-delay information indicating how fresh the data is.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "default": 100,
   "maximum": 1000,
   "minimum": 1
  },
  "ticker": {
   "type": "string",
   "pattern": "^[A-Za-z0-9._:]{1,64}(?:\\s*[/-]\\s*[A-Za-z0-9._:]{1,64})?$",
   "description": "AAPL, C:EURUSD, X:BTCUSD, or a two-ticker ratio/difference"
  },
  "endTime": {
   "type": "integer",
   "maximum": 9999999999,
   "description": "Exclusive UTC Unix timestamp in seconds; defaults to now",
   "exclusiveMinimum": 0
  },
  "interval": {
   "enum": [
    "1",
    "5",
    "15",
    "30",
    "60",
    "240",
    "1D",
    "1W",
    "4W",
    "1m",
    "5m",
    "15m",
    "30m",
    "1h",
    "4h"
   ],
   "type": "string"
  },
  "startTime": {
   "type": "integer",
   "maximum": 9999999999,
   "minimum": 0,
   "description": "Inclusive UTC Unix timestamp in seconds"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tradeos-get-market-candles-6a73f1a4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai.tradeos.xyz](https://www.zero.xyz/host/ai.tradeos.xyz/llms.txt)
