curl --request GET \
--url https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata', 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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata",
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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata"
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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata")
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{
"asset_class": "Crypto",
"base_tail_percentile": 123,
"funding_tail_percentile": 123,
"matrices": {
"hvar": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"apc": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"aug": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"funding": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
}
},
"liquidation_configs": [
{
"market_ticker": "<string>",
"market_impact_volatility": 123,
"market_impact_coefficient": 123,
"market_impact_exponent": 123,
"market_impact_forecasted_volume": 123,
"spread_rate": 123
}
],
"subgroups": [
[
"<string>"
]
]
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}Get Maintenance Margin Metadata
Inputs to the maintenance margin calculation for an asset class.
curl --request GET \
--url https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata', 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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata",
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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata"
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.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/margin/estimate_maintenance_margin/metadata")
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{
"asset_class": "Crypto",
"base_tail_percentile": 123,
"funding_tail_percentile": 123,
"matrices": {
"hvar": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"apc": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"aug": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
},
"funding": {
"market_tickers": [
"<string>"
],
"returns": [
[
123
]
]
}
},
"liquidation_configs": [
{
"market_ticker": "<string>",
"market_impact_volatility": 123,
"market_impact_coefficient": 123,
"market_impact_exponent": 123,
"market_impact_forecasted_volume": 123,
"spread_rate": 123
}
],
"subgroups": [
[
"<string>"
]
]
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}Authorizations
Pass Authorization: Bearer <admin_user_id>:<access_token> on each request.
Query Parameters
Asset class of the margin markets covered by this entry.
Crypto Return the matrices calibrated on this Eastern-time day (YYYY-MM-DD), the liquidation parameters in effect at the end of that day, and the current subgroups of the markets they cover for the caller. Returns 404 if no matrices were calibrated that day.
Response
Successful response
Asset class of the margin markets covered by this entry.
Crypto Lower-tail percentile of the scenario P&L distribution used for the base margin.
Lower-tail percentile of the scenario P&L distribution used for the funding margin.
Show child attributes
Show child attributes
Liquidation margin parameters for each active market with a calibrated margin config.
Show child attributes
Show child attributes
Partition of the asset class's active markets; positions within a subgroup are margined together.