Header auth
Prefer X-API-Key: YOUR_KEY; Authorization: Bearer is also accepted. Keep X-Request-Id from responses for support.
Documentation
Every REST and WebSocket call needs a valid API key. This topic covers headers, multi-env keys, common failures, and safe storage.
Prefer X-API-Key: YOUR_KEY; Authorization: Bearer is also accepted. Keep X-Request-Id from responses for support.
Create separate keys for dev, staging, and production. Rotate and revoke in console immediately if leaked.
Never ship keys in public frontend or git. Inject via env or a secrets manager; apply IP/region limits when available.
401 usually means missing/invalid key; 403 often means market or scope denied; 429 is quota/RPM. See the errors topic.
Validate with /api/v1/market/quote, then WebSocket. Guide: /guides/rest-api-authentication.