Get funding rate for all markets
curl --request GET \
--url https://api.orderly.org/v1/public/market_info/funding_historyimport requests
url = "https://api.orderly.org/v1/public/market_info/funding_history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.orderly.org/v1/public/market_info/funding_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.orderly.org/v1/public/market_info/funding_history",
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/market_info/funding_history"
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/market_info/funding_history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/public/market_info/funding_history")
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": {
"rows": [
{
"symbol": "PERP_BTC_USDC",
"data_start_time": "2022-01-01 00:00:00",
"funding": {
"last": {
"rate": 0.00234,
"positive": 1,
"negative": 0
},
"1d": {
"rate": -0.00828,
"positive": 10,
"negative": 10
},
"3d": {
"rate": -0.00412,
"positive": 9,
"negative": 11
},
"7d": {
"rate": 0.00012,
"positive": 8,
"negative": 12
},
"14d": {
"rate": 0.00156,
"positive": 7,
"negative": 13
},
"30d": {
"rate": 0.00345,
"positive": 6,
"negative": 14
},
"90d": {
"rate": 0.01023,
"positive": 5,
"negative": 15
},
"180d": {
"rate": 0.01567,
"positive": 4,
"negative": 16
}
}
}
]
},
"timestamp": 1702989203989
}Funding rates
Get funding rate for all markets
Limit: 10 requests per 1 second per IP address
GET /v1/public/market_info/funding_history
GET
/
v1
/
public
/
market_info
/
funding_history
Get funding rate for all markets
curl --request GET \
--url https://api.orderly.org/v1/public/market_info/funding_historyimport requests
url = "https://api.orderly.org/v1/public/market_info/funding_history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.orderly.org/v1/public/market_info/funding_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.orderly.org/v1/public/market_info/funding_history",
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/market_info/funding_history"
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/market_info/funding_history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/public/market_info/funding_history")
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": {
"rows": [
{
"symbol": "PERP_BTC_USDC",
"data_start_time": "2022-01-01 00:00:00",
"funding": {
"last": {
"rate": 0.00234,
"positive": 1,
"negative": 0
},
"1d": {
"rate": -0.00828,
"positive": 10,
"negative": 10
},
"3d": {
"rate": -0.00412,
"positive": 9,
"negative": 11
},
"7d": {
"rate": 0.00012,
"positive": 8,
"negative": 12
},
"14d": {
"rate": 0.00156,
"positive": 7,
"negative": 13
},
"30d": {
"rate": 0.00345,
"positive": 6,
"negative": 14
},
"90d": {
"rate": 0.01023,
"positive": 5,
"negative": 15
},
"180d": {
"rate": 0.01567,
"positive": 4,
"negative": 16
}
}
}
]
},
"timestamp": 1702989203989
}⌘I