itsjafer / schwab-api

A python library for placing trades on Charles Schwab
MIT License
209 stars 64 forks source link

Log in failed even with correct user name and password #73

Open jack-chen1688 opened 10 hours ago

jack-chen1688 commented 10 hours ago

I met this strange issue. schwab-api's example in README.md worked for me multiple times and then suddenly failed. I didn't change user name and password at all. I then change api = Schwab() to api = Schwab(headless=False) to debug this issue and noticed the following. Capture This is very strange. I used the same user name and password can log into the website using firefox browser without problem. Tried multipole times and it just wont' let me log in with playwright's firefox browser. Could this caused by browser cache of playwright?

jack-chen1688 commented 8 hours ago

It is very strange that it works for a while and stopped for me. And I switched to another PC, the same thing happened, first few time works and then it stopped functioning. No code was changed.

jack-chen1688 commented 2 hours ago

Further tests shows that after some time, the code works again. Server side refused frequent connections? Is there a way to save the session token and reuse it?