Klines (OHLCV)
curl --request GET \
--url https://api.polynode.dev/v3/perps/klines/{instrument} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/perps/klines/{instrument}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.polynode.dev/v3/perps/klines/{instrument}', 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.polynode.dev/v3/perps/klines/{instrument}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.polynode.dev/v3/perps/klines/{instrument}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.polynode.dev/v3/perps/klines/{instrument}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/perps/klines/{instrument}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
[
1783735200000,
"63976",
"64120",
"63960",
"64117",
"2.91545",
514
],
[
1783738800000,
"64123",
"64123",
"64089",
"64112",
"1.4199599999999999",
274
]
],
"instrument_id": 6,
"more": false,
"symbol": "BTC-USD"
}Perps Market Data
Klines (OHLCV)
Candlestick data. interval = 1m,5m,15m,30m,1h,4h,6h,12h,1d,1w. start is optional (defaults to a sane window).
GET
/
v3
/
perps
/
klines
/
{instrument}
Klines (OHLCV)
curl --request GET \
--url https://api.polynode.dev/v3/perps/klines/{instrument} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/perps/klines/{instrument}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.polynode.dev/v3/perps/klines/{instrument}', 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.polynode.dev/v3/perps/klines/{instrument}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.polynode.dev/v3/perps/klines/{instrument}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.polynode.dev/v3/perps/klines/{instrument}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/perps/klines/{instrument}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
[
1783735200000,
"63976",
"64120",
"63960",
"64117",
"2.91545",
514
],
[
1783738800000,
"64123",
"64123",
"64089",
"64112",
"1.4199599999999999",
274
]
],
"instrument_id": 6,
"more": false,
"symbol": "BTC-USD"
}Candles are
1m and 1h candles stream live on
[open_time, open, high, low, close, volume, trade_count], oldest first, wrapped as {"instrument_id", "symbol", "data", "more"}.
Query parameters
| Parameter | Description |
|---|---|
interval | 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h, 1d, 1w (default 1h) |
start | Window start (Unix ms). Optional — defaults to limit candles ending now |
end | Window end (Unix ms) |
limit | Number of candles (default 100) |
perps_klines:<instrument>:<interval> — the current candle is pushed whenever it changes, and a candle is final once one with a later open_time arrives.Authorizations
Path Parameters
Instrument id (e.g. 6), symbol (BTC-USD), or bare asset (btc).
Query Parameters
Candle interval (default 1h).
Window start, Unix ms (optional).
Window end, Unix ms.
Max rows to return.
Response
200 - application/json
Success

