Skip to content

Commit

Permalink
Fix: bug with default market in download (#453)
Browse files Browse the repository at this point in the history
* fix: default market in download command

* remove: duplication of validate market name
  • Loading branch information
Romazes authored May 2, 2024
1 parent cf20a53 commit a20b2f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lean/commands/data/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def _configure_date_option(date_value: str, option_id: str, option_label: str) -
help="Specify the resolution of the historical data")
@option("--security-type", type=Choice(QCSecurityType.get_all_members(), case_sensitive=False),
help="Specify the security type of the historical data")
@option("--market", type=str, default="USA",
@option("--market", type=str,
help="Specify the market name for tickers (e.g., 'USA', 'NYMEX', 'Binance')")
@option("--tickers",
type=str,
Expand Down Expand Up @@ -615,7 +615,7 @@ def download(ctx: Context,
QCResolution.get_all_members(),
"resolutions")
data_provider_support_markets = _get_download_specification_from_config(data_provider_config_json,
[market], "markets")
["USA"], "markets")

security_type = _get_user_input_or_prompt(security_type, data_provider_support_security_types,
data_provider_historical, "Select a Ticker's security type")
Expand All @@ -624,7 +624,7 @@ def download(ctx: Context,
resolution = _get_user_input_or_prompt(resolution, data_provider_support_resolutions,
data_provider_historical, "Select a Resolution")
market = _get_user_input_or_prompt(market, data_provider_support_markets,
data_provider_historical,"Select a Market")
data_provider_historical, "Select a Market")

if not tickers:
tickers = ','.join(DatasetTextOption(id="id",
Expand Down

0 comments on commit a20b2f4

Please sign in to comment.