Improve naming of the schema

This commit is contained in:
Matthias 2024-04-28 11:33:45 +02:00
parent 8c39740105
commit ccd788e2ce
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)