curl --request DELETE \
--url https://api.elections.kalshi.com/trade-api/v2/portfolio/orders/batched \
--header 'Content-Type: application/json' \
--header 'KALSHI-ACCESS-KEY: <api-key>' \
--header 'KALSHI-ACCESS-SIGNATURE: <api-key>' \
--header 'KALSHI-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"ids": [
"<string>"
]
}
'{
"orders": [
{
"order_id": "<string>",
"reduced_by": 123,
"order": {
"order_id": "<string>",
"user_id": "<string>",
"client_order_id": "<string>",
"ticker": "<string>",
"side": "yes",
"action": "buy",
"type": "limit",
"status": "resting",
"yes_price": 123,
"no_price": 123,
"yes_price_dollars": "0.5600",
"no_price_dollars": "0.5600",
"fill_count": 123,
"remaining_count": 123,
"initial_count": 123,
"taker_fees": 123,
"maker_fees": 123,
"taker_fill_cost": 123,
"maker_fill_cost": 123,
"taker_fill_cost_dollars": "0.5600",
"maker_fill_cost_dollars": "0.5600",
"queue_position": 123,
"taker_fees_dollars": "0.5600",
"maker_fees_dollars": "0.5600",
"expiration_time": "2023-11-07T05:31:56Z",
"created_time": "2023-11-07T05:31:56Z",
"last_update_time": "2023-11-07T05:31:56Z",
"self_trade_prevention_type": "taker_at_cross",
"order_group_id": "<string>",
"cancel_order_on_pause": true
},
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}
}
]
}Endpoint for cancelling up to 20 orders at once.
curl --request DELETE \
--url https://api.elections.kalshi.com/trade-api/v2/portfolio/orders/batched \
--header 'Content-Type: application/json' \
--header 'KALSHI-ACCESS-KEY: <api-key>' \
--header 'KALSHI-ACCESS-SIGNATURE: <api-key>' \
--header 'KALSHI-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"ids": [
"<string>"
]
}
'{
"orders": [
{
"order_id": "<string>",
"reduced_by": 123,
"order": {
"order_id": "<string>",
"user_id": "<string>",
"client_order_id": "<string>",
"ticker": "<string>",
"side": "yes",
"action": "buy",
"type": "limit",
"status": "resting",
"yes_price": 123,
"no_price": 123,
"yes_price_dollars": "0.5600",
"no_price_dollars": "0.5600",
"fill_count": 123,
"remaining_count": 123,
"initial_count": 123,
"taker_fees": 123,
"maker_fees": 123,
"taker_fill_cost": 123,
"maker_fill_cost": 123,
"taker_fill_cost_dollars": "0.5600",
"maker_fill_cost_dollars": "0.5600",
"queue_position": 123,
"taker_fees_dollars": "0.5600",
"maker_fees_dollars": "0.5600",
"expiration_time": "2023-11-07T05:31:56Z",
"created_time": "2023-11-07T05:31:56Z",
"last_update_time": "2023-11-07T05:31:56Z",
"self_trade_prevention_type": "taker_at_cross",
"order_group_id": "<string>",
"cancel_order_on_pause": true
},
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"service": "<string>"
}
}
]
}Your API key ID
RSA-PSS signature of the request
Request timestamp in milliseconds
An array of order IDs to cancel
Batch order cancellation completed
Show child attributes
The order ID to identify which order had an error during batch cancellation
The number of contracts that were successfully canceled from this order
Show child attributes
Unique identifier for users
yes, no buy, sell limit, market The status of an order
resting, canceled, executed The yes price for this order in fixed-point dollars
"0.5600"
The no price for this order in fixed-point dollars
"0.5600"
The number of contracts that have been filled
The initial size of the order (contract units)
Fees paid on filled taker contracts, in cents
Fees paid on filled maker contracts, in cents
The cost of filled taker orders in cents
The cost of filled maker orders in cents
The cost of filled taker orders in dollars
"0.5600"
The cost of filled maker orders in dollars
"0.5600"
DEPRECATED: This field is deprecated and will always return 0. Please use the GET /portfolio/orders/{order_id}/queue_position endpoint instead
Fees paid on filled taker contracts, in dollars
"0.5600"
Fees paid on filled maker contracts, in dollars
"0.5600"
The last update to an order (modify, cancel, fill)
The self-trade prevention type for orders
taker_at_cross, maker The order group this order is part of
If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason.