API Keys
All Matchr API requests require authentication using an API key.Getting Your API Key
1
Sign In
Log in to your Matchr account at matchr.xyz.
2
Navigate to Settings
Go to Settings → API Keys.
3
Create Key
Click Create API Key, give it a name, and click Generate.
4
Copy Key
Copy your API key immediately. It will only be shown once.
Using Your API Key
Bearer Token Authentication
Include your API key in theAuthorization header:
SDK Authentication
Key Types
| Type | Permissions | Use Case |
|---|---|---|
| Read-Only | Market data, prices, matches | Analytics, dashboards |
| Trading | All read + order placement | Trading bots |
| Admin | All permissions | Full API access |
Security Best Practices
Never expose keys in frontend code
Never expose keys in frontend code
API keys should only be used server-side. Never include them in client-side JavaScript.
Use environment variables
Use environment variables
Store keys in environment variables, not in code.
Rotate keys regularly
Rotate keys regularly
Generate new keys periodically and revoke old ones.
Use minimal permissions
Use minimal permissions
Create read-only keys for analytics. Only use trading keys when needed.
Error Handling
Unauthorized (401)
- Missing
Authorizationheader - Invalid API key
- Revoked API key
Forbidden (403)
- Read-only key attempting trading endpoint
- Account restrictions
Key Management
View Active Keys
See all your API keys in Settings → API Keys.Revoke a Key
Click Revoke next to any key to immediately disable it.Rename a Key
Click the key name to edit it for better organization.Rate Limiting by Key
Each API key has its own rate limit:| Tier | Keys Allowed | Rate Limit/Key |
|---|---|---|
| Free | 2 | 60/min |
| Pro | 10 | 300/min |
| Enterprise | Unlimited | Custom |
