Get OHLC Time Series
twelvedata_get_time_seriesRetrieve historical OHLC candlestick data for any trading symbol. Supports multiple timeframes from 1-minute to monthly for chart analysis and backtesting.
Instructions
Get historical OHLC (Open, High, Low, Close) candlestick data.
Perfect for chart analysis, backtesting, and historical price research. Supports multiple timeframes from 1-minute to monthly data.
Args:
symbol (string): Trading symbol
interval (string): Candle interval - "1min", "5min", "15min", "30min", "1h", "4h", "1day", "1week", "1month"
outputsize (number): Number of candles to return (1-5000, default: 30)
start_date (string, optional): Start date YYYY-MM-DD
end_date (string, optional): End date YYYY-MM-DD
response_format ('markdown' | 'json'): Output format
Returns: Array of OHLC candles with datetime, open, high, low, close, and volume (where applicable).
Examples:
"Get 1-hour gold candles" -> symbol: "XAU/USD", interval: "1h"
"Daily EURUSD last 100 days" -> symbol: "EUR/USD", interval: "1day", outputsize: 100
"5-minute BTC data" -> symbol: "BTC/USD", interval: "5min"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol for time series data | |
| end_date | No | End date for historical data (YYYY-MM-DD) | |
| interval | No | Candle interval (1min, 5min, 15min, 30min, 1h, 4h, 1day, 1week) | 1day |
| outputsize | No | Number of data points to return (1-5000, default: 30) | |
| start_date | No | Start date for historical data (YYYY-MM-DD) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |