Getting started
Authentication
API keys, live and test environments, scopes, and the plan every request needs.
API keys
Send your key in the Authorization header as a bearer token on every request except GET /health and GET /openapi.json.
Authorization: Bearer $ENTON_API_KEYKeys start with enton_live_ or enton_test_ followed by 64 hexadecimal characters. Create and revoke them in the developer portal. The full key is shown once, when you create it; after that the portal shows only its first characters.
Plans and limits
Every request needs an active Trader or Partner plan on the account that owns the key. A trial counts. Without one, requests get 401 with Active subscription required. A free account can create one key, but the key is refused until the account has a plan.
| Plan | Keys per account | Requests per minute, per key | Requests per month, per key |
|---|---|---|---|
| Free | 1 | 10 | 1,000 |
| Trader | 5 | 60 | 50,000 |
| Partner | 10 | 120 | No limit |
A key keeps the limits of the plan the account had when the key was created. After you change plan, create a new key to get the new limits. How the limits are counted is on the errors and rate limits page.
Live and test keys
You choose a key's environment when you create it, and it shows in the key's prefix.
enton_live_keys can do everything their scopes allow, including placing real orders.enton_test_keys are refused by trade execution with 403. Every other endpoint behaves the same for both, against live data.
Scopes
A key carries the scopes you picked when you created it. A key created without picking any gets *, which allows every endpoint. A request to an endpoint whose scope the key lacks gets 403 with Insufficient permissions. Required scope: ….
| Scope | Allows |
|---|---|
ai:query | POST /ai/query |
trading:cards | POST /trading/cards |
trading:execute | POST /trading/execute |
api:discover | POST /discover |
oauth:read | GET /oauth/providers and GET /oauth/{provider}/status |
oauth:connect | GET /oauth/{provider} |
* | Every scope. The default when a key is created without choosing scopes. |
GET /discover, which lists discovery providers, needs a valid key but checks no scope.
Keeping keys safe
- Call the API from your server. Never put a key in a web page, a mobile app or a public repository.
- Give each integration its own key with only the scopes it needs, so you can revoke one without breaking the others.
- If a key leaks, revoke it in the developer portal and create a new one. Revoked keys get 401 at once.