curl --request GET \
--url https://api.example.com/api/graph/v1/chart/{symbol}import requests
url = "https://api.example.com/api/graph/v1/chart/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/chart/{symbol}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/chart/{symbol}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/chart/{symbol}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/chart/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/chart/{symbol}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"interval": "1m",
"period": "1d",
"candles": [
{
"time": "2023-11-07T05:31:56Z",
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123,
"id": "<string>",
"revision": 2,
"interval": "1m",
"finality": "forming",
"source_start": "2023-11-07T05:31:56Z",
"source_end": "2023-11-07T05:31:56Z",
"expected_minutes": 3,
"observed_minutes": 3,
"completeness": "complete",
"missing_minutes": [
"2023-11-07T05:31:56Z"
],
"source_revision": 2,
"ema9": 123,
"ema20": 123,
"sma50": 123,
"sma200": 123,
"vwap": 123,
"vw": 123
}
],
"warmup_count": 0,
"is_lookback": false,
"last_bar_time": "<string>",
"last_source_bar_time": "<string>",
"staleness_seconds": 123,
"data_status": "ok",
"source": "realtime_sip"
}Get OHLCV chart data for a symbol
Retrieve OHLCV candlestick data for charting.
Intervals
- 1m: 1-minute bars (from market_data_1min)
- 2m: canonical 2-minute bars (server-aggregated from revision-deduplicated 1-minute bars)
- 5m: 5-minute bars (from market_data_5min)
- 15m: 15-minute bars (from market_data_15min_cagg)
- 30m: 30-minute bars (aggregated on the fly from market_data_1min; hourly rollup only as emergency fallback, reported as interval=1h)
- 1h: Hourly bars (from market_data_1hour)
- 1d: Daily bars (from market_data_daily)
Periods
- 1d: Last 1 trading day
- 5d: Last 5 trading days
- 1m: Last 1 month
- 3m: Last 3 months
- 6m: Last 6 months
- 1y: Last 1 year
curl --request GET \
--url https://api.example.com/api/graph/v1/chart/{symbol}import requests
url = "https://api.example.com/api/graph/v1/chart/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/chart/{symbol}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/chart/{symbol}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/chart/{symbol}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/chart/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/chart/{symbol}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"interval": "1m",
"period": "1d",
"candles": [
{
"time": "2023-11-07T05:31:56Z",
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123,
"id": "<string>",
"revision": 2,
"interval": "1m",
"finality": "forming",
"source_start": "2023-11-07T05:31:56Z",
"source_end": "2023-11-07T05:31:56Z",
"expected_minutes": 3,
"observed_minutes": 3,
"completeness": "complete",
"missing_minutes": [
"2023-11-07T05:31:56Z"
],
"source_revision": 2,
"ema9": 123,
"ema20": 123,
"sma50": 123,
"sma200": 123,
"vwap": 123,
"vw": 123
}
],
"warmup_count": 0,
"is_lookback": false,
"last_bar_time": "<string>",
"last_source_bar_time": "<string>",
"staleness_seconds": 123,
"data_status": "ok",
"source": "realtime_sip"
}Path Parameters
Query Parameters
Candle interval
1m, 2m, 5m, 15m, 30m, 1h, 1d Time period
1d, 5d, 1m, 3m, 6m, 1y, 5y Session filter: 'regular' for RTH only
all, regular Extra bars for indicator warmup
0 <= x <= 250Comma-separated indicators to compute server-side: ema9,ema20,sma50,sma200,vwap
Response
Chart data retrieved successfully
Response model for chart data.
Stock symbol
Candle interval
1m, 2m, 5m, 15m, 30m, 1h, 1d Time period
1d, 5d, 1m, 3m, 6m, 1y, 5y OHLCV candle data
Show child attributes
Show child attributes
Number of leading bars that are warmup data for indicator computation
True when the requested window contained no fresh data. When True with an empty candles array, the underlying data is stale (see staleness_seconds) and was intentionally withheld rather than silently served.
ISO timestamp of the most recent bar available for the symbol
ISO timestamp of the latest source minute included in the final returned candle. For rolled intraday candles this differs from bucket-start last_bar_time.
Seconds between now and the most recent bar available for the symbol. Populated whenever is_lookback is True; None for fresh responses.
High-level data status. 'ok' = fresh bars returned. 'stale' = no fresh bars in the requested window, refused on fail-closed policy (see staleness_seconds). 'no_data' = no bars available for this symbol at all.
ok, stale, no_data Market-data feed source label (entitlement layer). 'realtime_sip' = real-time SIP bars (entitled caller). 'delayed' = upper time bound clamped to now - 15m for non-entitled callers per SIP redistribution policy. 'byok' = served under the user's own Alpaca data entitlement.