From 025c203b062ee8d7ef6fff844d0c21e647b49736 Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Fri, 20 Sep 2024 15:44:05 +0300 Subject: [PATCH] upd --- core/commands/ohlcv.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 core/commands/ohlcv.py 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