Get the last N OHLC candles up to a given timestamp
curl --request GET \
--url https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt} \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}', 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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}",
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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}"
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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}")
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{
"data": [
{
"time": 123,
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123
}
],
"immutable": true,
"no_more": true
}trading
Get the last N OHLC candles up to a given timestamp
Returns up to 1000 OHLC candles in ascending order for a specific resolution up to the given specific timestamp. Use this for detailed price analysis at a chosen timeframe. Common resolutions: 60=1 min, 900=15 min, 3600=1 H, 14400=4 H, 86400=1 D. Pass the current ISO timestamp as dt to get the most recent candles.
GET
/
trading
/
chart
/
{ticker}
/
candles
/
{resolution}
/
{count}
/
{dt}
Get the last N OHLC candles up to a given timestamp
curl --request GET \
--url https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt} \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}', 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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}",
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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}"
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://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/chart/{ticker}/candles/{resolution}/{count}/{dt}")
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{
"data": [
{
"time": 123,
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123
}
],
"immutable": true,
"no_more": true
}Authorizations
JWT token obtained from authentication endpoints
Path Parameters
Trading symbol, for example XAUUSD, EURUSD, or BTCUSD.
Candle size in seconds, must be a multiple of 60. Common values: 60 (1 min), 3600 (1 H), 86400 (1 D).
Number of candles to return. Maximum 1000.
ISO-8601 upper-bound timestamp, for example 2025-06-01T00:00:00.000Z. Use the current datetime to retrieve the most recent candles.
Last modified on October 7, 2026
