curl --request GET \
--url https://api.orderly.org/v1/public/index_priceimport requests
url = "https://api.orderly.org/v1/public/index_price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.orderly.org/v1/public/index_price', 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.orderly.org/v1/public/index_price",
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.orderly.org/v1/public/index_price"
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.orderly.org/v1/public/index_price")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/public/index_price")
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{
"success": true,
"data": [
{
"timestamp": 123,
"index_price": 123
}
],
"timestamp": 1702989203989
}Get index price history
Limit: 10 requests per second per IP address
GET /v1/public/index_price
Returns a fixed 1-second-granularity array of index prices for the given symbol over the requested time range. This endpoint is public and does not require authentication.
The query window must fall within the last 24 hours, with start_t less than end_t, and end_t not later than the current time. A single query must span at least 1 second and at most 10 minutes; a window outside that range returns a parameter error instead of being clipped.
Returns only records that actually exist in the window, ordered ascending by timestamp; missing seconds are not backfilled and there is no guarantee of one record per second. Returns the earliest min(limit, 1000) records in the window. There is no pagination.
curl --request GET \
--url https://api.orderly.org/v1/public/index_priceimport requests
url = "https://api.orderly.org/v1/public/index_price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.orderly.org/v1/public/index_price', 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.orderly.org/v1/public/index_price",
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.orderly.org/v1/public/index_price"
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.orderly.org/v1/public/index_price")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/public/index_price")
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{
"success": true,
"data": [
{
"timestamp": 123,
"index_price": 123
}
],
"timestamp": 1702989203989
}Query Parameters
For example PERP_BTC_USDC. A syntactically valid symbol with no recorded data returns an empty array.
UTC epoch milliseconds, inclusive.
UTC epoch milliseconds, exclusive.
Positive integer. Default and maximum 1000.