curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimateimport requests
url = "https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate', 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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate",
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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate"
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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate")
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{
"next_funding_time": "2023-11-07T05:31:56Z",
"market_ticker": "<string>",
"computed_time": "2023-11-07T05:31:56Z",
"funding_rate": 123,
"mark_price": "0.5600",
"premium_index": "<string>",
"premium_index_ts": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}Get Funding Rate Estimate
Returns the estimated funding rate for the current, in-progress funding period. The value is a time-weighted average of the premium index computed over [last_funding_time, now), so it continues to move as new data accumulates through the window and is only finalized at next_funding_time.
Funding measures the premium over clock-aligned bars of one second or longer, depending on the market. The returned premium_index is the premium of the final bar evaluated by this estimate, captured from the same calculation inputs. Its observation timestamp can lag the computation time when input feeds are delayed. It is omitted when that bar has no available premium. The estimate remains provisional until funding is finalized.
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimateimport requests
url = "https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate', 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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate",
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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate"
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://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/margin/funding_rates/estimate")
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{
"next_funding_time": "2023-11-07T05:31:56Z",
"market_ticker": "<string>",
"computed_time": "2023-11-07T05:31:56Z",
"funding_rate": 123,
"mark_price": "0.5600",
"premium_index": "<string>",
"premium_index_ts": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}Response
Funding rate estimate retrieved successfully