curl --request POST \
--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 '
{
"orders": [
{
"ticker": "<string>",
"side": "yes",
"action": "buy",
"count": 2,
"client_order_id": "<string>",
"type": "limit",
"yes_price": 50,
"no_price": 50,
"yes_price_dollars": "0.5600",
"no_price_dollars": "0.5600",
"expiration_ts": 123,
"time_in_force": "fill_or_kill",
"buy_max_cost": 123,
"post_only": true,
"reduce_only": true,
"sell_position_floor": 123,
"self_trade_prevention_type": "taker_at_cross",
"order_group_id": "<string>",
"cancel_order_on_pause": true
}
]
}
'{
"orders": [
{
"client_order_id": "<string>",
"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 submitting a batch of orders. Each order in the batch is counted against the total rate limit for order operations. Consequently, the size of the batch is capped by the current per-second rate-limit configuration applicable to the user. At the moment of writing, the limit is 20 orders per batch.
curl --request POST \
--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 '
{
"orders": [
{
"ticker": "<string>",
"side": "yes",
"action": "buy",
"count": 2,
"client_order_id": "<string>",
"type": "limit",
"yes_price": 50,
"no_price": 50,
"yes_price_dollars": "0.5600",
"no_price_dollars": "0.5600",
"expiration_ts": 123,
"time_in_force": "fill_or_kill",
"buy_max_cost": 123,
"post_only": true,
"reduce_only": true,
"sell_position_floor": 123,
"self_trade_prevention_type": "taker_at_cross",
"order_group_id": "<string>",
"cancel_order_on_pause": true
}
]
}
'{
"orders": [
{
"client_order_id": "<string>",
"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
Show child attributes
yes, no buy, sell x >= 1limit, market 1 <= x <= 991 <= x <= 99Submitting price of the Yes side in fixed-point dollars
"0.5600"
Submitting price of the No side in fixed-point dollars
"0.5600"
fill_or_kill, good_till_canceled, immediate_or_cancel Maximum cost in cents. When specified, the order will automatically have Fill-or-Kill (FoK) behavior.
Deprecated: Use reduce_only instead. Only accepts value of 0.
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.
Batch order creation completed
Show child attributes
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.