From be96f3bba7c45ed67fa36729e0cc70ff3b439c6c Mon Sep 17 00:00:00 2001 From: James Maslek Date: Mon, 7 Aug 2023 15:37:08 -0400 Subject: [PATCH] Add historical futures docstring --- openbb_terminal/futures/sdk_helper.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/openbb_terminal/futures/sdk_helper.py b/openbb_terminal/futures/sdk_helper.py index 7115b782be1..d8d43937d36 100644 --- a/openbb_terminal/futures/sdk_helper.py +++ b/openbb_terminal/futures/sdk_helper.py @@ -16,7 +16,29 @@ def get_historical( source: Optional[str] = "YahooFinance", expiry: Optional[str] = "", ) -> pd.DataFrame: - """Get historical futures data""" + """Get historical futures data + + Parameters + ---------- + symbols : Union[str, List[str]] + The futures symbols you want to retrieve historical data for. + It can be either a single symbol as a string or a list of symbols. + start_date : str + The start date of the historical data you want to retrieve. The date should be in the format "YYYY-MM-DD". + end_date : str + The end date of the historical data you want to retrieve. The date should be in the format "YYYY-MM-DD". + source : Optional[str], default "YahooFinance" + The source from which you want to retrieve the historical data. This parameter is optional and defaults to "YahooFinance". + Valid values for the source are "YahooFinance" and "DataBento". + expiry : Optional[str], default "" + The expiry date for futures contracts. This parameter is optional and defaults to an empty string. + It is applicable only when the source is "YahooFinance" and the symbols are futures contracts. + + Returns + ------- + pd.DataFrame + A pandas DataFrame containing the historical data for the given symbols and date range. + """ if source == "YahooFinance": if isinstance(symbols, str): symbols = [symbols]