Skip to content

Commit 31d3a19

Browse files
committed
feat: support candle_type parameter via API download
1 parent 83b372a commit 31d3a19

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

freqtrade/rpc/api_server/api_download_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def pairlists_evaluate(
6363
config_loc["timeframes"] = payload.timeframes
6464
config_loc["erase"] = payload.erase
6565
config_loc["download_trades"] = payload.download_trades
66+
if payload.candle_types is not None:
67+
config_loc["candle_types"] = payload.candle_types
6668

6769
handleExchangePayload(payload, config_loc)
6870

freqtrade/rpc/api_server/api_schemas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ class DownloadDataPayload(ExchangeModePayloadMixin, BaseModel):
506506
timerange: str | None = None
507507
erase: bool = False
508508
download_trades: bool = False
509+
candle_types: list[str] | None = None
509510

510511
@model_validator(mode="before")
511512
def check_mutually_exclusive(cls, values):

freqtrade/rpc/api_server/api_v1.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
# 2.41: Add download-data endpoint
9292
# 2.42: Add /pair_history endpoint with live data
9393
# 2.43: Add /profit_all endpoint
94-
API_VERSION = 2.43
94+
# 2.44: Add candle_types parameter to download-data endpoint
95+
API_VERSION = 2.44
9596

9697
# Public API, requires no auth.
9798
router_public = APIRouter()

0 commit comments

Comments
 (0)