Update Cross Exit Trigger
curl --request PUT \
--url https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id} \
--header 'Content-Type: application/json' \
--header 'KALSHI-ACCESS-KEY: <api-key>' \
--header 'KALSHI-ACCESS-SIGNATURE: <api-key>' \
--header 'KALSHI-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600"
}
'import requests
url = "https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}"
payload = {
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600"
}
headers = {
"KALSHI-ACCESS-KEY": "<api-key>",
"KALSHI-ACCESS-SIGNATURE": "<api-key>",
"KALSHI-ACCESS-TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'KALSHI-ACCESS-KEY': '<api-key>',
'KALSHI-ACCESS-SIGNATURE': '<api-key>',
'KALSHI-ACCESS-TIMESTAMP': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({stop_loss_price: '0.5600', take_profit_price: '0.5600'})
};
fetch('https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}', 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/cross/positions/{ticker}/exit_trigger/{trigger_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'stop_loss_price' => '0.5600',
'take_profit_price' => '0.5600'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"KALSHI-ACCESS-KEY: <api-key>",
"KALSHI-ACCESS-SIGNATURE: <api-key>",
"KALSHI-ACCESS-TIMESTAMP: <api-key>"
],
]);
$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://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}"
payload := strings.NewReader("{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("KALSHI-ACCESS-KEY", "<api-key>")
req.Header.Add("KALSHI-ACCESS-SIGNATURE", "<api-key>")
req.Header.Add("KALSHI-ACCESS-TIMESTAMP", "<api-key>")
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.put("https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}")
.header("KALSHI-ACCESS-KEY", "<api-key>")
.header("KALSHI-ACCESS-SIGNATURE", "<api-key>")
.header("KALSHI-ACCESS-TIMESTAMP", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["KALSHI-ACCESS-KEY"] = '<api-key>'
request["KALSHI-ACCESS-SIGNATURE"] = '<api-key>'
request["KALSHI-ACCESS-TIMESTAMP"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"ticker": "<string>",
"kind": "bracket",
"status": "pending_on_entry",
"count": "10.00",
"filled_count": "10.00",
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"status_reason": "user_canceled",
"triggered_leg": "stop_loss",
"triggered_order_id": "<string>",
"anchor_order_id": "<string>",
"client_trigger_id": "<string>",
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600",
"trail_amount": "0.5600",
"trail_bps": 123,
"watermark_price": "0.5600",
"effective_stop_price": "0.5600"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}exit-triggers
Update Cross Exit Trigger
Endpoint for updating one bracket’s leg prices, leaving any others on the position untouched. At least one leg is required; cancel with DELETE. Trailing stops are not addressed by id — use the collection route with kind=trailing.
PUT
/
margin
/
cross
/
positions
/
{ticker}
/
exit_trigger
/
{trigger_id}
Update Cross Exit Trigger
curl --request PUT \
--url https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id} \
--header 'Content-Type: application/json' \
--header 'KALSHI-ACCESS-KEY: <api-key>' \
--header 'KALSHI-ACCESS-SIGNATURE: <api-key>' \
--header 'KALSHI-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600"
}
'import requests
url = "https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}"
payload = {
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600"
}
headers = {
"KALSHI-ACCESS-KEY": "<api-key>",
"KALSHI-ACCESS-SIGNATURE": "<api-key>",
"KALSHI-ACCESS-TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'KALSHI-ACCESS-KEY': '<api-key>',
'KALSHI-ACCESS-SIGNATURE': '<api-key>',
'KALSHI-ACCESS-TIMESTAMP': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({stop_loss_price: '0.5600', take_profit_price: '0.5600'})
};
fetch('https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}', 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/cross/positions/{ticker}/exit_trigger/{trigger_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'stop_loss_price' => '0.5600',
'take_profit_price' => '0.5600'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"KALSHI-ACCESS-KEY: <api-key>",
"KALSHI-ACCESS-SIGNATURE: <api-key>",
"KALSHI-ACCESS-TIMESTAMP: <api-key>"
],
]);
$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://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}"
payload := strings.NewReader("{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("KALSHI-ACCESS-KEY", "<api-key>")
req.Header.Add("KALSHI-ACCESS-SIGNATURE", "<api-key>")
req.Header.Add("KALSHI-ACCESS-TIMESTAMP", "<api-key>")
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.put("https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}")
.header("KALSHI-ACCESS-KEY", "<api-key>")
.header("KALSHI-ACCESS-SIGNATURE", "<api-key>")
.header("KALSHI-ACCESS-TIMESTAMP", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/margin/cross/positions/{ticker}/exit_trigger/{trigger_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["KALSHI-ACCESS-KEY"] = '<api-key>'
request["KALSHI-ACCESS-SIGNATURE"] = '<api-key>'
request["KALSHI-ACCESS-TIMESTAMP"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stop_loss_price\": \"0.5600\",\n \"take_profit_price\": \"0.5600\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"ticker": "<string>",
"kind": "bracket",
"status": "pending_on_entry",
"count": "10.00",
"filled_count": "10.00",
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"status_reason": "user_canceled",
"triggered_leg": "stop_loss",
"triggered_order_id": "<string>",
"anchor_order_id": "<string>",
"client_trigger_id": "<string>",
"stop_loss_price": "0.5600",
"take_profit_price": "0.5600",
"trail_amount": "0.5600",
"trail_bps": 123,
"watermark_price": "0.5600",
"effective_stop_price": "0.5600"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<string>"
}Authorizations
Path Parameters
Query Parameters
Body
application/json
At least one leg is required and a leg you omit is cleared; cancel with DELETE.
Response
Exit trigger set successfully
pending_on_entry awaits an initial or further fill from the anchor order before arming — an order-anchored trigger returns here after closing its current quantity, so this status can follow active and carries a non-zero filled_count when it does. active is live and evaluated against the mark each tick. filled, failed, and canceled are terminal.
Available options:
pending_on_entry, active, filled, failed, canceled, unknown