Overview
Order fill produced by ExecutionSimulator and published to the EventBus. Consumed by OrderManagementSystem, PositionManager, and RiskManagementEngine. Defined in src/domain/__init__.py.
Contract
Consumers
- PositionManager
- AuditLog
- IOrderRepository
Types
| Name | Base | Constraints / Values | Description |
|---|---|---|---|
| Execution | dataclass | — | Order fill event published by ExecutionSimulator after a successful fill. |
Documents
Execution Data Contract
Order fill produced by ExecutionSimulator and published to the EventBus.
Consumed by OrderManagementSystem, PositionManager, and RiskManagementEngine.
Source: src/domain/__init__.py — @dataclass class Execution
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
order_id |
str |
✓ | — | ID of the originating order |
symbol |
str |
✓ | — | Ticker symbol (e.g. AAPL, MSFT) |
side |
Side |
✓ | — | BUY or SELL |
qty |
float |
✓ | — | Filled quantity (shares) |
price |
float |
✓ | — | Fill price per share |
commission |
float |
0.0 |
Broker commission charged | |
timestamp |
datetime |
now() |
UTC timestamp of fill | |
exec_id |
str |
uuid4() |
Unique execution identifier |
Consumers
| Component | Usage |
|---|---|
OrderManagementSystem |
Updates order status to FILLED / PARTIALLY_FILLED |
PositionManager |
Updates position qty, avg_cost, unrealized P&L |
RiskManagementEngine |
Updates exposure and realized P&L tracking |
Notes
Executionis immutable once published to the EventBusexec_idis auto-generated and globally uniquecommissiondefaults to0.0in paper trading (simulated) modeSideenum:BUY = "BUY",SELL = "SELL"