Report each firm's trading mix: open positions and today's entries by instrument

The master knew how many accounts were in a trade, not in what. Each firm's
report now carries its open positions by instrument (accounts long and
short, contracts held) and today's entries the same way.

A position's contract is named by its instrument: DXtrade's carries the
symbol; a futures one is looked up among the contracts this machine has
entered (recorded at the fill and kept), then the resolver's cache and
TopstepX's own. Entries are counted as they fill, per trade date, in a
setting, so a restart doesn't lose the day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-09-27 18:50:56 -05:00
co-authored by Claude Opus 5.5
parent ab3132182a
commit 5696f2b036
5 changed files with 138 additions and 0 deletions
+17
View File
@@ -119,6 +119,23 @@ export interface FirmStats {
/** Futures firms: each CME root's entry cost, movement, expected hold and
* chance in the Auto draw right now. Optional. */
instrumentStats?: InstrumentStats;
/** What the firm is trading, by instrument: its open positions and
* today's entries (lib/trade-mix.ts). Optional. */
mix?: TradeMix;
}
/** One instrument's share of a firm's trading: accounts (open) or entries
* (today) on each side, and the contracts in them — units on DXtrade. */
export interface InstrumentCount {
instrument: string;
long: number;
short: number;
contracts: number;
}
export interface TradeMix {
open: InstrumentCount[];
today: InstrumentCount[];
}
/** A futures firm's instruments as the Auto draw sees them. */