docs: Update README and developers guide for v0.9.5
Browse files- 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>
- README.md +47 -6
- docs/developers-guide.md +154 -23
README.md
CHANGED
|
@@ -27,7 +27,7 @@ ch_ai_trader.py β ClearingHouseActor β Clearing House (P
|
|
| 27 |
AI strategies β AITraderActor β Trading obligations
|
| 28 |
```
|
| 29 |
|
| 30 |
-
## Actor Topology (v0.
|
| 31 |
|
| 32 |
```
|
| 33 |
Core 0: OEGActor + FIXAcceptorActor β Order entry & FIX protocol
|
|
@@ -36,6 +36,43 @@ ch_ai_trader.py β ClearingHouseActor β Clearing House (P
|
|
| 36 |
Core 3: ClearingHouseActor + AITrader β Post-trade & AI members
|
| 37 |
```
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
## Service Architecture
|
| 40 |
|
| 41 |
```
|
|
@@ -54,6 +91,7 @@ ch_ai_trader.py β ClearingHouseActor β Clearing House (P
|
|
| 54 |
β OHLCV History β β Portfolios β β Amend/ExecRpt β
|
| 55 |
β SQLite DB β β Settlements β β β
|
| 56 |
β SSE Streaming β β β β β
|
|
|
|
| 57 |
ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ
|
| 58 |
β β β
|
| 59 |
βββββββββββββββββββββ΄βββββββββββββββββββββ
|
|
@@ -106,11 +144,13 @@ docker compose up --build
|
|
| 106 |
cmake -B build -DEUNEX_BUILD_TESTS=ON
|
| 107 |
cmake --build build --config Release
|
| 108 |
|
| 109 |
-
# Run matching engine
|
| 110 |
./build/Release/eunex_me
|
| 111 |
|
| 112 |
# Run all tests (7 suites)
|
| 113 |
cd build && ctest -C Release
|
|
|
|
|
|
|
| 114 |
```
|
| 115 |
|
| 116 |
## With Kafka Persistence
|
|
@@ -267,7 +307,8 @@ EuNEx/
|
|
| 267 |
5. ~~Market simulation~~ β Realistic AI trading + Dashboard auto-simulation
|
| 268 |
6. ~~AI Analyst~~ β Ollama/Groq/HuggingFace market commentary
|
| 269 |
7. ~~Message Flow Visualizer~~ β Developer pipeline tracing tool
|
| 270 |
-
8.
|
| 271 |
-
9. **
|
| 272 |
-
10. **
|
| 273 |
-
11. **
|
|
|
|
|
|
| 27 |
AI strategies β AITraderActor β Trading obligations
|
| 28 |
```
|
| 29 |
|
| 30 |
+
## Actor Topology (v0.9)
|
| 31 |
|
| 32 |
```
|
| 33 |
Core 0: OEGActor + FIXAcceptorActor β Order entry & FIX protocol
|
|
|
|
| 36 |
Core 3: ClearingHouseActor + AITrader β Post-trade & AI members
|
| 37 |
```
|
| 38 |
|
| 39 |
+
## Dual Engine Architecture
|
| 40 |
+
|
| 41 |
+
The dashboard can run in two modes, switchable at runtime via a toggle in the UI:
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
βββββββββββββββββββββββββββββββββββββ
|
| 45 |
+
β Browser (:8090) β
|
| 46 |
+
β [Python ββββββ C++] toggle β
|
| 47 |
+
ββββββββββββββββ¬βββββββββββββββββββββ
|
| 48 |
+
β
|
| 49 |
+
ββββββββββββββββΌβββββββββββββββββββββ
|
| 50 |
+
β Dashboard (Flask :8090) β
|
| 51 |
+
β β
|
| 52 |
+
β ββββββββββββββ βββββββββββββββ β
|
| 53 |
+
β β Python ME β β C++ Bridge β β
|
| 54 |
+
β βMatchingEng β β FIX 4.4 TCP β β
|
| 55 |
+
β β(built-in) β β client β β
|
| 56 |
+
β ββββββββ¬ββββββ ββββββββ¬βββββββ β
|
| 57 |
+
β mode=python mode=cpp β
|
| 58 |
+
ββββββββββββββββββββββββββββΌβββββββββ
|
| 59 |
+
β FIX 4.4 TCP
|
| 60 |
+
βΌ
|
| 61 |
+
ββββββββββββββββββββββββββββββββββββββββ
|
| 62 |
+
β C++ Matching Engine β
|
| 63 |
+
β eunex_me (:9001) β
|
| 64 |
+
β β
|
| 65 |
+
β OEG β MECore β MDG β ClearingHouse β
|
| 66 |
+
β FIXAcceptorActor (TCP :9001) β
|
| 67 |
+
β Multi-threaded actors β
|
| 68 |
+
ββββββββββββββββββββββββββββββββββββββββ
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
| Mode | Engine | How orders are matched | Use case |
|
| 72 |
+
|------|--------|----------------------|----------|
|
| 73 |
+
| **Python** | Built-in `MatchingEngine` | In-process, same Flask app | Demo, learning, no compilation needed |
|
| 74 |
+
| **C++** | `eunex_me` via FIX 4.4 | TCP to C++ actors on port 9001 | Production-like, microsecond latency |
|
| 75 |
+
|
| 76 |
## Service Architecture
|
| 77 |
|
| 78 |
```
|
|
|
|
| 91 |
β OHLCV History β β Portfolios β β Amend/ExecRpt β
|
| 92 |
β SQLite DB β β Settlements β β β
|
| 93 |
β SSE Streaming β β β β β
|
| 94 |
+
β Engine Switch β β LLM Trading β β β
|
| 95 |
ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ
|
| 96 |
β β β
|
| 97 |
βββββββββββββββββββββ΄βββββββββββββββββββββ
|
|
|
|
| 144 |
cmake -B build -DEUNEX_BUILD_TESTS=ON
|
| 145 |
cmake --build build --config Release
|
| 146 |
|
| 147 |
+
# Run matching engine (FIX server on port 9001)
|
| 148 |
./build/Release/eunex_me
|
| 149 |
|
| 150 |
# Run all tests (7 suites)
|
| 151 |
cd build && ctest -C Release
|
| 152 |
+
|
| 153 |
+
# Use with dashboard: start eunex_me, then toggle "C++" in the dashboard header
|
| 154 |
```
|
| 155 |
|
| 156 |
## With Kafka Persistence
|
|
|
|
| 307 |
5. ~~Market simulation~~ β Realistic AI trading + Dashboard auto-simulation
|
| 308 |
6. ~~AI Analyst~~ β Ollama/Groq/HuggingFace market commentary
|
| 309 |
7. ~~Message Flow Visualizer~~ β Developer pipeline tracing tool
|
| 310 |
+
8. ~~Engine Mode Switch~~ β Python β C++ toggle with FIX 4.4 bridge
|
| 311 |
+
9. **SBE encoding** β replace event structs with SBE-encoded messages
|
| 312 |
+
10. **Master/Mirror failover** β implement full Recovery replay on Mirror node
|
| 313 |
+
11. **Trading phases** β pre-open, uncrossing, continuous, close, TAL
|
| 314 |
+
12. **Additional order types** β Stop, Pegged, Mid-Point, Iceberg
|
docs/developers-guide.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# EuNEx Developers Guide
|
| 2 |
|
| 3 |
-
**Version 0.
|
| 4 |
|
| 5 |
---
|
| 6 |
|
|
@@ -22,10 +22,11 @@
|
|
| 22 |
14. [Market Simulation](#14-market-simulation)
|
| 23 |
15. [AI Market Analyst](#15-ai-market-analyst)
|
| 24 |
16. [Developer Message Flow Visualizer](#16-developer-message-flow-visualizer)
|
| 25 |
-
17. [
|
| 26 |
-
18. [
|
| 27 |
-
19. [
|
| 28 |
-
20. [
|
|
|
|
| 29 |
|
| 30 |
---
|
| 31 |
|
|
@@ -35,7 +36,7 @@ EuNEx (Euronext Exchange Simulator) is a C++20 actor-based matching engine that
|
|
| 35 |
|
| 36 |
```
|
| 37 |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 38 |
-
β EuNEx v0.
|
| 39 |
β β
|
| 40 |
β FIX 4.4 Clients βββΊ OEG βββΊ ME (per symbol) βββΊ MDG β
|
| 41 |
β β β β
|
|
@@ -824,7 +825,7 @@ docker compose up --build
|
|
| 824 |
β β MBR03 β 202 β Random β Noise trader β β
|
| 825 |
β β MBR04 β 203 β Momentum β β β
|
| 826 |
β β ... β ... β (rotates) β β β
|
| 827 |
-
β β MBR10 β 209 β
|
| 828 |
β ββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄βββββββββββββββ β
|
| 829 |
β β
|
| 830 |
β Strategy Details: β
|
|
@@ -844,6 +845,13 @@ docker compose up --build
|
|
| 844 |
β β random side (50/50), random qty (10-100) β β
|
| 845 |
β β price around midpoint with random spread β β
|
| 846 |
β β β β
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
| 848 |
β β
|
| 849 |
β Data Sources: β
|
|
@@ -1045,7 +1053,112 @@ The visualizer uses Python function patching to intercept the matching engine me
|
|
| 1045 |
|
| 1046 |
---
|
| 1047 |
|
| 1048 |
-
## 17.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1049 |
|
| 1050 |
```
|
| 1051 |
EuNEx/
|
|
@@ -1088,6 +1201,25 @@ The visualizer uses Python function patching to intercept the matching engine me
|
|
| 1088 |
β βββ PersistenceStore.hpp Store interface
|
| 1089 |
β βββ KafkaStore.hpp Kafka adapter (optional, librdkafka)
|
| 1090 |
β
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1091 |
βββ tests/
|
| 1092 |
β βββ test_orderbook.cpp Book unit tests (26 cases)
|
| 1093 |
β βββ test_matching_engine.cpp ME integration tests
|
|
@@ -1107,7 +1239,7 @@ The visualizer uses Python function patching to intercept the matching engine me
|
|
| 1107 |
|
| 1108 |
---
|
| 1109 |
|
| 1110 |
-
##
|
| 1111 |
|
| 1112 |
### Prerequisites
|
| 1113 |
|
|
@@ -1166,7 +1298,7 @@ cd build && ctest -C Release --output-on-failure
|
|
| 1166 |
|
| 1167 |
---
|
| 1168 |
|
| 1169 |
-
##
|
| 1170 |
|
| 1171 |
### Runtime Configuration (main.cpp)
|
| 1172 |
|
|
@@ -1195,7 +1327,7 @@ The engine pre-populates order books with spread-defining orders:
|
|
| 1195 |
|
| 1196 |
---
|
| 1197 |
|
| 1198 |
-
##
|
| 1199 |
|
| 1200 |
### Adding a New Symbol
|
| 1201 |
|
|
@@ -1230,8 +1362,8 @@ The engine pre-populates order books with spread-defining orders:
|
|
| 1230 |
### Future Roadmap
|
| 1231 |
|
| 1232 |
```
|
| 1233 |
-
Current (v0.
|
| 1234 |
-
ββββββββββββββ
|
| 1235 |
|
| 1236 |
β Limit + Market + Stop orders β‘ Pegged, Mid-Point, Iceberg
|
| 1237 |
β IOC, FOK, Day β‘ GTD, GTC, VFU, VFCU
|
|
@@ -1244,17 +1376,16 @@ The engine pre-populates order books with spread-defining orders:
|
|
| 1244 |
β Clearing house + AI traders β‘ EuroCCP/LCH integration
|
| 1245 |
β IACA fragments β‘ IACA FINISH + COPY + IDS
|
| 1246 |
β Python bridge (JSON) β‘ SBE multicast MDG
|
| 1247 |
-
β Market simulation (C++ + Py) β‘
|
| 1248 |
-
β Ticker tape + OHLCV charts β‘
|
| 1249 |
-
β Daily close persistence β‘
|
| 1250 |
-
β AI Analyst (Ollama/Groq/HF)
|
| 1251 |
-
β
|
| 1252 |
-
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
-
β‘ PTB (Post-Trade Box)
|
| 1256 |
```
|
| 1257 |
|
| 1258 |
---
|
| 1259 |
|
| 1260 |
-
*Generated for EuNEx v0.
|
|
|
|
| 1 |
# EuNEx Developers Guide
|
| 2 |
|
| 3 |
+
**Version 0.9.5** | Euronext Optiq-Modeled Exchange Simulator
|
| 4 |
|
| 5 |
---
|
| 6 |
|
|
|
|
| 22 |
14. [Market Simulation](#14-market-simulation)
|
| 23 |
15. [AI Market Analyst](#15-ai-market-analyst)
|
| 24 |
16. [Developer Message Flow Visualizer](#16-developer-message-flow-visualizer)
|
| 25 |
+
17. [Engine Mode Switch](#17-engine-mode-switch)
|
| 26 |
+
18. [Project Structure](#18-project-structure)
|
| 27 |
+
19. [Build & Test](#19-build--test)
|
| 28 |
+
20. [Configuration](#20-configuration)
|
| 29 |
+
21. [Extending EuNEx](#21-extending-eunex)
|
| 30 |
|
| 31 |
---
|
| 32 |
|
|
|
|
| 36 |
|
| 37 |
```
|
| 38 |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 39 |
+
β EuNEx v0.9.5 β
|
| 40 |
β β
|
| 41 |
β FIX 4.4 Clients βββΊ OEG βββΊ ME (per symbol) βββΊ MDG β
|
| 42 |
β β β β
|
|
|
|
| 825 |
β β MBR03 β 202 β Random β Noise trader β β
|
| 826 |
β β MBR04 β 203 β Momentum β β β
|
| 827 |
β β ... β ... β (rotates) β β β
|
| 828 |
+
β β MBR10 β 209 β Random β β β
|
| 829 |
β ββββββββββ΄ββββββββββββ΄βββββββββββββββββ΄βββββββββββββββ β
|
| 830 |
β β
|
| 831 |
β Strategy Details: β
|
|
|
|
| 845 |
β β random side (50/50), random qty (10-100) β β
|
| 846 |
β β price around midpoint with random spread β β
|
| 847 |
β β β β
|
| 848 |
+
β β LLM (Python CH only): β β
|
| 849 |
+
β β sends portfolio + market data to LLM β β
|
| 850 |
+
β β expects JSON response: symbol, side, quantity, price, reason β β
|
| 851 |
+
β β uses same provider chain as AI Analyst β β
|
| 852 |
+
β β falls back to random on LLM failure β β
|
| 853 |
+
β β explanations shown in CH dashboard panel β β
|
| 854 |
+
β β β β
|
| 855 |
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
| 856 |
β β
|
| 857 |
β Data Sources: β
|
|
|
|
| 1053 |
|
| 1054 |
---
|
| 1055 |
|
| 1056 |
+
## 17. Engine Mode Switch
|
| 1057 |
+
|
| 1058 |
+
The dashboard supports two matching engine backends, switchable at runtime via a toggle in the header.
|
| 1059 |
+
|
| 1060 |
+
### Architecture
|
| 1061 |
+
|
| 1062 |
+
```
|
| 1063 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1064 |
+
β Dashboard (Flask :8090) β
|
| 1065 |
+
β β
|
| 1066 |
+
β βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ β
|
| 1067 |
+
β β Python MatchingEngine β β CppEngineBridge β β
|
| 1068 |
+
β β (built-in, default) β β (FIX 4.4 TCP client) β β
|
| 1069 |
+
β β β β β β
|
| 1070 |
+
β β β’ In-process order book β β β’ Connects to :9001 β β
|
| 1071 |
+
β β β’ Price-time priority β β β’ Sends NewOrderSingle(D) β β
|
| 1072 |
+
β β β’ No compilation needed β β β’ Sends CancelRequest (F) β β
|
| 1073 |
+
β β β’ SQLite persistence β β β’ Sends CancelReplace (G) β β
|
| 1074 |
+
β β β’ Good for demos β β β’ Receives ExecReport (8) β β
|
| 1075 |
+
β ββββββββββββββββββββββββββββββββ β β’ Logon/Logout/Heartbeat β β
|
| 1076 |
+
β ββββββββββββββββ¬ββββββββββββββββ β
|
| 1077 |
+
β _active_engine() β β
|
| 1078 |
+
β returns engine or cpp_bridge β β
|
| 1079 |
+
β based on engine_mode variable β β
|
| 1080 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ
|
| 1081 |
+
β
|
| 1082 |
+
FIX 4.4 TCP :9001
|
| 1083 |
+
β
|
| 1084 |
+
βΌ
|
| 1085 |
+
βββββββββββββββββββββββββββββ
|
| 1086 |
+
β eunex_me (C++ engine) β
|
| 1087 |
+
β FIXAcceptorActor :9001 β
|
| 1088 |
+
β OEG β MECore β MDG β CH β
|
| 1089 |
+
βββββββββββββββββββββββββββββ
|
| 1090 |
+
```
|
| 1091 |
+
|
| 1092 |
+
### Switching Modes
|
| 1093 |
+
|
| 1094 |
+
**From the UI:**
|
| 1095 |
+
The header contains a toggle switch `[Python βββββ C++]` with a status dot:
|
| 1096 |
+
- **Green dot**: C++ engine is running and reachable on port 9001
|
| 1097 |
+
- **Red dot**: C++ engine not detected
|
| 1098 |
+
- Health check runs every 15 seconds
|
| 1099 |
+
|
| 1100 |
+
**From the API:**
|
| 1101 |
+
```bash
|
| 1102 |
+
# Check current mode and C++ availability
|
| 1103 |
+
GET /engine/mode
|
| 1104 |
+
β {"mode": "python", "cpp_available": true, "cpp_host": "localhost", "cpp_port": 9001}
|
| 1105 |
+
|
| 1106 |
+
# Switch to C++ engine
|
| 1107 |
+
POST /engine/mode {"mode": "cpp"}
|
| 1108 |
+
β {"mode": "cpp"}
|
| 1109 |
+
|
| 1110 |
+
# Switch back to Python
|
| 1111 |
+
POST /engine/mode {"mode": "python"}
|
| 1112 |
+
β {"mode": "python"}
|
| 1113 |
+
```
|
| 1114 |
+
|
| 1115 |
+
### Order Routing
|
| 1116 |
+
|
| 1117 |
+
When `engine_mode == "cpp"`:
|
| 1118 |
+
1. Dashboard builds a FIX `NewOrderSingle` (35=D) message
|
| 1119 |
+
2. Sends it over TCP to `eunex_me:9001`
|
| 1120 |
+
3. C++ engine matches and returns `ExecutionReport` (35=8)
|
| 1121 |
+
4. Bridge parses the response and updates dashboard state (orders, trades, snapshots)
|
| 1122 |
+
5. SSE events broadcast to browser as usual
|
| 1123 |
+
|
| 1124 |
+
When `engine_mode == "python"`:
|
| 1125 |
+
- Orders processed by the built-in `MatchingEngine` class (default behavior)
|
| 1126 |
+
|
| 1127 |
+
**Simulation orders** (`source=sim`, `source=seed`) always use the Python engine regardless of mode.
|
| 1128 |
+
|
| 1129 |
+
### FIX Message Flow (C++ Mode)
|
| 1130 |
+
|
| 1131 |
+
```
|
| 1132 |
+
Browser Dashboard C++ Engine
|
| 1133 |
+
βββββββ βββββββββ ββββββββββ
|
| 1134 |
+
β POST /order/new β β
|
| 1135 |
+
β ββββββββββββββββββΊ β β
|
| 1136 |
+
β β 35=D NewOrderSingle β
|
| 1137 |
+
β β βββββββββββββββββββββΊ β
|
| 1138 |
+
β β Book::newOrder()
|
| 1139 |
+
β β match β Trade
|
| 1140 |
+
β β 35=8 ExecutionReport β
|
| 1141 |
+
β β βββββββββββββββββββββ β
|
| 1142 |
+
β β update state, SSE β
|
| 1143 |
+
β SSE: order, trade β β
|
| 1144 |
+
β ββββββββββββββββββ β β
|
| 1145 |
+
```
|
| 1146 |
+
|
| 1147 |
+
### Connection Lifecycle
|
| 1148 |
+
|
| 1149 |
+
```
|
| 1150 |
+
Toggle ON (β C++) Toggle OFF (β Python)
|
| 1151 |
+
βββββββββββββββββββ ββββββββββββββββββββββββ
|
| 1152 |
+
1. TCP connect(:9001) 1. Send FIX Logout (35=5)
|
| 1153 |
+
2. Send FIX Logon (35=A) 2. Close TCP socket
|
| 1154 |
+
3. Start recv thread 3. Set mode = "python"
|
| 1155 |
+
4. Set mode = "cpp" 4. Orders route to MatchingEngine
|
| 1156 |
+
5. Orders route to bridge
|
| 1157 |
+
```
|
| 1158 |
+
|
| 1159 |
+
---
|
| 1160 |
+
|
| 1161 |
+
## 18. Project Structure
|
| 1162 |
|
| 1163 |
```
|
| 1164 |
EuNEx/
|
|
|
|
| 1201 |
β βββ PersistenceStore.hpp Store interface
|
| 1202 |
β βββ KafkaStore.hpp Kafka adapter (optional, librdkafka)
|
| 1203 |
β
|
| 1204 |
+
βββ dashboard/
|
| 1205 |
+
β βββ app.py Flask dashboard + dual engine bridge
|
| 1206 |
+
β βββ database.py SQLite (orders, trades, OHLCV)
|
| 1207 |
+
β βββ templates/index.html Trading UI with engine toggle
|
| 1208 |
+
οΏ½οΏ½οΏ½
|
| 1209 |
+
βββ clearing_house/
|
| 1210 |
+
β βββ app.py Flask CH portal + API
|
| 1211 |
+
β βββ ch_database.py SQLite (members, holdings)
|
| 1212 |
+
β βββ ch_ai_trader.py AI trading (momentum/mean_revert/random/llm)
|
| 1213 |
+
β βββ templates/ CH web UI (leaderboard, portfolios)
|
| 1214 |
+
β
|
| 1215 |
+
βββ fix_gateway/
|
| 1216 |
+
β βββ fix_server.py Python FIX 4.4 TCP acceptor
|
| 1217 |
+
β
|
| 1218 |
+
βββ shared/
|
| 1219 |
+
β βββ config.py Centralized config (auto-loads .env)
|
| 1220 |
+
β
|
| 1221 |
+
βββ .env LLM and service configuration
|
| 1222 |
+
β
|
| 1223 |
βββ tests/
|
| 1224 |
β βββ test_orderbook.cpp Book unit tests (26 cases)
|
| 1225 |
β βββ test_matching_engine.cpp ME integration tests
|
|
|
|
| 1239 |
|
| 1240 |
---
|
| 1241 |
|
| 1242 |
+
## 19. Build & Test
|
| 1243 |
|
| 1244 |
### Prerequisites
|
| 1245 |
|
|
|
|
| 1298 |
|
| 1299 |
---
|
| 1300 |
|
| 1301 |
+
## 20. Configuration
|
| 1302 |
|
| 1303 |
### Runtime Configuration (main.cpp)
|
| 1304 |
|
|
|
|
| 1327 |
|
| 1328 |
---
|
| 1329 |
|
| 1330 |
+
## 21. Extending EuNEx
|
| 1331 |
|
| 1332 |
### Adding a New Symbol
|
| 1333 |
|
|
|
|
| 1362 |
### Future Roadmap
|
| 1363 |
|
| 1364 |
```
|
| 1365 |
+
Current (v0.9.5) Planned
|
| 1366 |
+
ββββββββββββββββ βββββββββββββββββββββββββββββββββββ
|
| 1367 |
|
| 1368 |
β Limit + Market + Stop orders β‘ Pegged, Mid-Point, Iceberg
|
| 1369 |
β IOC, FOK, Day β‘ GTD, GTC, VFU, VFCU
|
|
|
|
| 1376 |
β Clearing house + AI traders β‘ EuroCCP/LCH integration
|
| 1377 |
β IACA fragments β‘ IACA FINISH + COPY + IDS
|
| 1378 |
β Python bridge (JSON) β‘ SBE multicast MDG
|
| 1379 |
+
β Market simulation (C++ + Py) β‘ Multi-day backtesting
|
| 1380 |
+
β Ticker tape + OHLCV charts β‘ SATURN ARM (MiFID II RTS 22)
|
| 1381 |
+
β Daily close persistence β‘ PTB (Post-Trade Box)
|
| 1382 |
+
β AI Analyst (Ollama/Groq/HF)
|
| 1383 |
+
β LLM trading strategy (CH)
|
| 1384 |
+
β Message Flow Visualizer
|
| 1385 |
+
β Engine mode switch (Py β C++)
|
| 1386 |
+
β .env auto-loading config
|
|
|
|
| 1387 |
```
|
| 1388 |
|
| 1389 |
---
|
| 1390 |
|
| 1391 |
+
*Generated for EuNEx v0.9.5 β Euronext Optiq Architecture Simulator*
|