diff --git a/README.md b/README.md index 5c35760..7bad65b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,32 @@ The API server must run on Windows. The `MetaTrader5` Python package used by machine with a logged-in MetaTrader 5 terminal. HTTP clients can connect from any operating system. +## Architecture + +```mermaid +graph TB + Client["HTTP Client
(Any OS)"] + + subgraph "Windows Host" + subgraph "FastAPI Application" + Middleware["Middleware Stack
CORS · Logging · Error Handler · Rate Limiter"] + Routers["Routers
health · symbols · market · account · history · calc · trading"] + Auth["API Key Security Dependency
Security(api_key_header) · verify_api_key"] + Deps["FastAPI Dependencies
MT5 Client Singleton · Format Negotiation"] + Formatters["Response Formatters
JSON · Parquet"] + Middleware --> Routers --> Deps --> Formatters + Auth -.-> Routers + Formatters --> Middleware + end + + Deps --> pdmt5["pdmt5
MT5 Client Library"] + pdmt5 --> MT5["MetaTrader 5
Terminal"] + end + + Client -- "HTTP/REST" --> Middleware + Middleware -- "JSON / Parquet" --> Client +``` + ## Features - REST endpoints for symbols, market data, account info, orders, history,