Create Subtrader-Bound API Key
curl --request POST \
--url https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"public_key": "<string>",
"fcm_subtrader_id": "<string>"
}
'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys"
payload = {
"name": "<string>",
"public_key": "<string>",
"fcm_subtrader_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', public_key: '<string>', fcm_subtrader_id: '<string>'})
};
fetch('https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys', 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/fcm/margin/api_keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'public_key' => '<string>',
'fcm_subtrader_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"api_key_id": "<string>",
"warning": "<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>"
}clearing-members
Create Subtrader-Bound API Key
FCM clearing members only. Mint an API key bound to one of your margin subtraders using an RSA or Ed25519 public key you supply. The binding is set at mint and immutable; the resulting key is the institution’s trading credential for that subtrader and cannot reach any REST endpoint, including key management.
POST
/
fcm
/
margin
/
api_keys
Create Subtrader-Bound API Key
curl --request POST \
--url https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"public_key": "<string>",
"fcm_subtrader_id": "<string>"
}
'import requests
url = "https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys"
payload = {
"name": "<string>",
"public_key": "<string>",
"fcm_subtrader_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', public_key: '<string>', fcm_subtrader_id: '<string>'})
};
fetch('https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys', 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/fcm/margin/api_keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'public_key' => '<string>',
'fcm_subtrader_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klear.kalshi.com/klear-api/v1/fcm/margin/api_keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"public_key\": \"<string>\",\n \"fcm_subtrader_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"api_key_id": "<string>",
"warning": "<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
Body
application/json
Response
API key created
Present only when the bound subtrader is missing a per-subtrader risk control - the initial-margin cap (margin lane) or the event-contract daily cap. The mint still succeeds; the warning names each missing control - an event-contract subtrader without a daily cap has its event-contract orders rejected until one is set, while a margin subtrader without an initial-margin cap is bounded only by firm-level risk limits.