diff --git a/freqtrade/ft_types/plot_annotation_type.py b/freqtrade/ft_types/plot_annotation_type.py index 0e9f37363..78524063c 100644 --- a/freqtrade/ft_types/plot_annotation_type.py +++ b/freqtrade/ft_types/plot_annotation_type.py @@ -5,7 +5,7 @@ from typing_extensions import NotRequired, TypedDict class AnnotationType(TypedDict): - type: Literal["area"] = "area" + type: Literal["area"] start: NotRequired[str | datetime] end: NotRequired[str | datetime] y_start: NotRequired[float] diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index b5cdd3849..324122b01 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -33,6 +33,7 @@ from freqtrade.enums import ( from freqtrade.exceptions import ExchangeError, PricingError from freqtrade.exchange import timeframe_to_minutes, timeframe_to_msecs from freqtrade.exchange.exchange_utils import price_to_precision +from freqtrade.ft_types import AnnotationType from freqtrade.loggers import bufferHandler from freqtrade.persistence import KeyStoreKeys, KeyValueStore, PairLocks, Trade from freqtrade.persistence.models import PairLock @@ -1299,8 +1300,8 @@ class RPC: timeframe: str, dataframe: DataFrame, last_analyzed: datetime, - selected_cols: list[str], - annotations: list[dict[str, Any]] = None, + selected_cols: list[str] | None, + annotations: list[AnnotationType], ) -> dict[str, Any]: has_content = len(dataframe) != 0 dataframe_columns = list(dataframe.columns)