From 7866d676765d59281aad385ce42f9377ad04da67 Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Sun, 27 Sep 2026 16:56:18 -0500 Subject: [PATCH] TopstepX: look back 90 days for trade history, not 27 A first funds check can only explain an account's balance with the trades the history window returns. P&L older than that is booked as a deposit, which the consistency math leaves out: an Express account whose only earlier trade was 64 days back read $5,071 short of its 40% rule instead of $1,542, and aimed tonight's leg at its best day. Tradovate is unchanged. Co-Authored-By: Claude Opus 5.5 --- lib/topstepx-class.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/topstepx-class.ts b/lib/topstepx-class.ts index 5e9ac0a..db7ed84 100644 --- a/lib/topstepx-class.ts +++ b/lib/topstepx-class.ts @@ -1214,7 +1214,10 @@ export class TopstepXClient implements PlatformClient { this.fetchDaysComplete = false; let failedAccounts = 0; - const start = new Date(Date.now() - 27 * 24 * 60 * 60 * 1000).toISOString(); + // 90 days: a first funds check can only explain the balance with what + // this window returns, and older P&L it misses is booked as a deposit + // — a trade 64 days back once cost an account its consistency credit. + const start = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000).toISOString(); const end = new Date(Date.now() + 60 * 60 * 1000).toISOString(); const mergePnL = (