alienbrett / PyAlly

Ally Invest API Module for Python3
https://alienbrett.github.io/PyAlly/
MIT License
57 stars 28 forks source link

get all quote attributes #61

Closed klaypigeon closed 3 years ago

klaypigeon commented 3 years ago

Forgive me if I am totally missing something here, I am new to pandas. I see the default is to get all data fields, but I cannot get that to return anything useful

>>> quotes = a.quote(symbols=['spy','gLD','F','Ibm'])
>>> quotes
Empty DataFrame
Columns: []
Index: [SPY, F, GLD, IBM]

But if I call out individual attributes, no problem. How do I specify to get all fields?

>>> quotes = a.quote(symbols=['spy','gLD','F','Ibm'],fields=['bid','ask','last','name','volatility12'])
>>> quotes
           ask     bid  ...                                  name volatility12
symbol                  ...                                                   
F        10.50   10.49  ...                   FORD MOTOR CO. (DE)       0.5766
GLD     173.36  172.91  ...                       SPDR GOLD TRUST       0.2010
SPY     369.45  369.33  ...                SPDR S&P 500 ETF TRUST       0.3403
IBM     119.02  119.01  ...  INTERNATIONAL BUSINESS MACHINES CORP       0.4239

[4 rows x 5 columns]
alienbrett commented 3 years ago

Ally changed their API so that the upstream no longer has this property. Give me a few days and I can add constants that re-add this feature. For now, just ask a.quote() explicitly for the fields you want.

klaypigeon commented 3 years ago

Thanks, I thought that might be the case. Not a big deal, more curious than anything.

On Thu, Feb 4, 2021 at 9:59 AM alienbrett notifications@github.com wrote:

Ally changed their API so that the upstream no longer has this property. Give me a few days and I can add constants that re-add this feature. For now, just ask a.quote() explicitly for the fields you want.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alienbrett/PyAlly/issues/61#issuecomment-773372267, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYZZARWWMAOUKCJNLFSJL3S5KY4VANCNFSM4W4IBH5A .

kcphysics commented 3 years ago

Would this also effect the timesales endpoint?

I am attempting something very similar and am getting a 500.

alienbrett commented 3 years ago

Would this also effect the timesales endpoint?

I am attempting something very similar and am getting a 500.

Post your code and the exception you're receiving

LaikaN57 commented 3 years ago

Ally changed their API so that the upstream no longer has this property. Give me a few days and I can add constants that re-add this feature.

@alienbrett did you ever get around to this? If not, no worries. Just doing issue maintenance.

LaikaN57 commented 3 years ago

Post your code and the exception you're receiving

@kcphysics bump

LaikaN57 commented 3 years ago

Fixed in https://github.com/alienbrett/PyAlly/commit/f1b8ca067f27553354a307a87ca0a46fd35ef9a0