tedchou12 / webull

Unofficial APIs for Webull.
MIT License
597 stars 183 forks source link

Issue with get_trade_token #237

Closed erickserr125 closed 3 years ago

erickserr125 commented 3 years ago

It seems that get_trade_token() isn't working for trading (it always returns false). I've tried removing other forms of authentication except the 6 digit pin, I tried changing the six-digit pin, and it still doesn't work. Any help is greatly appreciated!

tedchou12 commented 3 years ago
  1. Are you able to login? and you are able to get_account() to see your account information?
  2. Have you got the 6 digit pin setup on your webull app? is enabled? and is the same one that you are putting into get_trade_token(xxxxxx)?
  3. Have you tried the Webull website app? http://app.webull.com/, are you able to input the 6 digits?
erickserr125 commented 3 years ago
1. Are you able to login? and you are able to `get_account()` to see your account information?

2. Have you got the 6 digit pin setup on your webull app? is enabled? and is the same one that you are putting into `get_trade_token(xxxxxx)`?

3. Have you tried the Webull website app? http://app.webull.com/, are you able to input the 6 digits?

Regarding 1., I found that my login information is accounted for -- my return output starts with 'extInfo: ....' --, but I am unable to see my account information (I get a "404 not found" error).

For 2., It is setup and enabled, and it is the same one that I have inserted into webull (which answers 3. as well).

I think the issue might be with logging in, but I'm not entirely sure what that is since my login info is being displayed and verified to me. Any help is greatly appreciated, thanks!

edit: I should mention that I am following the steps from the README:

from webull import webull wb = paper_webull() wb.login('test@test.com', 'pa$$w0rd') wb.get_trade_token('123456') orders = wb.get_current_orders()

tedchou12 commented 3 years ago

Since you are already stuck on number 1, there is no point for number 2. Try this one: https://github.com/tedchou12/webull/wiki/Workaround-for-Login

erickserr125 commented 3 years ago

Since you are already stuck on number 1, there is no point for number 2. Try this one: https://github.com/tedchou12/webull/wiki/Workaround-for-Login

Thanks so much for the help! I was able to resolve my issue by executing the following commands;

I filled the wb.login() function by using:

1) get_mfa() for the 6 digit code 2) get_security() for the questionId 3) Webull app for the device name

Then I simply filled in the parameters for the login and it worked out. No need for me to find the tokens or anything. Thanks again!