69d8d1401d
Market expiry guard (executor.js): - getMarketOptions() now returns endDateIso, active, acceptingOrders from Gamma API response - executeBuy() skips immediately if market is closed / not accepting orders - executeBuy() skips if market closes within MIN_MARKET_TIME_LEFT seconds (default 300 s = 5 min), logging exact time remaining - Add MIN_MARKET_TIME_LEFT to config and .env.example FAK + 2% slippage (executor.js): - Replace OrderType.FOK with OrderType.FAK for both BUY and SELL market orders — eliminates "FOK fully filled or killed" failures - Reduce slippage from 5% to 2% (price * 1.02 / price * 0.98) - Fix zero-fill detection: FAK success with 0 shares logs "no liquidity" and retries instead of recording a phantom fill CLOB log sanitization (logger.js + index.js): - Add sanitizeClobMessage(): strips axios config object (auth headers) from [CLOB Client] dumps, keeps only HTTP status + error string - Add interceptConsole(): overrides console.error/warn globally - Call interceptConsole() at startup in index.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>