Get Obligation History
curl --request GET \
--url https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history"
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/obligation_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.klear.kalshi.com/klear-api/v1/margin/obligation_history",
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/obligation_history"
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/obligation_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history")
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{
"obligations": [
{
"id": "<string>",
"user_id": "<string>",
"amount_centicents": 123,
"fees_centicents": 123,
"maintenance_margin_centicents": 123,
"pnl_centicents": 123,
"execution_time": "2023-11-07T05:31:56Z",
"last_updated_ts": "2023-11-07T05:31:56Z",
"asset_class": "Crypto",
"receives": [
{
"id": "<string>",
"type": "<string>",
"amount_centicents": 123,
"external_reference": "<string>",
"created_ts": "2023-11-07T05:31:56Z"
}
],
"settlement_details": [
{
"id": "<string>",
"market_ticker": "<string>",
"subtrader_id": "<string>",
"position_quantity_fp": "<string>",
"pnl_centicents": 123,
"total_fees_centicents": 123,
"total_amount_centicents": 123
}
],
"maintenance_margin_details": [
{
"id": "<string>",
"subtrader_id": "<string>",
"maintenance_margin_centicents": 123,
"maintenance_margin_delta_centicents": 123,
"margin_group_id": "<string>"
}
],
"funding_payments": [
{
"id": "<string>",
"market_ticker": "<string>",
"subtrader_id": "<string>",
"funding_time": "2023-11-07T05:31:56Z",
"position_quantity_fp": "<string>",
"notional_value_centicents": 123,
"funding_amount_centicents": 123
}
],
"settlement_details_truncated": true,
"maintenance_margin_details_truncated": true,
"funding_payments_truncated": true
}
],
"cursor": "<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>"
}clearing-members
Get Obligation History
Completed obligations from previous settlements, ordered by most recent first.
GET
/
margin
/
obligation_history
Get Obligation History
curl --request GET \
--url https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history"
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/obligation_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.klear.kalshi.com/klear-api/v1/margin/obligation_history",
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/obligation_history"
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/obligation_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/margin/obligation_history")
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{
"obligations": [
{
"id": "<string>",
"user_id": "<string>",
"amount_centicents": 123,
"fees_centicents": 123,
"maintenance_margin_centicents": 123,
"pnl_centicents": 123,
"execution_time": "2023-11-07T05:31:56Z",
"last_updated_ts": "2023-11-07T05:31:56Z",
"asset_class": "Crypto",
"receives": [
{
"id": "<string>",
"type": "<string>",
"amount_centicents": 123,
"external_reference": "<string>",
"created_ts": "2023-11-07T05:31:56Z"
}
],
"settlement_details": [
{
"id": "<string>",
"market_ticker": "<string>",
"subtrader_id": "<string>",
"position_quantity_fp": "<string>",
"pnl_centicents": 123,
"total_fees_centicents": 123,
"total_amount_centicents": 123
}
],
"maintenance_margin_details": [
{
"id": "<string>",
"subtrader_id": "<string>",
"maintenance_margin_centicents": 123,
"maintenance_margin_delta_centicents": 123,
"margin_group_id": "<string>"
}
],
"funding_payments": [
{
"id": "<string>",
"market_ticker": "<string>",
"subtrader_id": "<string>",
"funding_time": "2023-11-07T05:31:56Z",
"position_quantity_fp": "<string>",
"notional_value_centicents": 123,
"funding_amount_centicents": 123
}
],
"settlement_details_truncated": true,
"maintenance_margin_details_truncated": true,
"funding_payments_truncated": true
}
],
"cursor": "<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
Number of results per page.
Required range:
x <= 100Opaque cursor from a previous response to fetch the next page.