Algorithmic Trading Platform

Contracts / Interface

Overview

Real-time market data tick produced by MarketDataFeedHandler and published to the EventBus. Consumed by StrategyEngine. Defined in src/domain/__init__.py.

Contract

Consumers

  • MarketDataFeedHandler
  • StrategyEngine
  • RiskManagementEngine
  • ExecutionSimulator

Types

NameBaseConstraints / ValuesDescription
MarketTickdataclass—Real-time market data tick published by MarketDataFeedHandler on every price update.
Referenced By 1

Contracts

Documents

MarketTick Data Contract table repo://graph/nodes/7433c0313049af2d5b86deaf80ab1899/artifacts/markettick-data-contract.md

MarketTick Data Contract

Real-time market data tick produced by MarketDataFeedHandler and published to the EventBus.

Consumed by StrategyEngine and BacktestingEngine.

Source: src/domain/__init__.py — @dataclass class MarketTick

Fields

Field Type Required Default Description
symbol str ✓ — Ticker symbol (e.g. AAPL, MSFT)
bid float ✓ — Best bid price
ask float ✓ — Best ask price
last float ✓ — Last traded price
volume float ✓ — Volume at last trade
timestamp datetime now() UTC timestamp of tick
tick_id str uuid4() Unique tick identifier

Consumers

Component Usage
StrategyEngine Evaluates tick against strategy rules to produce a Signal
BacktestingEngine Replays historical ticks for strategy validation

Notes

  • tick_id is referenced by Signal.tick_ref to trace which tick triggered a signal
  • Spread = ask - bid; mid = (bid + ask) / 2

MarketTick Class Diagram diagram repo://graph/nodes/7433c0313049af2d5b86deaf80ab1899/artifacts/markettick-class-diagram.md

MarketTick Class Diagram