diff --git a/core/commands/ohlcv.py b/core/commands/ohlcv.py new file mode 100644 index 00000000..056c4cc7 --- /dev/null +++ b/core/commands/ohlcv.py @@ -0,0 +1,23 @@ +from dataclasses import dataclass, field + +from core.events.base import EventMeta +from core.models.entity.bar import Bar +from core.models.symbol import Symbol +from core.models.timeframe import Timeframe + +from .base import Command, CommandGroup + + +@dataclass(frozen=True) +class MarketCommand(Command): + symbol: Symbol + timeframe: Timeframe + meta: EventMeta = field( + default_factory=lambda: EventMeta(priority=2, group=CommandGroup.market), + init=False, + ) + + +@dataclass(frozen=True) +class IngestMarketData(MarketCommand): + bar: Bar