From 8ed68ae48bafb878eec8bc07796ad3d618ce0574 Mon Sep 17 00:00:00 2001 From: Martin Molinero Date: Thu, 2 May 2024 18:53:00 -0300 Subject: [PATCH] Minor fix for QC data download --- lean/commands/data/download.py | 3 ++- lean/models/api.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lean/commands/data/download.py b/lean/commands/data/download.py index 4072d5fe..3e82c327 100644 --- a/lean/commands/data/download.py +++ b/lean/commands/data/download.py @@ -352,7 +352,8 @@ def _select_products_non_interactive(organization: QCFullOrganization, if option.condition is not None and not option.condition.check(option_results): continue - user_input = ctx.params.get(option.id, None) + # if the option id has a '-' in its name, and it's a click option, in the click context it's available with '_' + user_input = ctx.params.get(option.id.replace('-', '_'), ctx.params.get(option.id, None)) if user_input is None: missing_options.append(f"--{option.id} <{option.get_placeholder()}>: {option.description}") diff --git a/lean/models/api.py b/lean/models/api.py index 4d552a6e..6ec432df 100644 --- a/lean/models/api.py +++ b/lean/models/api.py @@ -410,6 +410,7 @@ class QCMinimalOrganization(WrappedBaseModel): class QCDataType(str, Enum): Trade = "Trade" Quote = "Quote" + Bulk = "Bulk" OpenInterest = "OpenInterest" @classmethod