Batch Create Orders (V2)
curl --request POST \
--url https://external-api.kalshi.com/trade-api/v2/portfolio/events/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": "HIGHNY-24JAN01-T60",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"side": "bid",
"count": "10.00",
"price": "0.5600",
"time_in_force": "good_till_canceled",
"self_trade_prevention_type": "taker_at_cross",
"exchange_index": 0
},
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"side": "ask",
"count": "5.00",
"price": "0.5800",
"time_in_force": "immediate_or_cancel",
"self_trade_prevention_type": "maker",
"exchange_index": 0
}
]
}
'import requests
url = "https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched"
payload = { "orders": [
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"side": "bid",
"count": "10.00",
"price": "0.5600",
"time_in_force": "good_till_canceled",
"self_trade_prevention_type": "taker_at_cross",
"exchange_index": 0
},
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"side": "ask",
"count": "5.00",
"price": "0.5800",
"time_in_force": "immediate_or_cancel",
"self_trade_prevention_type": "maker",
"exchange_index": 0
}
] }
headers = {
"KALSHI-ACCESS-KEY": "<api-key>",
"KALSHI-ACCESS-SIGNATURE": "<api-key>",
"KALSHI-ACCESS-TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'KALSHI-ACCESS-KEY': '<api-key>',
'KALSHI-ACCESS-SIGNATURE': '<api-key>',
'KALSHI-ACCESS-TIMESTAMP': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orders: [
{
ticker: 'HIGHNY-24JAN01-T60',
client_order_id: '8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1',
side: 'bid',
count: '10.00',
price: '0.5600',
time_in_force: 'good_till_canceled',
self_trade_prevention_type: 'taker_at_cross',
exchange_index: 0
},
{
ticker: 'HIGHNY-24JAN01-T60',
client_order_id: '2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a',
side: 'ask',
count: '5.00',
price: '0.5800',
time_in_force: 'immediate_or_cancel',
self_trade_prevention_type: 'maker',
exchange_index: 0
}
]
})
};
fetch('https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched', 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/portfolio/events/orders/batched",
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([
'orders' => [
[
'ticker' => 'HIGHNY-24JAN01-T60',
'client_order_id' => '8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1',
'side' => 'bid',
'count' => '10.00',
'price' => '0.5600',
'time_in_force' => 'good_till_canceled',
'self_trade_prevention_type' => 'taker_at_cross',
'exchange_index' => 0
],
[
'ticker' => 'HIGHNY-24JAN01-T60',
'client_order_id' => '2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a',
'side' => 'ask',
'count' => '5.00',
'price' => '0.5800',
'time_in_force' => 'immediate_or_cancel',
'self_trade_prevention_type' => 'maker',
'exchange_index' => 0
]
]
]),
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/portfolio/events/orders/batched"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched")
.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 \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"orders": [
{
"order_id": "3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"fill_count": "0.00",
"remaining_count": "10.00",
"ts_ms": 1715793600123
},
{
"order_id": "a6d6010d-6d5f-40a1-a7e7-5501386bb621",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"fill_count": "5.00",
"remaining_count": "0.00",
"average_fill_price": "0.5800",
"average_fee_paid": "0.0012",
"ts_ms": 1715793600456
}
]
}{
"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>"
}orders
Batch Create Orders (V2)
Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier’s write budget — see Rate Limits and Tiers.
POST
/
portfolio
/
events
/
orders
/
batched
Batch Create Orders (V2)
curl --request POST \
--url https://external-api.kalshi.com/trade-api/v2/portfolio/events/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": "HIGHNY-24JAN01-T60",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"side": "bid",
"count": "10.00",
"price": "0.5600",
"time_in_force": "good_till_canceled",
"self_trade_prevention_type": "taker_at_cross",
"exchange_index": 0
},
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"side": "ask",
"count": "5.00",
"price": "0.5800",
"time_in_force": "immediate_or_cancel",
"self_trade_prevention_type": "maker",
"exchange_index": 0
}
]
}
'import requests
url = "https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched"
payload = { "orders": [
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"side": "bid",
"count": "10.00",
"price": "0.5600",
"time_in_force": "good_till_canceled",
"self_trade_prevention_type": "taker_at_cross",
"exchange_index": 0
},
{
"ticker": "HIGHNY-24JAN01-T60",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"side": "ask",
"count": "5.00",
"price": "0.5800",
"time_in_force": "immediate_or_cancel",
"self_trade_prevention_type": "maker",
"exchange_index": 0
}
] }
headers = {
"KALSHI-ACCESS-KEY": "<api-key>",
"KALSHI-ACCESS-SIGNATURE": "<api-key>",
"KALSHI-ACCESS-TIMESTAMP": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'KALSHI-ACCESS-KEY': '<api-key>',
'KALSHI-ACCESS-SIGNATURE': '<api-key>',
'KALSHI-ACCESS-TIMESTAMP': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orders: [
{
ticker: 'HIGHNY-24JAN01-T60',
client_order_id: '8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1',
side: 'bid',
count: '10.00',
price: '0.5600',
time_in_force: 'good_till_canceled',
self_trade_prevention_type: 'taker_at_cross',
exchange_index: 0
},
{
ticker: 'HIGHNY-24JAN01-T60',
client_order_id: '2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a',
side: 'ask',
count: '5.00',
price: '0.5800',
time_in_force: 'immediate_or_cancel',
self_trade_prevention_type: 'maker',
exchange_index: 0
}
]
})
};
fetch('https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched', 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/portfolio/events/orders/batched",
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([
'orders' => [
[
'ticker' => 'HIGHNY-24JAN01-T60',
'client_order_id' => '8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1',
'side' => 'bid',
'count' => '10.00',
'price' => '0.5600',
'time_in_force' => 'good_till_canceled',
'self_trade_prevention_type' => 'taker_at_cross',
'exchange_index' => 0
],
[
'ticker' => 'HIGHNY-24JAN01-T60',
'client_order_id' => '2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a',
'side' => 'ask',
'count' => '5.00',
'price' => '0.5800',
'time_in_force' => 'immediate_or_cancel',
'self_trade_prevention_type' => 'maker',
'exchange_index' => 0
]
]
]),
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/portfolio/events/orders/batched"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched")
.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 \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/portfolio/events/orders/batched")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"orders\": [\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1\",\n \"side\": \"bid\",\n \"count\": \"10.00\",\n \"price\": \"0.5600\",\n \"time_in_force\": \"good_till_canceled\",\n \"self_trade_prevention_type\": \"taker_at_cross\",\n \"exchange_index\": 0\n },\n {\n \"ticker\": \"HIGHNY-24JAN01-T60\",\n \"client_order_id\": \"2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a\",\n \"side\": \"ask\",\n \"count\": \"5.00\",\n \"price\": \"0.5800\",\n \"time_in_force\": \"immediate_or_cancel\",\n \"self_trade_prevention_type\": \"maker\",\n \"exchange_index\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"orders": [
{
"order_id": "3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d",
"client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
"fill_count": "0.00",
"remaining_count": "10.00",
"ts_ms": 1715793600123
},
{
"order_id": "a6d6010d-6d5f-40a1-a7e7-5501386bb621",
"client_order_id": "2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a",
"fill_count": "5.00",
"remaining_count": "0.00",
"average_fill_price": "0.5800",
"average_fee_paid": "0.0012",
"ts_ms": 1715793600456
}
]
}{
"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>"
}Rate limit: 10 tokens per order in the batch — billed per item, so total cost for a batch of N orders is N × 10. See
GET /trade-api/v2/account/endpoint_costs for current non-default endpoint costs.Authorizations
Your API key ID
RSA-PSS signature of the request
Request timestamp in milliseconds
Body
application/json
Show child attributes
Show child attributes
Response
Batch order creation completed
Show child attributes
Show child attributes
⌘I