Closed cnMuggle closed 8 months ago
@cnMuggle , can you try this alternative to solving the get_account_info problem: https://github.com/WinesProof/schwab-api/tree/get_account_info_all ?
Assuming it works for others, it would preserve compatibility between the v2 login process and get_account_info()
@cnMuggle , can you try this alternative to solving the get_account_info problem: https://github.com/WinesProof/schwab-api/tree/get_account_info_all ?
Assuming it works for others, it would preserve compatibility between the v2 login process and get_account_info()
your solution is better. I will close this. @itsjafer I tested the https://github.com/WinesProof/schwab-api/tree/get_account_info_all from @WinesProof . It can solve the get_account_info() return 1 account issue without changing login()
workaround of this issue, use version 0.2.3 or similar or call get_account_info_v2() in latest version like 0.3.5. Below change provides an alternative. The major limitation is that by calling v1 or old API, the quote_v2() etc cannot be used.
mainly modify the def login() in schwab_api/authentication.py also add example/example_legacy_v1.py
either use get_account_info_v2() or add version='v1' as the login() parameter for get_account_info() to correctly return all schwab accounts info. For best backward compatibility , we should change the def login() default to 'version=v1' and explicit claim 'version=v2' for new API. I don't think I can make that decision and it will change the colab example as well.
example usage case