How lucifer516-sudoer/syntiq_mt5 works
syntiq-mt5 is a typed Python interface to MetaTrader 5. The principal workflow is to create a managed session, initialize and authenticate the process-global terminal, request account, market, history, or trading data through the session, and receive validated typed values or operation-specific errors; leaving the context shuts the terminal down. The graph emphasizes the session and domain models, plus the adapter/native boundary and shared model/pricing layer. Several session methods and cleanup details are documented, but their implementation excerpts are incomplete, so those links are limited to indexed references or explicit README statements.
Main entry points: session.py Managed session · model.py Model base · native.py Native bridge · models.py Symbol and quote
Components 20
Session and transport
- Managed session
src/syntiq_mt5/session.py - Adapter seam
src/syntiq_mt5/adapter.py - Native bridge
src/syntiq_mt5/_internal/native.py - Typed errors
src/syntiq_mt5/errors.py
Market data
- Symbol and quote
src/syntiq_mt5/symbols/models.py - OHLCV candles
src/syntiq_mt5/market/candles.py - Tick records
src/syntiq_mt5/ticks/models.py - Market book
src/syntiq_mt5/market_book/models.py
Trading and history
- Open positions
src/syntiq_mt5/positions/models.py - Orders and requests
src/syntiq_mt5/orders/models.py - Trade history
src/syntiq_mt5/history/models.py
Typed models
- Model base
src/syntiq_mt5/_internal/model.py - Pip pricing
src/syntiq_mt5/_internal/pricing.py - Protocol constants
src/syntiq_mt5/constants.py - Typed enums
src/syntiq_mt5/enums.py - Account snapshot
src/syntiq_mt5/account/models.py - Login credentials
src/syntiq_mt5/connection/models.py - Terminal snapshot
src/syntiq_mt5/terminal/models.py
Other components
- Python caller
- MT5 terminal
Connections 33
- Python caller → Managed session: creates and enters
README.md - Managed session → Adapter seam: uses transport
src/syntiq_mt5/session.py - Managed session → Native bridge: uses bridge
src/syntiq_mt5/session.py - Native bridge → Adapter seam: references
src/syntiq_mt5/_internal/native.py - Native bridge → Typed errors: raises
src/syntiq_mt5/_internal/native.py - Native bridge → MT5 terminal: accesses extension
README.md - Managed session → Typed errors: reports failures
src/syntiq_mt5/session.py - Managed session → Login credentials: accepts credentials
src/syntiq_mt5/session.py - Managed session → Account snapshot: parses account
src/syntiq_mt5/session.py - Managed session → Terminal snapshot: parses terminal state
src/syntiq_mt5/session.py - Managed session → Symbol and quote: parses symbol data
src/syntiq_mt5/session.py - Managed session → OHLCV candles: parses candle rows
src/syntiq_mt5/session.py - Managed session → Tick records: parses tick rows
src/syntiq_mt5/session.py - Managed session → Market book: parses book data
src/syntiq_mt5/session.py - Managed session → Open positions: parses positions
src/syntiq_mt5/session.py - Managed session → Orders and requests: handles trade results
src/syntiq_mt5/session.py - Managed session → Trade history: parses history
src/syntiq_mt5/session.py - Account snapshot → Model base: extends
src/syntiq_mt5/account/models.py - Login credentials → Model base: extends
src/syntiq_mt5/connection/models.py - Terminal snapshot → Model base: extends
src/syntiq_mt5/terminal/models.py - Symbol and quote → Model base: extends
src/syntiq_mt5/symbols/models.py - Symbol and quote → Pip pricing: calculates pip size
src/syntiq_mt5/symbols/models.py - Open positions → Model base: extends
src/syntiq_mt5/positions/models.py - Open positions → Pip pricing: calculates pip size
src/syntiq_mt5/positions/models.py - OHLCV candles → Model base: extends
src/syntiq_mt5/market/candles.py - Tick records → Model base: extends
src/syntiq_mt5/ticks/models.py - Tick records → Protocol constants: checks flags
src/syntiq_mt5/ticks/models.py - Market book → Model base: extends
src/syntiq_mt5/market_book/models.py - Orders and requests → Model base: extends
src/syntiq_mt5/orders/models.py - Orders and requests → Typed enums: uses enum types
src/syntiq_mt5/orders/models.py - Trade history → Model base: extends
src/syntiq_mt5/history/models.py - Trade history → Typed enums: uses enum types
src/syntiq_mt5/history/models.py - Typed enums → Protocol constants: defines values from
src/syntiq_mt5/enums.py