This guide will show you how to get your Schwab TOTP secret, which is required for this bot to work if you have 2FA enabled.
Note: basically what we're doing is creating a new TOTP code, then adding it to Schwab and this program. That way, the generated code will be the same for both.
- Download a TOTP app. I recommend Authy.
- cd into the
guides
folder, then runpython schwab2fa.py
, copying the symantec ID and the TOTP secret. - Open Authy and click the
+
button to add a new account. - Select
Enter key manually
and enter the TOTP secret from step 2. - Log in to the Schwab security center
- Under Two-Step Verification, select Always at Login, and then select "Security Token" as your method.
- Enter the Symantec ID from step 2 into the Credential ID field.
- Enter the 6-digit code from Authy into the Security Code field.
- Done! Now use the TOTP secret from step 2 as your
SCHWAB_TOTP_SECRET
in your.env
file.
If you have any issues, check the guide by the author of the API here.