Closed anthonyk1225 closed 4 years ago
@Georgedumpers I moved this over to a new issue.
That error is thrown when you don't have valid credentials in the credentials.py
file. Make sure you've created that file and replaced it with your info. Instructions are laid out in the readme
.
Excel files won't get generated unless you've successfully generated trading history from the json
prompt first.
I would suggest trying to generate one entity from json
to start and seeing if that populates in the data
folder for the respective entity you chose. If it does, then from there you can choose the xlsx
option.
Feel free to let me know what happens and I'll continue to help you out.
I have the correct credentials, please tell me whether the username should be like this meaning the format is within double quotes and everything. Also the device_token I got from inspecting source in the browser from this field window.oauthClientId =
username="test"
yup that username
in quotes looks fine. Just plug all that information into the credentials.py
with this template.
# your credentials
username = "xxx" # Your robinhood username or email
password = "xxx" # Your robinhood password
# should also be generated, but needs to be found for now
device_token = "xxx" # Your device token in the headers
thanks what about device_token from this field in windows window.oauthClientId =
is that fine
No, you have to find out your device_id
in document.cookie
when signed into robinhood on your computer.
Use that for device_token
in the credentials.py
file.
sorry I dont know how to get that, can I get step by step instructions
Never mind got it working.
But I have a error in excel for options
File "app.py", line 48, in
Alright, pull down from the master branch and try again. It sounds like one of your legs in options has neither an opening_strategy
or a closing_strategy
. Let me know if it still throws you an error after pulling or if it still complains.
Your options xlsx file should have still been created with your history, but failed on the P/L calculation. If you could, look through that and let me know if there are any rows that have neither opening_strategy
, or closing_strategy
. Thanks
Hey, did this solve your issue? Was the problem a missing leg from your history?
line 70, in generate_auth_tokens return response["access_token"], response["refresh_token"] KeyError: 'access_token'
Originally posted by @Georgedumpers in https://github.com/anthonyk1225/robinhood-to-xlsx/issues/11#issuecomment-556914909