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.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.
REST API
Use these base URLs for the Trade API:| Environment | Recommended base URL | Also supported |
|---|---|---|
| Production | https://external-api.kalshi.com/trade-api/v2 | https://api.elections.kalshi.com/trade-api/v2 |
| Demo | https://external-api.demo.kalshi.co/trade-api/v2 | https://demo-api.kalshi.co/trade-api/v2 |
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:| Environment | Recommended URL | Also supported |
|---|---|---|
| Production | wss://external-api-ws.kalshi.com/trade-api/ws/v2 | wss://api.elections.kalshi.com/trade-api/ws/v2 |
| Demo | wss://external-api-ws.demo.kalshi.co/trade-api/ws/v2 | wss://demo-api.kalshi.co/trade-api/ws/v2 |