Get Candles
curl --request GET \
--url https://api.polyquantlab.com/v1/candles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.polyquantlab.com/v1/candles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polyquantlab.com/v1/candles', 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.polyquantlab.com/v1/candles",
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.polyquantlab.com/v1/candles"
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.polyquantlab.com/v1/candles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyquantlab.com/v1/candles")
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{
"market_id": "0x4a8f31...c2",
"timeframe": "5m",
"count": 2,
"candles": [
{
"ts": "2026-06-06T03:55:00+00:00",
"open": 0.5,
"high": 0.62,
"low": 0.49,
"close": 0.61,
"volume": 3210.5,
"trade_count": 47
},
{
"ts": "2026-06-06T04:00:00+00:00",
"open": 0.61,
"high": 0.83,
"low": 0.6,
"close": 0.82,
"volume": 5640.2,
"trade_count": 84
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Snapshots & candles
Get Candles
OHLC candles for one market at the requested timeframe.
Backed by a ClickHouse AggregatingMergeTree materialized view per timeframe (see db/migrations/001_candles.sql). Reading uses the *Merge combinators to collapse partial aggregates.
GET
/
v1
/
candles
Get Candles
curl --request GET \
--url https://api.polyquantlab.com/v1/candles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.polyquantlab.com/v1/candles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polyquantlab.com/v1/candles', 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.polyquantlab.com/v1/candles",
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.polyquantlab.com/v1/candles"
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.polyquantlab.com/v1/candles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyquantlab.com/v1/candles")
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{
"market_id": "0x4a8f31...c2",
"timeframe": "5m",
"count": 2,
"candles": [
{
"ts": "2026-06-06T03:55:00+00:00",
"open": 0.5,
"high": 0.62,
"low": 0.49,
"close": 0.61,
"volume": 3210.5,
"trade_count": 47
},
{
"ts": "2026-06-06T04:00:00+00:00",
"open": 0.61,
"high": 0.83,
"low": 0.6,
"close": 0.82,
"volume": 5640.2,
"trade_count": 84
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Examples:
"5m"
"15m"
"1h"
"4h"
"24h"
Required range:
x <= 10000