feat: support candle_type parameter via API download
This commit is contained in:
@@ -63,6 +63,8 @@ def pairlists_evaluate(
|
|||||||
config_loc["timeframes"] = payload.timeframes
|
config_loc["timeframes"] = payload.timeframes
|
||||||
config_loc["erase"] = payload.erase
|
config_loc["erase"] = payload.erase
|
||||||
config_loc["download_trades"] = payload.download_trades
|
config_loc["download_trades"] = payload.download_trades
|
||||||
|
if payload.candle_types is not None:
|
||||||
|
config_loc["candle_types"] = payload.candle_types
|
||||||
|
|
||||||
handleExchangePayload(payload, config_loc)
|
handleExchangePayload(payload, config_loc)
|
||||||
|
|
||||||
|
|||||||
@@ -506,6 +506,7 @@ class DownloadDataPayload(ExchangeModePayloadMixin, BaseModel):
|
|||||||
timerange: str | None = None
|
timerange: str | None = None
|
||||||
erase: bool = False
|
erase: bool = False
|
||||||
download_trades: bool = False
|
download_trades: bool = False
|
||||||
|
candle_types: list[str] | None = None
|
||||||
|
|
||||||
@model_validator(mode="before")
|
@model_validator(mode="before")
|
||||||
def check_mutually_exclusive(cls, values):
|
def check_mutually_exclusive(cls, values):
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ logger = logging.getLogger(__name__)
|
|||||||
# 2.41: Add download-data endpoint
|
# 2.41: Add download-data endpoint
|
||||||
# 2.42: Add /pair_history endpoint with live data
|
# 2.42: Add /pair_history endpoint with live data
|
||||||
# 2.43: Add /profit_all endpoint
|
# 2.43: Add /profit_all endpoint
|
||||||
API_VERSION = 2.43
|
# 2.44: Add candle_types parameter to download-data endpoint
|
||||||
|
API_VERSION = 2.44
|
||||||
|
|
||||||
# Public API, requires no auth.
|
# Public API, requires no auth.
|
||||||
router_public = APIRouter()
|
router_public = APIRouter()
|
||||||
|
|||||||
Reference in New Issue
Block a user