from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.chart.get_history(symbol="AAPL", resolution=models.ChartResolution.SIXTY, from_=1672531200, to=1675209600, include_extended=False)
assert res.chart_bars is not None
# Handle response
print(res.chart_bars)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.chart.getHistory({
symbol: "AAPL",
resolution: "60",
from: 1672531200,
to: 1675209600,
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/chart/history \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/chart/history', 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.aries.com/v1/chart/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aries.com/v1/chart/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aries.com/v1/chart/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/chart/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"c": [
130.15,
130.89,
131.24
],
"h": [
130.28,
131.05,
131.37
],
"l": [
129.88,
130.09,
130.81
],
"nextTime": 1672542000,
"o": [
129.93,
130.15,
130.89
],
"s": "ok",
"t": [
1672531200,
1672534800,
1672538400
],
"v": [
1234567,
1345678,
1456789
]
}Historical Bars
Retrieves historical OHLCV (Open, High, Low, Close, Volume) price bars for a specified symbol across various timeframes. Returns time-series candlestick data essential for technical analysis, backtesting, and chart visualization.
Use Case: Build price charts, analyze historical trends, and perform technical analysis on stocks and securities with customizable time intervals.
from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.chart.get_history(symbol="AAPL", resolution=models.ChartResolution.SIXTY, from_=1672531200, to=1675209600, include_extended=False)
assert res.chart_bars is not None
# Handle response
print(res.chart_bars)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.chart.getHistory({
symbol: "AAPL",
resolution: "60",
from: 1672531200,
to: 1675209600,
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/chart/history \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/chart/history', 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.aries.com/v1/chart/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aries.com/v1/chart/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aries.com/v1/chart/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/chart/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"c": [
130.15,
130.89,
131.24
],
"h": [
130.28,
131.05,
131.37
],
"l": [
129.88,
130.09,
130.81
],
"nextTime": 1672542000,
"o": [
129.93,
130.15,
130.89
],
"s": "ok",
"t": [
1672531200,
1672534800,
1672538400
],
"v": [
1234567,
1345678,
1456789
]
}Authorizations
Query Parameters
Candle size. Use minute values such as 1, 5, or 60 for intraday charts, D or 1D for daily charts, W or 1W for weekly charts, and M, 1M, 3M, 6M, or 12M for monthly views.
How long each candle/bar on the chart should cover. Two families of values are supported:
Intraday (minute bars) — 1, 3, 5, 15, 30, 45, 60, 120, 180, 240 — the number is the bar's length in minutes (e.g. 5 = five-minute bars, 60 = hourly).
Daily and longer — D / 1D = daily, W / 1W = weekly, M / 1M = monthly, 3M / 6M / 12M = three-/six-/twelve-month bars.
For tick-based bars (bars that close every N trades instead of every N minutes), use Tick-Based Chart Data instead — tick resolutions are also accepted here; use tick-history for countback and cursor pagination.
1, 3, 5, 15, 30, 45, 60, 120, 180, 240, D, W, M, 1D, 1W, 1M, 3M, 6M, 12M, 1T, 5T, 10T, 25T, 50T, 100T, 250T, 500T, 1000T "D"
Response
Historical bars in TradingView UDF format. Check s: ok = data in t, o, h, l, c, v; no_data = no bars; error = provider or processing error. Invalid query parameters or time ranges return HTTP 400.
Historical chart data returned as parallel arrays. Values at the same index belong to the same bar, so t[0], o[0], h[0], l[0], c[0], and v[0] describe one candle.
Was this page helpful?