Tools / Prices

Price history

get_ohlcv

Historical candles for one symbol as compact columns [time, open, high, low, close, volume] plus summary statistics (period return, high/low, average volume, annualized volatility, max drawdown). Set summary_only=true when you only need the statistics. Intraday intervals (1m–1h) are limited to recent ranges (1m: 7 days, 5m–30m: 60 days, 1h: 2 years).

Questions it answers

  • Chart the S&P 500's drawdown over the last year.
  • What was Apple's realized volatility over the last 30 days?

Parameters

ParameterDescription
symbolrequired
string
One symbol, e.g. 'NVDA', 'BTC', 'CL=F', '^GSPC'
interval
1m | 5m | 15m | 30m | 1h | 1d | 1wk | 1mo = "1d"
range
1d | 5d | 1mo | 3mo | 6mo | 1y | 2y | 5y | 10y | ytd | max = "3mo"
Lookback window; ignored when start is given
start
string
Start date YYYY-MM-DD (UTC)
end
string
End date YYYY-MM-DD (UTC), defaults to today
limit
integer = 300
Maximum candles returned (most recent kept)
summary_only
boolean = false

Use it from your agent

Add the TradingData MCP URL to Claude, ChatGPT, Cursor or any MCP client, then ask in plain words. The model sees this tool's description and calls it with the right parameters.

MCP server URL
https://mcp.tradingdata.io

More in Prices