tedchou12 / webull

Unofficial APIs for Webull.
MIT License
601 stars 185 forks source link

Issue with simultaneous logins #433

Open MHassanNajafi opened 6 months ago

MHassanNajafi commented 6 months ago

Hi,

I was able to simultaneously login to my account using wb.login(Login_user, Login_pass) in multiple python programs. But since yesterday I can only login using the last attemp/program. If I run a new code and try to login, the previous programs stop and are logged out.

Anyone faced a similar issue?

Thanks

K2083J commented 6 months ago

Facing same issue

K2083J commented 6 months ago

This is frustrating. cannot run multiple python scripts at once. Can anyone help with this issue? Thank you.

lawrenceobioma commented 6 months ago

Hey I login using the data from data that you can get from logging in on a browser. Go to inspect element on chrome (F11 or maybe F12 can't remember) go to the network tab when you log in, and search v2, it should be the V2 option with the {exit.... } . And the info from there can be used to login from any python programs. I currently have two servers trading for me in different locations and multiple python instances of it so I know that works. I've been using this for almost two years now so it's robust. You have to login once a week though and do this again since it expires once a week. You can get around that but it's that's a little more work. I usually reset it on Sundays. I'm just typing this at the gym so I might not be clear, etc but use chatgpt or something and you'll figure it out. Good luck.. hope this actually gets to you.


From: K2083J @.> Sent: Thursday, May 23, 2024 1:56:42 PM To: tedchou12/webull @.> Cc: Subscribed @.***> Subject: Re: [tedchou12/webull] Issue with simultaneous logins (Issue #433)

This is frustrating. cannot run multiple python scripts at once. Can anyone help with this issue? Thank you.

— Reply to this email directly, view it on GitHubhttps://github.com/tedchou12/webull/issues/433#issuecomment-2127741664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM6QDLBCQL3SY4UZRK7MSLTZDYUVVAVCNFSM6AAAAABICM4ZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG42DCNRWGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

lawrenceobioma commented 6 months ago

Hey I login using the data from data that you can get from logging in on a browser. Go to inspect element on chrome (F11 or maybe F12 can't remember) go to the network tab when you log in, and search v2, it should be the V2 option with the {exit.... } . And the info from there can be used to login from any python programs. I currently have two servers trading for me in different locations and multiple python instances of it so I know that works. I've been using this for almost two years now so it's robust. You have to login once a week though and do this again since it expires once a week. You can get around that but it's that's a little more work. I usually reset it on Sundays. I'm just typing this at the gym so I might not be clear, etc but use chatgpt or something and you'll figure it out. Good luck.. hope this actually gets to you. https://aka.ms/AAb9ysg


From: K2083J @.> Sent: Thursday, May 23, 2024 1:56:42 PM To: tedchou12/webull @.> Cc: Subscribed @.***> Subject: Re: [tedchou12/webull] Issue with simultaneous logins (Issue #433)

This is frustrating. cannot run multiple python scripts at once. Can anyone help with this issue? Thank you.

— Reply to this email directly, view it on GitHubhttps://github.com/tedchou12/webull/issues/433#issuecomment-2127741664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM6QDLBCQL3SY4UZRK7MSLTZDYUVVAVCNFSM6AAAAABICM4ZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG42DCNRWGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

K2083J commented 6 months ago

Thank you lawrence, much appreciated. I have tried the above and used the v2 info for login. Still it works for one script. If i run more than one, the token is expiring for the rest of the scripts.

lawrenceobioma commented 6 months ago

Make sure you don't log out on any of the scripts btw. For example, if I logout from my browser (or script I guess) where I originally logged in then everything associated with that login token, is logged out as well. That might be your issue.


From: K2083J @.> Sent: Friday, May 24, 2024 11:53:13 AM To: tedchou12/webull @.> Cc: Lawrence Obioma @.>; Comment @.> Subject: Re: [tedchou12/webull] Issue with simultaneous logins (Issue #433)

Thank you lawrence, much appreciated. I have tried the above and used the v2 info for login. Still it works for one script. If i run more than one, the token is expiring for the rest of the scripts.

— Reply to this email directly, view it on GitHubhttps://github.com/tedchou12/webull/issues/433#issuecomment-2129877051, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM6QDLC4PLBUKV76HW45YN3ZD5O6TAVCNFSM6AAAAABICM4ZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZHA3TOMBVGE. You are receiving this because you commented.Message ID: @.***>

K2083J commented 6 months ago

Could you confirm if i am using the correct endpoints? def login(self): return f'{self.base_user_url}/api/user/v1/login/account/v2' #self.base_user_url = 'https://u1suser.webullfintech.com/' def trade_token(self): return f'{self.base_new_trade_url}/trading/v1/global/trade/login' # self.base_new_trade_url = 'https://trade.webullfintech.com/api'

mustafamasody commented 5 months ago

Can anyone provide me with a login script for this package, I can't get any of the login methods to work :(.