Add TopstepX platform support, drain withdrawal stages, and perfect-path calendar projection

- TopstepXClient (ProjectX Gateway): API-key auth, SignalR user hub,
  Trade/search daily P&L, emulated OCO exits, books-invariant
  withdrawal detection for $0-start accounts
- Platform-aware client pool, credentials (api_key column), and
  credential form; $0-size account types match by prefix alone
- Drain stages: min-day ($5-$15 randomized) MNQ legs for the
  configured days, then wait for the 50% withdrawal; stage pills
  show 'Stage N – Drain'
- Account calendar projects the perfect path: future days book their
  planned targets, simulated 50% withdrawals, payout marker

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-09-12 16:25:52 -05:00
co-authored by Claude Fable 5
parent 1bca441247
commit 50a5eb4713
21 changed files with 1854 additions and 142 deletions
+7 -2
View File
@@ -1,6 +1,7 @@
# AutoFirmer
Automated futures trading dashboard for prop firm accounts via Tradovate.
Automated futures trading dashboard for prop firm accounts via Tradovate and
TopstepX (ProjectX Gateway).
---
@@ -81,7 +82,11 @@ stores the Tradovate login for each firm.
master. The catalog is pulled at startup and then every 60 seconds
3. On the main page, each firm from the catalog appears. Firms without stored
credentials are greyed out — enter the Tradovate username and password in the
fields beside the firm name and click **Save**
fields beside the firm name and click **Save**. A firm whose platform is
**TopstepX** on the master asks for an API key instead (generated in the
TopstepX platform under Settings → API); the username is optional to store
but the ProjectX login needs it before the firm can connect, so add it when
you have it. Password is unused on TopstepX
4. Accounts populate once the firm connects. Each is matched to an account type
by its name prefix *and* its size, so a new account shows as **Unassigned**
until its opening funding transaction has been fetched. Use the **Account