Live futures spreads off one client, and the master's max entry spread
One quote feed per machine: a TopstepX client's market hub, else a Tradovate client's market-data socket, subscribed to every listed root's front month and the drain micro. A supervisor keeps it on a working client, dropping one that fails or goes quiet while the market trades. The Auto draw weighs each instrument by its live spread (the typical tick when no fresh quote is at hand). No futures entry pays more than the master's max entry spread ($15 until set) to cross the book: the draw leaves such an instrument out, an explicit symbol sits the tick out, and fireLeg and the extra-day trade check it last before sending. The Settings page and the master's stats show the live spreads and the feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1782c16145
commit
db1d12327a
@@ -2215,6 +2215,15 @@ export class TradovateClient {
|
||||
);
|
||||
}
|
||||
|
||||
/** The market-data token, for the live quote feed (lib/live-quotes.ts);
|
||||
* null while logged out or when the user has no market data. */
|
||||
public quoteToken(): string | null {
|
||||
const info = this.accessInfo;
|
||||
if (!info?.mdAccessToken || info.hasMarketData === false) return null;
|
||||
const expiresAt = this.tokenExpiresAt();
|
||||
return expiresAt === 0 || expiresAt > Date.now() ? info.mdAccessToken : null;
|
||||
}
|
||||
|
||||
/** Liveness snapshot for /api/health and the registry supervisor. No tokens. */
|
||||
public health(): ClientHealth {
|
||||
const now = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user