Reset Api Balance
Reset the user’s API wallet to their tier baseline and close all open API positions.
Resolution uses app.api_access._tier_api_baseline which reads
FEATURE_MATRIX["wallets.api_baseline"] so a plans.py 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).