- ClOrdID: use numeric IDs (C++ strtoull parsed 'D-42' as 0)
- ExecType: handle FIX standard '150=F' for trades (was checking '1'/'2')
- Use order data from _pending instead of missing exec report tags
- Add MECore stage to pipeline visualizer (OEG > Book > MECore > Match)
- Log full C++ actor path: OEG > Book > MECore > Match > Trade > DB > CH
- Auto-restart FIX gateway on engine crash
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add librdkafka++1 to Docker runtime for eunex_meβ
The C++ binary links against librdkafka++.so.1 but only the C library
(librdkafka1) was installed in the runtime stage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add crash diagnostics: show eunex_me log output on startup failureβ
When eunex_me exits early or fails to listen, the error now includes
the last 20 lines of the log. Added /engine/log endpoint for debugging.
Also restart Python FIX gateway on failure to avoid leaving port 9001 dead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-start eunex_me when toggling C++ engine modeβ
When switching to C++ mode, automatically stop Python FIX gateway,
start the eunex_me binary, wait for it to listen on the FIX port,
then connect the bridge. When switching back, stop eunex_me and
restart the Python FIX gateway. Added process lifecycle management
with PID tracking, log files, and 30s startup timeout.
UI shows 'C++ Starting...' during the switch and disables the toggle.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix deadlock in CppEngineBridge causing Server not ready on HF Spacesβ
connect() held self._lock (threading.Lock) and called _send_logon() ->
_send_fix() which tried to acquire the same non-reentrant lock, causing
a deadlock. Flask thread hung forever, browser timed out.
Fix: Lock() -> RLock() (reentrant). Also add 10s fetch abort timeout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix JSON parse errors when server not ready (HF Spaces startup race)β
- Add Dual Engine Architecture section with Python/C++ diagram
- Document engine mode switch (UI toggle, API, FIX message flow)
- Add CppEngineBridge architecture diagram to developers guide
- Update project structure with Python services and .env
- Add LLM trading strategy to AI Trading Members section
- Update roadmap to v0.9.5 with all completed features
- Mark Engine Mode Switch as completed in Next Steps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.9.5: Engine mode switch β Python or C++ matching engineβ
- Add CppEngineBridge: FIX 4.4 TCP client connecting to eunex_me:9001
- Toggle switch in dashboard header to switch between Python and C++ engine
- Green/red dot shows C++ engine availability (health check every 15s)
- Orders route through FIX protocol when C++ mode is active
- Receives ExecutionReports and updates dashboard state in real-time
- Message Flow shows [C++] prefix for orders routed to C++ engine
- GET/POST /engine/mode API for programmatic control
- Simulation and seed orders always use Python engine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.9.4: Document .env configuration and AI features in READMEβ
- Add Configuration (.env) section with all environment variables
- Add AI Market Analyst section explaining provider fallback chain
- Update Clearing House section with LLM strategy
- Add .env to project structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.9.3: Add .env config, auto-load env vars in shared/config.pyβ
- Add .env with LLM_PROVIDER, OLLAMA_MODEL, HF_MODEL defaults
- shared/config.py auto-loads .env (with or without python-dotenv)
- Dashboard reads LLM_PROVIDER from env for provider selection
- HF Space uses HF_TOKEN secret + auto fallback to free model
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.9.3: Add .env support with auto-loader in shared configβ
- Read HF_TOKEN from ~/.cache/huggingface/token when env var not set
- Add detailed logging for all LLM providers (Ollama, Groq, HF errors)
- Fix CH ai_trader HF URL: use router.huggingface.co instead of api-inference
- Add method="POST" to HF request in dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.9.1: Fix Ollama integration, thin volume bars, model selector with health checkβ
- Fix AI Analyst hanging forever: broadcast error event on LLM failure
- Add Ollama health check endpoint with green/red status indicator
- Add Ollama model list endpoint and model selector dropdown in UI
- Fix _try_ollama: increase timeout to 120s, log errors instead of swallowing
- Make volume chart bars thin with constant width (maxBarThickness: 6)
- Ticker background more distinct (#162040 with accent borders and shadow)
- CH ai_trader: increase Ollama timeout and log errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Price chart split into two canvases: thin candlesticks + close line above, volume bars below
- Ticker tape with gradient background and accent borders for visibility
- Message Flow Visualizer now interactive: click orders to see their pipeline path with animated stages
- Backend passes orderId/tradeId through all log_message calls for message grouping
- New LLM trading strategy for CH members with Ollama/Groq/HuggingFace fallback
- CH dashboard with strategy dropdown and LLM explanation panel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.8.0: AI Market Analyst and Developer Message Flow Visualizerβ
F5: AI Analyst with three-provider fallback (Ollama/Groq/HuggingFace).
Builds market context prompt from live trades and order book, generates
3-4 sentence analysis. Provider switchable from UI. Insights broadcast
via SSE and cached in memory.
F6: Message Flow Visualizer traces the full order lifecycle through
OEG -> Book -> Match -> Trade -> DB -> CH pipeline. Uses function
patching to intercept engine methods. Shows per-stage counters and
live log with monospace formatting.
Dashboard now has 3 tabs: Trading, AI Analyst, Message Flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.7.0: Daily close persistence, ticker tape, OHLCV candlestick chartβ
End Day saves closing prices to daily_close SQLite table. Start Day
loads previous closing prices and uses them as seed prices for market
continuity across sessions. Dashboard adds scrolling ticker tape with
real-time prices and percentage change. Chart upgraded to candlestick
rendering with OHLCV wicks and color-coded volume bars.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
C++ AITraderActor now uses per-symbol reference prices matching real
market levels instead of hardcoded 100-200 range. Dashboard adds
MarketSimulator thread that auto-generates orders and crossing trades
every 30s when session is active. Config updated with all 7 symbols.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.6.0: Add 7 real stock symbols with current market pricesβ
Replace EURO50 with TSLA, NVDA, AMD, ENX alongside existing AAPL, MSFT,
GOOGL. Seed orders use real market prices. Refactor main.cpp to loop-based
book creation for all 7 symbols. Update FIX symbol mappings and tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Professional HTML version of the developers guide with Inter/JetBrains
Mono fonts, SVG architecture diagrams, color-coded components, and
print-optimized CSS for PDF export via browser.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Dashboard, Clearing House UI and KafkaBus to architecture diagramsβ
Section 2: Full presentation layer (nginx, Dashboard :8090, CH UI :8091)
with thread-safe reads from MDGActor/ClearingHouseActor, plus KafkaBus.
Section 4: Dashboard/CH UI read connections, KafkaBus in core layout.
Section 5: Dashboard and CH UI as Market Data Flow consumers via nginx.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Kafka Bus to Architecture, Actor Topology and Data Flow diagramsβ
Update developers-guide sections 2, 4, 5 to show KafkaBus publishing
orders/trades/market-data to Kafka topics from MECoreActor, alongside
the existing Event::Pipe flows to MDGActor and ClearingHouseActor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add KafkaBus multi-topic publisher mirroring Optiq KFK between ME and
downstream consumers. MECoreActor publishes orders, trades, and BBO
snapshots to Kafka when EUNEX_KAFKA_BROKERS is set. No-op stub compiles
when EUNEX_USE_KAFKA is OFF. Switch Docker from bitnami/kafka to
apache/kafka:3.9.0 (KRaft mode). Add .dockerignore, update docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bitnami/kafka:3.7 tag was removed from Docker Hub.
Update to 3.9 (current KRaft-compatible release).
Remove deprecated 'version' attribute from docker-compose.yml.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix garbled Unicode box-drawing chars in Windows console outputβ
Replace UTF-8 box-drawing characters (β, β) with ASCII equivalents
(=, -) so output displays correctly on Windows consoles that use
legacy codepages. Update version to v0.5.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Stop orders and trading phases (PreOpen/Opening/CTS)β
Stop orders:
- StopMarket: parks until trade price crosses stopPrice, then becomes Market
- StopLimit: parks until triggered, then becomes Limit at order price
- Buy stops trigger when price rises >= stopPrice
- Sell stops trigger when price falls <= stopPrice
- Cancel support for parked stop orders
Trading phases:
- PreOpen: accumulate orders without matching, IOP calculation
- Opening: uncrossing at IOP (max execution, min surplus tiebreaker)
- CTS: normal continuous price-time priority matching
- Closed: reject all orders
12 new tests (6 stop order + 6 trading phase), all 7 suites pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename modules to Optiq naming and add Developers Guideβ
Implement FIX gateway, Clearing House, and AI traders as proper C++
actors matching the Optiq architecture, replacing the Python-only
approach from v0.3.0.
New actors:
- FIXGatewayActor: C++ TCP FIX 4.4 acceptor (Logon, NewOrder, Cancel, Amend)
- ClearingHouseActor: Trade clearing, member positions, leaderboard
- AITraderActor: 10 members (MBR01-10) with momentum/mean_revert/random strategies
Changes:
- OrderBook: Trade now carries buySessionId/sellSessionId
- OrderBookActor: Optional clearing house pipe for trade forwarding
- OEGatewayActor: NewOrderEvent handler + exec report subscriber forwarding
- main.cpp: Full 4-core topology (OEG+FIX, Books, MarketData, CH+AI)
- SocketCompat.hpp: Cross-platform socket abstraction (winsock2/POSIX)
- CMakeLists.txt: New sources, ws2_32 on Windows, 3 new test targets
- 6 test suites (44 tests total), all passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.3.0: FIX gateway, Clearing House with AI traders, enhanced dashboardβ
MSVC transitively includes <memory> via other headers, masking the
missing include. GCC 11.4 requires it explicitly for std::shared_ptr.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.2.0: Multi-threaded actor engine, Kafka persistence, web dashboardβ
- Replace single-threaded Simplx shim with multi-threaded actor engine
(per-core threads, mailbox queues, cross-core async event delivery)
- Add abstract PersistenceStore with InMemoryStore and KafkaStore
- Add Docker Compose with Kafka KRaft mode (no Zookeeper)
- Add Flask web dashboard with SSE streaming, order book view, trade
blotter, BBO snapshots, and session controls
- Add 6 multi-threaded engine tests (26 total tests pass)
- Support EQU (Cash/Equities) and EQD (Derivatives) segments
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Initial commit: C++ actor-based matching engine (Optiq architecture)β
Port of StockEx Python prototype to C++ with Simplx-compatible actor framework.
Includes price-time priority OrderBook, OEGateway/OrderBook/MarketData actors,
Recovery Cause/Effect (Master/Mirror HA), IACA fragment chain aggregation,
and 20 passing tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>