Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting empty result with get_historical_data #268

Open
grey949 opened this issue Oct 13, 2021 · 1 comment
Open

Getting empty result with get_historical_data #268

grey949 opened this issue Oct 13, 2021 · 1 comment
Labels

Comments

@grey949
Copy link

grey949 commented Oct 13, 2021

Summary (include Python version)

Python 3.9.7

For any stock symbol on 10/07/2021, I get an empty dataframe. However, if I place a range that includes 10/07/2021 I get that data. Here is what I'm seeing:

from iexfinance.stocks import get_historical_data

Using only 2021-10-07:
get_historical_data("TSLA", '2021-10-07', '2021-10-07', token="*********************")

Empty DataFrame
Columns: [close, high, low, open, symbol, volume, id, key, subkey, updated, changeOverTime, marketChangeOverTime, uOpen, uClose, uHigh, uLow, uVolume, fOpen, fClose, fHigh, fLow, fVolume, label, change, changePercent]
Index: []

Using a range to include 2021-10-7 will return data:
get_historical_data("TSLA", '2021-10-06', '2021-10-08', token="*********************")

        close    high     low    open symbol    volume                 id   key subkey        updated changeOverTime  ...   uHigh    uLow   uVolume   fOpen  fClose   fHigh    fLow   fVolume      label change changePercent

2021-10-06 782.75 786.66 773.22 776.2 TSLA 14632768 HISTORICAL_PRICES TSLA 1633570592000 0.053499 ... 786.66 773.22 14632768 776.2 782.75 786.66 773.22 14632768 Oct 6, 21 2.16 0.0028
2021-10-07 793.61 805 783.38 785.46 TSLA 19195782 HISTORICAL_PRICES TSLA 1633656865000 0.068116 ... 805 783.38 19195782 785.46 793.61 805 783.38 19195782 Oct 7, 21 10.86 0.0139
2021-10-08 785.49 796.38 780.91 796.21 TSLA 16738604 HISTORICAL_PRICES TSLA 1633742318000 0.057187 ... 796.38 780.91 16738604 796.21 785.49 796.38 780.91 16738604 Oct 8, 21 -8.12 -0.0102

[3 rows x 25 columns]

Date/time of issue

10/12/2021

Expected behavior

Get populated DataFrame for the date of 10/07/2021 for any stock symbol

Actual behavior

Getting empty DataFrame for all stock symbols for the date of 10/07/2021.

@grey949
Copy link
Author

grey949 commented Oct 18, 2021

Having this issue again, but now noticing a pattern. Get_Historical_data() doesn't seem to work for any dates that are 5 days ago. For example, today is 10/17/2021 and now I can't run anything for 10/12/2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants