Package-level declarations
Types
Meta the poller needs to publish a useful close BrokerEvent.OrderFilled when a ticket disappears from the venue snapshot. Populated by MT5Broker as positions open (either synchronously from a Market/Bracket fill, or asynchronously when a pending order transitions to a position).
Per-instrument trading constraints reported by the venue. Used for size/price validation.
Account-level snapshot from the MT5 venue — used for equity and leverage tracking.
Routes orders to a MetaTrader 5 venue via an mt5-gateway HTTP service.
Per-venue configuration for an MT5Broker.
Resolves raw YAML broker entries from qkt.config.yaml into MT5BrokerProfiles.
Built-in MT5BrokerProfile templates for common brokers.
Fields modifiable on a working order. Only non-null fields are sent.
JSON wire shape for POST /order to the gateway.
Top-level response from POST /order.
Inner result block of a venue order response — retcode is the MQL5 trade return code.
Converts qkt OrderRequests into the JSON wire shape understood by mt5-gateway.
Pending (working) order reported by the gateway. Distinct from MT5Position which tracks filled positions. The pending order is consumed when it triggers (becoming a position) or expires/cancels (disappearing without becoming a position).
Polls the venue's /orders endpoint for working (pending) orders. Detects when a tracked ticket leaves the pending set — the disappearance can mean two things:
Open position on the venue, filtered by MT5BrokerProfile.magic during reconciliation.
Polls open MT5 positions and emits reconciliation events when they drift from local state.
Protocol-level capabilities for any MT5 venue.
On-startup state reconciliation for an MT5Broker.
Bidirectional translator between qkt-side symbols and broker-side MT5 symbols per a SymbolPolicy.
Symbol metadata reported by the venue — used for size/price validation.
Bid/ask tick reported by the gateway.
Result of translating a single qkt OrderRequest to the MT5 wire shape.
How a qkt symbol is translated to the broker's MT5 symbol.
Properties
Functions
Returns true iff retcode indicates a successful order placement.