Reset Api Balance
Reset the user’s API wallet to their tier baseline and close all open API positions.
Tier-aware reset:
- Pro grant → $10,000
- Pro+ grant → $25,000
- Enterprise → $10,000 (admin-only tier, Pro-equivalent baseline)
- No grant / Free / unknown tier → $10,000 fallback (preserves the legacy behaviour for users with a key but no active grant — e.g., lapsed beta members)
The baseline is resolved from the plan’s feature matrix, so a plan config edit propagates here automatically.
Accepts both X-API-Key and Authorization: Bearer <jwt> auth so
the website’s API-keys dashboard can trigger a reset via the cookie
session, AND an API client can self-reset programmatically (the bot
use case — “give me a clean wallet so the next strategy backtest
starts fresh”). The wallet that gets reset is always the API
wallet regardless of auth source — JWT-auth from the UI does NOT
touch the MAIN wallet.
Enforces a cooldown period defined by the API_RESET_COOLDOWN_DAYS
environment variable (default 0 = no cooldown during beta).
Authorizations
Issue from /v1/keys (or admin-issued for enterprise tier).