Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kalshi.com/llms.txt

Use this file to discover all available pages before exploring further.

Kalshi provides separate production and demo environments. Credentials are not shared between environments, so demo API keys only work against demo endpoints and production API keys only work against production endpoints.

REST API

Use these base URLs for the Trade API:
EnvironmentRecommended base URLAlso supported
Productionhttps://external-api.kalshi.com/trade-api/v2https://api.elections.kalshi.com/trade-api/v2
Demohttps://external-api.demo.kalshi.co/trade-api/v2https://demo-api.kalshi.co/trade-api/v2
The external-api hosts are dedicated to the external Trade API and are the recommended hosts for API traders. The existing shared hosts remain supported for compatibility with existing clients.
Despite the elections subdomain, the production Trade API provides access to all Kalshi markets, not only election-related markets.

WebSocket API

Use these WebSocket URLs for the Trade API:
EnvironmentRecommended URLAlso supported
Productionwss://external-api-ws.kalshi.com/trade-api/ws/v2wss://api.elections.kalshi.com/trade-api/ws/v2
Demowss://external-api-ws.demo.kalshi.co/trade-api/ws/v2wss://demo-api.kalshi.co/trade-api/ws/v2

Request Signing

The host does not change the signature payload. Sign the full request path from the API root, without query parameters. For example, all of these hosts use the same signed path for an order request:
/trade-api/v2/portfolio/orders
If the request URL is:
https://external-api.kalshi.com/trade-api/v2/portfolio/orders?limit=5
sign:
/trade-api/v2/portfolio/orders
not the hostname and not the query string.