GET /v1/health) must include a valid API key. Keys belong to the csb_pub_ namespace, are scoped to either read-only or trading access, and are tied to your CSBoard account. The server stores only the SHA-256 hash of each key — the raw secret is shown once at creation and never again, so store it somewhere safe.
Get your API key
Open your profile API tab
Go to csboard.com/profile?tab=api and sign in if prompted.
Generate a new key
Click Generate key. Choose a label that identifies what the key is for (e.g.
price-tracker-prod).Copy the key immediately
Your new
csb_pub_… key is shown only once. Copy it to your secrets manager or environment variables before closing the dialog.Pass your key on requests
Send the key as a Bearer token in theAuthorization header on every request:
api_key query parameter — useful for quick tests in a browser or tools that don’t support custom headers:
Authorization header in production; query parameters are more likely to appear in server logs.
Key capabilities
| Capability | Read key | Trading key |
|---|---|---|
All GET endpoints | ✅ | ✅ |
POST /v1/orders | ❌ | ✅ |
Security and storage
We store onlySHA256(key) — never the raw secret. This means:
- If you lose your key you must generate a new one; there is no “reveal key” option.
- A compromised key can be revoked instantly from your profile without affecting other keys.
Authentication errors
Every error from the API returns a JSON body in this format:| HTTP status | code | When it occurs |
|---|---|---|
| 401 | missing_api_key | No key provided or key does not start with csb_pub_ |
| 401 | invalid_api_key | Key is not recognised or has been revoked |
| 401 | too_many_failed_auth | Too many invalid keys from your IP — 5-minute ban applied |
| 403 | trading_not_enabled | Key is valid but trading has not been enabled for it |
| 429 | rate_limit_exceeded | You have exceeded your per-key request limit |