X-API-Key header. There is no username/password and no OAuth flow.
Issue a key (programmatic flow)
Three steps: request a challenge, sign the exact message it returns, post both back. Each nonce is single-use and bound to your wallet + the action (issue, revoke, regenerate), so an intercepted signature can’t be replayed for any other operation.
1
Request a challenge
POST /api/v2/auth/challenge returns a single-use nonce + the exact message your wallet must sign.issue can’t be replayed for revoke or regenerate.2
Sign the exact message
Use EIP-191 personal sign (
personal_sign) with the wallet whose address you sent in step 1. Don’t construct your own message — sign the one the server returned verbatim.3
Exchange for a key
POST /api/v2/auth/token with the address, signature, the message, the nonce, and an optional label.apiKey is shown):Use your key
Pass it in theX-API-Key header on every request to a /api/v2/public/* endpoint.
List your active keys
Returns prefixes (not raw keys), labels, rate limit, scopes, created/last-used timestamps. No auth required — a key’s prefix isn’t a secret. Used by the/settings/api-keys page.
Revoke a key
Suspected leak? Revoke instantly. The action is wallet-signed (same nonce flow withaction: "revoke" and the key’s id).
401.
Regenerate a key (atomic rotate)
Same scopes + rate limit, new key value. Useful when you want to rotate without losing your “key slot” or having to update label references downstream.POST /auth/token — the new key is shown once.
Caps
- 5 active keys per wallet. Revoke or regenerate to free a slot.
- Default 60 req/min per key. Higher quotas on request — see Rate Limits.
- Persistent failed-auth attempts from a single IP are throttled at the edge.
Error responses
All success responses are
{ "success": true, "data": {...} }; errors are { "success": false, "error": "<message>" }.
Security best practices
- Store in your secrets manager (AWS Secrets Manager, Doppler, 1Password, env-file mounted at runtime). Never commit.
- Use one key per environment (
prod-bot,staging-bot,local-dev) — the label keeps you sane and revoke is single-key, not single-wallet. - Rotate via
/keys/:id/regenerateon a schedule or after any suspected exposure. Old key dies the moment the new one is shown. - For server-to-server integrations, give each agent its own dedicated wallet so a leak doesn’t expose your trading wallet’s positions.