Jake0303 / RobinHood-RSI-Trading-Bot

A Robinhood stock trading bot in Python using the RSI indicator https://youtu.be/kSLkRXY3NPQ
206 stars 115 forks source link

KeyError: 'results' #8

Open jayomayan opened 3 years ago

jayomayan commented 3 years ago

I'm getting this error.. sorry, kinda new with Python.

Getting historical quotes
Traceback (most recent call last):
  File "RobinhoodBot.py", line 64, in <module>
    s.run()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sched.py", line 151, in run
    action(*argument, **kwargs)
  File "RobinhoodBot.py", line 28, in run
    for key in historical_quotes["results"][0]["historicals"]:
KeyError: 'results'
jayomayan commented 3 years ago

I get that error when using it on Crypto.

ShortMan443 commented 3 years ago

make sure that crypto is supported by the Robinhood Library.

JathanT commented 3 years ago

I'm having the same issue with BTC, any help to get this working would be much appreciated.

ShortMan443 commented 3 years ago

Make sure that the robinhood api supports Bitcoin. And check their docs for the symbol.

Sent via Superhuman ( https://sprh.mn/?vip=afidgety@gmail.com )

On Fri, Sep 11, 2020 at 9:39 AM, JathanT < notifications@github.com > wrote:

I'm having the same issue with BTC, any help to get this working would be much appreciated.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub ( https://github.com/Jake0303/RobinHood-RSI-Trading-Bot/issues/8#issuecomment-691100868 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AJJ23WJPTNT7CDLBKWVDTWDSFISADANCNFSM4QW2TV3A ).

JathanT commented 3 years ago

Make sure that the robinhood api supports Bitcoin. And check their docs for the symbol. Sent via Superhuman ( https://sprh.mn/?vip=afidgety@gmail.com ) On Fri, Sep 11, 2020 at 9:39 AM, JathanT < @.*** > wrote: I'm having the same issue with BTC, any help to get this working would be much appreciated. — You are receiving this because you commented. Reply to this email directly, view it on GitHub ( #8 (comment) ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AJJ23WJPTNT7CDLBKWVDTWDSFISADANCNFSM4QW2TV3A ).

Sweet, how do I do that?

ShortMan443 commented 3 years ago

Couldn’t find it sorry, I would be happy to build it for you. If you would like email me at aiden@owens.systems we could work something out.

Sent via Superhuman iOS ( https://sprh.mn/?vip=afidgety@gmail.com )

On Fri, Sep 11 2020 at 3:53 PM, JathanT < notifications@github.com > wrote:

Make sure that the robinhood api supports Bitcoin. And check their docs for the symbol. Sent via Superhuman ( https://sprh.mn/?vip=afidgety@gmail.com ) … ( # ) On Fri, Sep 11, 2020 at 9:39 AM, JathanT < @.*** > wrote: I'm having the same issue with BTC, any help to get this working would be much appreciated. — You are receiving this because you commented. Reply to this email directly, view it on GitHub ( #8 (comment) ( https://github.com/Jake0303/RobinHood-RSI-Trading-Bot/issues/8#issuecomment-691100868 ) ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AJJ23WJPTNT7CDLBKWVDTWDSFISADANCNFSM4QW2TV3A ).

Sweet, how do I do that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub ( https://github.com/Jake0303/RobinHood-RSI-Trading-Bot/issues/8#issuecomment-691283850 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AJJ23WMOJCPIUQM4PIXXAKLSFJ53HANCNFSM4QW2TV3A ).

Jake0303 commented 3 years ago

Don't think pyrh supports Crypto

ShadowIterum commented 3 years ago

Hello,

I'm also getting this error, not using it with crypto. Tried it with BAC. Please let me know if you have any clues about what my issue may be.

File "C:\Users\user\Documents\Trading Code\RobinhoodRSITemplate\pyrh.py", line 60, in __init__

acc = self.get_account_number()

File "C:\Users\user\Documents\Trading Code\RobinhoodRSITemplate\pyrh.py", line 112, in get_account_number

res = res.json()['results'][0]

KeyError: 'results'

Thanks!