This commit is contained in:
David Brazda
2024-10-30 14:25:34 +01:00
parent d316d06f1d
commit 008ab547c7
2 changed files with 22 additions and 33 deletions

View File

@ -359,8 +359,8 @@ def load_data(symbol: Union[str, List[str]],
symbol (Union[str, list]): Symbol
agg_type (AggType): Type of aggregation
resolution (Union[str, int]) Resolution of aggregation nased on agg_type
start_date (datetime):
end_date (datetime):
start_date (datetime): Start period, timezone aware
end_date (datetime): Start period, timezone aware
exclude_conditions (list, optional): Trade conditions to exclude. Defaults to None.
minsize (_type_, optional): Minimum trade size to include. Defaults to None.
main_session_only (bool, optional): Main or ext. hours.. Defaults to True.
@ -379,6 +379,12 @@ def load_data(symbol: Union[str, List[str]],
if verbose is not None:
set_verbose(verbose) # Change global verbose if specified
if start_date.tzinfo is None:
start_date = zoneNY.localize(start_date)
if end_date.tzinfo is None:
end_date = zoneNY.localize(end_date)
if exclude_conditions is None:
exclude_conditions = EXCLUDE_CONDITIONS