Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

SchwabOAuth

Overview

This innovative solution addresses one of the most persistent challenges in OAuth authentication automation.

Instead of building on top of browser automation layers, this solution takes a first-principles approach and rethinks the problem from the ground up. It is powered by a pure native engine with no third-party frameworks or runtime dependencies.

Built in C/C++, the implementation is lightweight, fast, and highly efficient, delivering a streamlined authentication workflow without the complexity and maintenance overhead.

⚡ Fully Automated OAuth Authentication for Schwab

Most current solutions rely on:

  • manual browser interaction
  • Playwright
  • Selenium
  • Puppeteer
  • undetected_chromedriver
  • authorization-code copy/paste workflows
  • periodic manual re-login

SchwabOAuth takes a fundamentally different approach.

What Makes SchwabOAuth Different

✅ No manual authorization pause

Existing solutions typically require users to:

  1. pause automation
  2. manually retrieve authorization code
  3. resume token refresh process

SchwabOAuth eliminates this workflow entirely.

✅ Pure native engine

  • No browser automation frameworks
  • No third-party browser control dependency

✅ Seamless token lifecycle

  • automatic login
  • automatic token refresh
  • automatic token renewal
  • no periodic manual intervention required

This architecture enables a significantly smoother long-running automated trading workflow.


Prerequisites

1. Microsoft Visual C++ Runtime (x64)

SchwabOAuth requires the Microsoft Visual C++ Redistributable Runtime for x64 Windows systems.

Download from Microsoft:

Microsoft Visual C++ Redistributable (x64)

Supported platforms:

  • Windows 10 x64
  • Windows 11 x64

2. Approved Schwab Developer Application

You must have an approved developer application from Charles Schwab Developer Portal in order to obtain:

  • App Key (Client ID)
  • App Secret
  • Callback URL

These values must be configured within your app before authentication can function properly.


3. Regular Schwab Brokerage Account

A standard Schwab brokerage account is required for automated login.

You will need:

  • Schwab username
  • Schwab password

⚠️ Note:

  • This is NOT the Schwab developer portal account
  • The developer account alone cannot be used for trading authentication
  • OAuth authentication must be performed against a regular brokerage account

4. Usage

If you have multiple trading accounts and need to select a specific one, you can configure this using config.xml.

Place the file in:

C:\ProgramData\OAuth

Otherwise, the first account will be used by default.

⚠️ Currently, only one account is supported.

Example configuration:

<Config>
	<AccountIndex>
		<Value>0</Value>
	</AccountIndex>
</Config>

Account indexing is zero-based:

  • 0 = first account
  • 1 = second account
  • 2 = third account
  • etc.

If an invalid account index is specified, authentication or token generation may fail.


Disclaimer

This project is intended for educational and research purposes only.

Users are responsible for complying with:

  • Schwab API Terms of Service
  • OAuth provider policies
  • trading regulations and brokerage agreements

Use at your own risk.


Screenshot

image

Related contribution

TrailCapture, GUI implementation of the same authentication

About

The simplest way to automate the authentication

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages