API Key Authentication
REST requests require an API key in theX-API-Key header. WebSocket connections use the api_key query parameter, as browsers cannot set a custom WebSocket header.
Getting Your API Key
- Sign up at tradingnews.press
- Go to Dashboard > API Keys
- Click Create Key
- Copy the key immediately — it’s only shown once
Key Format
TradingNews API keys use a prefix format for easy identification:Security Best Practices
- Store keys in environment variables, not in code
- Use different keys for different applications
- Revoke and rotate keys if you suspect exposure
- Each key has independent rate limits and usage tracking
Error Responses
401 — Invalid key
403 — Inactive key
429 — Rate limited