Available, development access
Authentication
One header, HTTPS only, server side only.
Header formatPermalink to this section
Present the key in an x-api-key header on every request. Keys are not accepted as a query parameter, because query strings end up in proxy logs and browser history.
curl "$RIDDLE_API_BASE/v1/markets/kalshi/$MARKET_ID" \
-H "x-api-key: $RIDDLE_API_KEY"RotationPermalink to this section
- 1.In the console, choose Replace on the active key. A replacement secret is staged and shown once; copy it then. Staging again discards the earlier staged secret.
- 2.The staged secret is inert and your current key keeps working until you activate. A staged replacement expires if it is not activated within 24 hours.
- 3.Put the staged secret in your secret store, ready to deploy.
- 4.Activate the replacement in the console. The switch is atomic: the new secret starts authenticating and the old secret stops, so there is no period where both work. Deploy promptly after activation.
Practices we expectPermalink to this section
- Server side only. Do not ship a key to a browser, a mobile binary or a notebook you share.
- Redact the x-api-key header everywhere you log requests, including error reporters and traces.
- One key per deployment target, so retiring a compromised key does not take down everything else.
- Treat a 401 as terminal, not retryable. Retrying an unauthorised request will not make it authorised.