🚀 Special Offer: Get 30% off your first 3 months. Use code TRADE30 at checkout!
Tutorials > Connect The Broker Account

Connect Schwab Trading Accounts

This tutorial will guide you through the essential steps to connect BotiTrader to your Schwab trading accounts.

Note: For more detailed steps or troubleshooting, refer to the Schwab API Documentation.


1. Register for a Charles Schwab Trading Account

If you already have a Charles Schwab trading account, you can skip the steps below. Otherwise, follow these steps to register for one:

  1. Visit the Charles Schwab account registration page.
  2. Select the type of account you wish to open (e.g., Individual Brokerage, Joint Brokerage).
  3. Follow the prompts on the page to complete the registration process.
  4. Once your account is approved, log in to your trading account to verify your access.

2. Obtain your App Key (Client ID) and Secret (Client Secret)

To integrate your Schwab Trading Account with BotiTrader, you need to register for a Schwab Developer Account and obtain your App Key (Client ID) and Secret (Client Secret) from your Developer Account. If you have already completed this process before, you can skip the steps below. Otherwise, follow these steps to complete this process:

Step 1: Register for a Charles Schwab Developer Account

Important: The Developer Account is NOT the same as the Trading Account. Please do not confuse the two. In this tutorial, we use Trading Account and Developer Account to distinguish them.

  1. Visit the Charles Schwab Developer Portal.
  2. Click the "Register" button at the top right corner of the page and follow the prompts to complete the registration of your Developer Account.
  3. After registration, visit the Charles Schwab Developer Login Page to log in using your Developer Account credentials. Please note that the login page may take extra time to load. If the page does not load within a reasonable time, try refreshing or checking back later.

Step 2: Register Your Application

  1. Once logged in to your Developer Account, you should be directed to the developer portal page. On your first successful login, you will be directed to the Welcome Page. Click the Individual Developer card, then click Continue.
  2. Click the "API Products" tab in the top navigation bar.
  3. Click the "Trader API - Individual" card from the available products in the center of the page. You'll be redirected to the corresponding product page.
  4. Click the "Request access" button on the product page if you haven't done so already.
  5. After approval, click the "Dashboard" button at the top right corner of the product page. You'll be directed to your dashboard. Then click the "Create App" button near the top right corner of the page. A form will appear where you can input your app's information.
  6. Under "Select an API Product", add both of the following options: Accounts and Trading Production and Market Data Production.
  7. For "Order Limit", enter "120" in the input box.
  8. For "Enter App Name", enter a name of your choice (e.g., "My_App_for_Trading_Bots").
  9. For "Enter Callback URL(s)", enter "https://127.0.0.1:8182" in the input box.
  10. Click the "Create" button at the bottom right corner to create your app. Note: You can only create one app. If you've already created an app, you'll need to delete it before creating a new one.
  11. After creation, click the "Dashboard" button at the top right corner of the product page, and you'll see your newly created app in the table. Check the "Status" column to see the approval status. It may take one or two days for Schwab to approve your app. Once approved, the status will change to "Ready for Use".

Step 3: Obtain Your App Key (Client ID) and Secret (Client Secret)

  1. Click the "Dashboard" button at the top right corner of the product page, and you'll see your newly created app in the table. In the app table, click "View Details" in the "Actions" column. This will show your app's detailed information.
  2. At the bottom of your app's details, you'll find the "App Key" and "Secret".
  3. Click the visibility icons next to the "App Key" and "Secret" to reveal them. Copy these values and save them securely for later use.

3. Authorize BotiTrader to Connect Your Schwab Trading Account

  1. Open BotiTrader after installation.
  2. Sign in using your registered email and password, then click "Sign In".
  3. In the Main window, click on "Connection" in the main menu, and select "Broker Authorization".
  4. The "Authorize Your Broker Account" window appears. Enter the following details in the window:
    • App Key (Client ID): Enter the App Key obtained from the Schwab Developer Portal.
    • Secret (Client Secret): Enter the Secret obtained from the Schwab Developer Portal.
  5. Click "Open Broker Portal". The program will open the Schwab Authorization Portal page in your browser.
  6. In the browser, enter the ID and password of your Trading Account, and then click "Log in". (Note: Use your Trading Account credentials to login in. Do NOT use your Developer Account credentials.)
  7. Once logged in, you will see the Terms and Conditions page. Scroll to the bottom of the page, check the checkbox to confirm the authorization, and then click "Continue", and also click "Accept" in the pop-up window.
  8. Select the Schwab accounts that you wish to authorize BotiTrader to connect to, and click "Continue".
  9. Click "Done" on the final page to complete the authorization process.
  10. If you're redirected to a page showing "Your connection is not private", click the "Advanced" button at the bottom left corner, and then click "Proceed to 127.0.0.1(unsafe)".
  11. If you're redirected to a page showing "This site can’t be reached.", simply ignore it.
  12. If you're redirected to an error page, simply ignore it.
  13. In your BotiTrader platform, a pop-up window will appear showing "Authorization Successful!". This indicates that you have successfully completed the broker authorization, and you can now close the pop-up window.

Important: According to Schwab's requirements, you will need to manually authorize the app every 7 days or sooner. Failure to do so will result in the authorization expiring and the connection to your Schwab Trading Account being paused.

  1. If you don't see a pop-up window showing "Authorization Successful!" in your BotiTrader platform, the broker authorization has failed. Try again and make sure you have gone through every step listed above.