iexfinance icon indicating copy to clipboard operation
iexfinance copied to clipboard

Changes to IEXCloud data provider breaking iexfinance?

Open BrentGrammer opened this issue 3 years ago • 21 comments

I've been using iexfinance for a while without issue, but recently some calls started breaking (for instance getting quarterly cash flow statement information for more than the last quarter). I believe this is due to IEXCloud upgrading their data provider and some previous endpoints being changed. Is iexfinance still compatible with IEXClouds recent changes and is there a guide to how to upgrade or change method signatures?

BrentGrammer avatar Dec 01 '20 04:12 BrentGrammer

Thanks @BrentGrammer it looks like you are correct. There are a number of test cases failing since IEX started to implement changes this week. A number of issues have come into their tracker as well.

We'll continue to monitor and make changes as necessary. It seems that most of the problems are on there end for now. I can confirm that cash flow statements and other fundamentals are indeed not working for more than one quarter. Let me know if you see anything else specific.

addisonlynch avatar Dec 02 '20 03:12 addisonlynch

IEXCloud has indicated that some changes due to the data provider switch are in place now as of Dec. 1st. Is this still a problem on their end or does this library need to be updated to adjust to recent changes in their API?

BrentGrammer avatar Dec 05 '20 15:12 BrentGrammer

Not sure if related, or if I'm using this wrong, but get_historical_data is no longer providing adjusted prices.

e.g. split on December 1st here: image

sharonchoong avatar Dec 05 '20 21:12 sharonchoong

@BrentGrammer The same tests are still failing for me. I will take a look.

addisonlynch avatar Dec 06 '20 01:12 addisonlynch

@sharonchoong those are the adjusted prices. Probably need to document this better...

You can use stock.get_chart if you would like to obtain unadjusted prices (via uClose, uOpen, etc. fields)

https://iexcloud.io/docs/api/#historical-prices

addisonlynch avatar Dec 06 '20 01:12 addisonlynch

Thanks. Another thing I just noticed is that it does not look like there is a "totalCurrentLiabilities" field being returned for the call to .get_balance_sheet(period='quarterly'). IEXCloud's API documentation indicates it is part of the response and it was there before - so not sure if they made a change on their end somewhere and did not update the docs(?). I'm having a hard time getting a clear idea of what all changed reading their website help page.

BrentGrammer avatar Dec 06 '20 06:12 BrentGrammer

@BrentGrammer looks like the fundamentals are indeed missing fields. I created an issue in their tracker https://github.com/iexg/IEX-API/issues/1655.

Also, all 3 of the fundamentals endpoints are only returning up to 3 periods (should be 12 for quarterly). Entered an issue for this as well https://github.com/iexg/IEX-API/issues/1654.

Let me know if you see any other problems.

addisonlynch avatar Dec 07 '20 00:12 addisonlynch

Thank you for following up with IEXCloud. I'm asking their support team about all of this and will pass on any relevant information.

BrentGrammer avatar Dec 07 '20 05:12 BrentGrammer

@BrentGrammer sounds good. Thank you for letting me know!

addisonlynch avatar Dec 07 '20 07:12 addisonlynch

@sharonchoong those are the adjusted prices. Probably need to document this better...

You can use stock.get_chart if you would like to obtain unadjusted prices (via uClose, uOpen, etc. fields)

https://iexcloud.io/docs/api/#historical-prices

@addisonlynch OK, I just realized that it's not an issue with this python module but something funky happening with the IEX data. I made a direct call to the API to check the data, sorry should have done that first. Historical prices are no longer adjusted for splits. For example, 2020-11-30 close for MKC should have been $93.64, not $187. They mentioned that they would be making changes to the adjusted price computation on December 1st; I guess there were issues with it.

Also, given the changes in IEX, now get_historical_data should be pulling fClose to get fully adjusted prices, not close.

sharonchoong avatar Dec 07 '20 13:12 sharonchoong

Here is an update and response I received from IEXCloud support re: "totalCurrentLiabilities" property missing from the balance sheet and not being able to retrieve 4 years/quarters of financials:

" We are aware of an issue when using last=x when trying to get recent information. 
As a workaround, try increasing x until you get the amount of entries you are looking for. 
Putting in last=4 will still retrieve 3 entries.

totalCurrentLiabilities missing should be fixed at some point this week."

So looks like they are still working out some bugs from the transition on their end.

BrentGrammer avatar Dec 10 '20 02:12 BrentGrammer

@sharonchoong that is correct. Thank you. I will update #231 with this information and try to fit in for next weeks 0.5.0 release.

addisonlynch avatar Dec 10 '20 05:12 addisonlynch

@BrentGrammer thank you for following up on this. It has been extremely difficult to tell what's changed, what's broken, and what's still WIP. On top of that, they just shut down their github issue tracker and would like developers to email directly with bugs.

addisonlynch avatar Dec 10 '20 05:12 addisonlynch

@BrentGrammer looks like the period issue has been resolved.

addisonlynch avatar Dec 12 '20 01:12 addisonlynch

@addisonlynch I'm not getting any financial data now - tried with 3 tickers - GNUS, SSPK, and HEXO. Looks like this is going to be a rough transition...

BrentGrammer avatar Dec 12 '20 04:12 BrentGrammer

@BrentGrammer I'm getting the same. Seems to work for other tickets (e.g. AAPL).

addisonlynch avatar Dec 16 '20 03:12 addisonlynch

Dang, even GOOG doesn't work. Seems to be hit or miss. I emailed IEXCloud to let them know. Hopefully they'll get these endpoints restored before too long.

BrentGrammer avatar Dec 16 '20 08:12 BrentGrammer

@BrentGrammer thanks. Can you let me know what you hear back?

addisonlynch avatar Dec 16 '20 08:12 addisonlynch

@addisonlynch yes, will keep you updated. They usually respond 2-3 days after an email.

BrentGrammer avatar Dec 16 '20 15:12 BrentGrammer

@addisonlynch IEXCloud responded and said they are tracking the issue:

"I'll log those tickers with Dev and make sure they are aware. We are also aware of an issue regarding description missing in /company."

BrentGrammer avatar Dec 17 '20 03:12 BrentGrammer

@addisonlynch Hey I just wanted to pass something along I'm seeing while debugging my app (which is in shambles after the recent change).

The endpoint on IEXCloud for iexStockInstance.get_income_statement(period=interval, last=4) returns a string, not a list as it used to.

Ex:

costOfRevenue     currency  ...   date                   updated
2020-10-30   40009000000      USD  ...  1601078400000  1608330865000
 2020-07-31   37005000000      USD  ...  1593216000000  1608330865000
2020-05-01   35943000000      USD  ...  1585353600000  1608330865000
2020-01-29   56602000000      USD  ...  1577491200000  1608330865000

It's just one big string. I don't know if they are working on this, but I'm going to forward this info to IEXCloud as well in case they are unaware of this - to me it does not make sense to return a big string with quarterly data, so this must be an oversight on their part

UPDATE: so that string looked kind of looked like something table-like/dataframe-ish from the Panda library - on further debugging, I'm getting an error when trying to parse the response to json that 'type Series is not serializable'. Still not sure exactly how the response is a Series type, unless IEXCloud is returning Panda Dataframes(?). Still trying to make sense of what's going on.

BrentGrammer avatar Dec 20 '20 03:12 BrentGrammer