Skip to main content
PUT
Set Cross Exit Trigger

Authorizations

KALSHI-ACCESS-KEY
string
header
required

Your API key ID

KALSHI-ACCESS-SIGNATURE
string
header
required

RSA-PSS signature of the request

KALSHI-ACCESS-TIMESTAMP
string
header
required

Request timestamp in milliseconds

Path Parameters

ticker
string
required

Ticker of the market whose position the trigger protects.

Query Parameters

subaccount
integer
default:0

Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0.

Required range: x >= 0

Body

application/json

For bracket, supply stop_loss_price and/or take_profit_price. For trailing, supply exactly one of trail_amount or trail_bps. Fields belonging to the other kind are rejected, as is a body that sets neither — cancel with DELETE. A leg you omit is cleared.

count
string

Contracts this trigger closes when it fires. Omit it to cover the whole position, which then requires that no partial or anchored trigger already covers part of it. If supplied, it must be a whole number of contracts.

Example:

"10.00"

anchor_order_id
string

Ties the trigger to an order: its size follows that order's cumulative fill, and it stays pending until the order first fills. Bracket only; mutually exclusive with count. If the order cannot currently be validated, the request returns 409 with error code anchor_order_unavailable before writing anything, so retrying is safe.

client_trigger_id
string

Your own identifier, required on a count or anchor_order_id create because those append a trigger rather than replace one; rejected on every other write. Replaying a key returns the trigger the first request made, in whatever state it has since reached. Keys are single-use per account and belong to the position they created on: reusing one returns the original even once it is canceled, and presenting it for another subaccount or ticker returns 409 with error code idempotency_key_already_used.

Maximum string length: 64
kind
enum<string>
default:bracket

Which trigger family this write targets. Defaults to bracket.

Available options:
bracket,
trailing
stop_loss_price
string

Mark price at which the stop-loss leg fires. Bracket only.

Example:

"0.5600"

take_profit_price
string

Mark price at which the take-profit leg fires. Bracket only.

Example:

"0.5600"

trail_amount
string

Absolute trailing distance in dollars. Trailing only; mutually exclusive with trail_bps.

Example:

"0.5600"

trail_bps
integer

Trailing distance in basis points of the tracked watermark (not the entry price). Trailing only; mutually exclusive with trail_amount.

Required range: 1 <= x <= 9999

Response

Exit trigger set successfully

id
string
required

Unique identifier for this trigger.

ticker
string
required

Market the protected position is on.

kind
enum<string>
required

Trigger family. bracket is a stop-loss / take-profit pair; trailing is a trailing stop whose stop level ratchets with the liquidation mark.

Available options:
bracket,
trailing
status
enum<string>
required

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
count
string
required

Contracts this trigger closes when it fires. 0 means the whole position.

Example:

"10.00"

filled_count
string
required

Contracts closed so far across fire attempts.

Example:

"10.00"

created_time
string<date-time>
required
updated_time
string<date-time>
required
status_reason
enum<string>

Why the trigger reached its terminal status.

Available options:
user_canceled,
position_closed,
entry_not_filled,
order_rejected,
position_flipped
triggered_leg
enum<string>

Leg that fired the last time the trigger fired.

Available options:
stop_loss,
take_profit
triggered_order_id
string

Order placed the last time the trigger fired. An order-anchored trigger keeps it after returning to pending_on_entry, so its presence does not mean the trigger is done.

anchor_order_id
string

Order this trigger follows, for order-anchored triggers. Cleared once that order reaches a terminal state, so use client_trigger_id to correlate a trigger with the request that made it.

client_trigger_id
string

The idempotency key the create supplied, for appending creates.

stop_loss_price
string

Stop-loss leg price. Bracket triggers only.

Example:

"0.5600"

take_profit_price
string

Take-profit leg price. Bracket triggers only.

Example:

"0.5600"

trail_amount
string

Absolute trailing distance. Trailing triggers only.

Example:

"0.5600"

trail_bps
integer

Trailing distance in basis points of the watermark. Trailing triggers only.

watermark_price
string

Most favorable liquidation mark seen since creation — the peak for long positions, the trough for short. Trailing triggers only.

Example:

"0.5600"

effective_stop_price
string

Level whose breach fires the stop: watermark minus the trail for longs, plus for shorts. Trailing triggers only.

Example:

"0.5600"