addisonlynch / iexfinance

Python SDK for IEX Cloud
https://addisonlynch.github.io/iexfinance
Apache License 2.0
648 stars 136 forks source link

historical_price single_day support #256

Open jstockdi opened 3 years ago

jstockdi commented 3 years ago

Summary (include Python version)

In: https://github.com/addisonlynch/iexfinance/blob/64ee3afe0f3e456e5a0a8120dd7c8c87b28964dd/iexfinance/stocks/historical.py#L19

self.end will never be None. Therefore, the single_day property will never be None https://github.com/addisonlynch/iexfinance/blob/64ee3afe0f3e456e5a0a8120dd7c8c87b28964dd/iexfinance/stocks/historical.py#L25

Is this a bug or should the single day functionality be removed?

Date/time of issue

2021-01-10

Expected behavior

Not setting end_date will treat the request as a single day range

Actual behavior

Setting end_date defaults to today

jstockdi commented 3 years ago

Possible fix is to make an explicit argument, reflecting the API: https://github.com/jon077/iexfinance/commit/e7b532682052d9b745972ac46bf2789bf8b21aee