From 2085af9928dad8c8054e6de0654cac8be5bd1712 Mon Sep 17 00:00:00 2001 From: rcholic Date: Mon, 2 Sep 2024 10:01:49 -0700 Subject: [PATCH 1/2] change updated_at to unix ts --- cschwabpy/models/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cschwabpy/models/__init__.py b/cschwabpy/models/__init__.py index 1d90673..5ccfb22 100644 --- a/cschwabpy/models/__init__.py +++ b/cschwabpy/models/__init__.py @@ -319,7 +319,7 @@ def to_dataframe_row(self, strip_space: bool = False) -> List[Any]: self.expirationDate, util.ts_to_date_string(self.quoteTimeInLong), self.totalVolume, - util.ts_to_date_string(self.quoteTimeInLong), + self.quoteTimeInLong, # updated_at self.gamma, self.delta, self.vega, @@ -417,6 +417,7 @@ def break_down_option_map( strip_space: bool = False, ) -> Mapping[str, pd.DataFrame]: """Whether strip spaces in option symbols.""" + now_unix_ts = int(util.now_unix_ts()) result: MutableMapping[str, pd.DataFrame] = {} for exp_date, strike_map in optionExpMap.items(): expiration = exp_date.split(":")[0] @@ -434,6 +435,8 @@ def break_down_option_map( strike_df = pd.DataFrame(all_rows) strike_df.columns = OptionChain_Headers + # change updated_at to now_unix_ts + strike_df["updated_at"] = now_unix_ts result[expiration] = strike_df return result From cb122967f45a68f140c0e5131772b6f93056df83 Mon Sep 17 00:00:00 2001 From: rcholic Date: Mon, 2 Sep 2024 10:04:03 -0700 Subject: [PATCH 2/2] bump version --- pyproject.toml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0511043..8dc2ba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cschwabpy" -version = "0.1.3.8" +version = "0.1.3.9" description = "" authors = ["Tony Wang "] readme = "README.md" diff --git a/setup.py b/setup.py index 0e52312..782d078 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="CSchwabPy", - version="0.1.3.8", + version="0.1.3.9", description="Charles Schwab Stock & Option Trade API Client for Python.", long_description=long_description, long_description_content_type="text/markdown",