During development, you can use the developer endpoints without an API key. For production use, you’ll need an API key to avoid rate limits.
Using Your API Key
Include your API key in all requests to the APIs by setting thex-api-key header.
All calls to the production endpoints must use an API key.
GET request
GET request
For GET requests, include the API key in the request headers:
POST request
POST request
For POST requests, include the API key alongside other headers:
WebSocket Authentication
The Trade and Metadata APIs both expose WebSocket endpoints (see Endpoints). They authenticate the same way as REST: developer endpoints are open without a key, and production endpoints take the API key as anx-api-key header on the upgrade request, not a URL query parameter.
Security Best Practices
- Store your API key securely using environment variables.
- Never commit API keys to version control.
- Rotate your API key if it’s ever exposed.
Getting Help
If you need an API key or have questions about rate limits, reach out to us.Related Resources
Endpoints
Dev and production base URLs for the Trade, Metadata, and Proof APIs.
Request an API Key
Submit the form to get a production API key.
Send Orders
Send a spot order end-to-end.
Prediction Market Quickstart
Build a Kalshi prediction market integration end-to-end.