twelvedata/twelvedata-python

Return type specified is not getting returned.

Closed this issue · 4 comments

When I use any of the .as_...() methods, I get this back <twelvedata.time_series.TimeSeries at 0x7f7ef4e491d0> I was able to use the methods successfully once and now I am not having any luck. I checked the api_usage() and appear to be within my limits... any insight on to what is going on here?

Which version of the package are you using?

I am using 1.2.8, which is latest.

I even went as far as making another account and getting a new API key, but still same results.

I did find this though, and maybe this is just an issue with the docs. Not sure!

If I run this ts = td.time_series( symbol="AAPL", interval="5min", start_date="2022-05-11 7:00:00", end_date="2022-08-12 15:00:00", outputsize = 5000 ) ts = ts.as_pandas()
instead of this
ts = td.time_series( symbol="AAPL", interval="1min", outputsize=10, timezone="America/New_York", ) ts.as_pandas()

It seems to work okay, maybe that reassignment is needed? Not sure. Hope this helps.

The issue seems to be related to you just calling ts object. If you call .as_pandas(), both samples are working correctly.