alienbrett / PyAlly

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

watchlists not functional #63

Closed klaypigeon closed 2 years ago

klaypigeon commented 3 years ago

Was hoping to draw in a watchlist to run analysis, but I don't think this is working any more. Not complaining, just contributing how I can.

Just to show I am connected...

>>> a.quote('intc',fields='last')
         last
symbol       
INTC    58.18
>>> a.watchlists
<ally.Watchlist.Watchlist object at 0x7ffb6bfaa400>
>>> list(a.watchlists)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/theo/.local/lib/python3.8/site-packages/ally/Watchlist/__init__.py", line 189, in __iter__
    return self._all.__iter__()
  File "/home/theo/.local/lib/python3.8/site-packages/ally/Watchlist/__init__.py", line 175, in _all
    return self._lists
AttributeError: 'Watchlist' object has no attribute '_lists'
>>> list(a.watchlist['options1'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Ally' object has no attribute 'watchlist'
LaikaN57 commented 3 years ago

Hmm.... I was not able to reproduce the issue. Do you have at least 1 watchlists in your Ally account? Maybe it is a different account number? it would be helpful for you to add logging to ally.Watchlists.methods.GetWatchlists.extract to see what the response (after json decode) is.

Also your last command should be list(a.watchlists['options1']) (with an s).

LaikaN57 commented 3 years ago

@klaypigeon bump

LaikaN57 commented 2 years ago

@klaypigeon bump

klaypigeon commented 2 years ago

Thanks for following up but I went a different route with this using a different API. You can close this issue.

On Mon, Feb 7, 2022, 1:50 PM Alex Kennedy @.***> wrote:

@klaypigeon https://github.com/klaypigeon bump

— Reply to this email directly, view it on GitHub https://github.com/alienbrett/PyAlly/issues/63#issuecomment-1031802075, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYZZARJQP626ODY3QSITS3U2AIA5ANCNFSM4XG3W6ZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>