Learn how to find markets, place orders, check status, and cancel orders on Kalshi
requests
and cryptography
libraries installedget()
function for making authenticated requests.client_order_id
to deduplicate orders - this allows you to identify duplicate orders before receiving the server-generated order_id
in the response.
client_order_id
field is crucial for order deduplication:
client_order_id
order_id
401 Unauthorized
: Check your API keys and signature generation400 Bad Request
: Verify your order parameters (price must be 1-99 cents)409 Conflict
: Order with this client_order_id
already exists429 Too Many Requests
: You’ve hit the rate limit - slow down your requests/portfolio/orders/{order_id}
endpoint/portfolio/orders
/portfolio/orders/{order_id}
/portfolio/orders/{order_id}