Skip to content
Fourohtwo

ai.tradeos.xyz/api/x402/get_market_candles

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

BaseAnswering
POSThttps://ai.tradeos.xyz/api/x402/get_market_candles

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://ai.tradeos.xyz/api/x402/get_market_candles", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"interval":"1D","limit":100,"ticker":"AAPL"}),
});
console.log(await res.json());

Example input

{
  "interval": "1D",
  "limit": 100,
  "ticker": "AAPL"
}

More from TradeOS