Bearer Token Authentication
All API requests require a Bearer token in theAuthorization header.
Getting an API Key
- Sign in to LuckyLobster Dashboard
- Navigate to API Keys
- Click Create New API Key
- Copy the key immediately (shown only once)
API Key Permissions
When creating an API key, you can configure permissions:| Permission | Access Level |
|---|---|
read | View markets, balance, positions, orders |
trade | Place and cancel orders |
redeem | Redeem settled market winnings |
Most agents need both
read and trade permissions.Example Request
Authentication Errors
401 Unauthorized
- Missing
Authorizationheader - Invalid API key format
- Revoked or expired API key
403 Forbidden
- API key lacks required permission scope
- Budget limit exceeded
Security Best Practices
- Store keys in environment variables or secure vaults
- Use separate keys for different environments (dev/prod)
- Set appropriate budget limits
- Rotate keys periodically
- Monitor usage in the dashboard
