From ccd788e2ce8719c48825982fdc0cca7af5cad2a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 28 Apr 2024 11:33:45 +0200 Subject: [PATCH] Improve naming of the schema --- freqtrade/rpc/api_server/api_schemas.py | 2 +- freqtrade/rpc/api_server/api_v1.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/api_server/api_schemas.py b/freqtrade/rpc/api_server/api_schemas.py index 7b6d5a3f6..1b4d46e79 100644 --- a/freqtrade/rpc/api_server/api_schemas.py +++ b/freqtrade/rpc/api_server/api_schemas.py @@ -489,7 +489,7 @@ class AvailablePairs(BaseModel): pair_interval: List[List[str]] -class PairHistoryRequest(BaseModel): +class PairCandlesRequest(BaseModel): pair: str timeframe: str limit: Optional[int] = None diff --git a/freqtrade/rpc/api_server/api_v1.py b/freqtrade/rpc/api_server/api_v1.py index c180012e2..d4c2d80cb 100644 --- a/freqtrade/rpc/api_server/api_v1.py +++ b/freqtrade/rpc/api_server/api_v1.py @@ -17,7 +17,7 @@ from freqtrade.rpc.api_server.api_schemas import (AvailablePairs, Balances, Blac ForceEnterResponse, ForceExitPayload, FreqAIModelListResponse, Health, Locks, LocksPayload, Logs, MixTag, OpenTradeSchema, - PairHistory, PairHistoryRequest, PerformanceEntry, + PairCandlesRequest, PairHistory, PerformanceEntry, Ping, PlotConfig, Profit, ResultMsg, ShowConfig, Stats, StatusMsg, StrategyListResponse, StrategyResponse, SysInfo, Version, @@ -297,7 +297,7 @@ def pair_candles( @router.post('/pair_candles', response_model=PairHistory, tags=['candle data']) -def pair_candles_filtered(payload: PairHistoryRequest, rpc: RPC = Depends(get_rpc)): +def pair_candles_filtered(payload: PairCandlesRequest, rpc: RPC = Depends(get_rpc)): # Advanced pair_candles endpoint with column filtering return rpc._rpc_analysed_dataframe( payload.pair, payload.timeframe, payload.limit, payload.columns)