AI-native runtime for Charles Schwab strategies
Author in Cursor, Claude Code or any AI IDE. Deploy from GitHub into a managed cloud runtime with first-class MCP control, logs and region selection.
Section 01 · At a glance
At a glance
- Broker
- Charles Schwab & Co., Inc. (The Charles Schwab Corporation, NYSE: SCHW)
- Broker type
- US-regulated full-service broker, retail and institutional
- Asset class
- US equities, US options, US futures (via Schwab Futures), bonds, ETFs, mutual funds, FX
- Asset coverage
- US equities (NYSE, NASDAQ, ARCA, BATS, IEX listings), US listed options (OCC-cleared equity and index), US futures and options on futures (CME, ICE US, COMEX, NYMEX) via Charles Schwab Futures and Forex LLC, bonds (US Treasury, US corporate, municipal), ETFs, mutual funds (NTF and load funds), FX. No direct crypto trading; crypto exposure via crypto ETFs and futures. Post-TD Ameritrade integration completed May 2024.
- Runtime model
- Containerised strategy runtime
- Deployment source
- GitHub
- Languages
- Any language that runs in a container
- Common integrations
- Schwab API (REST + OAuth 2.0), schwab-py community Python SDK, native HTTP clients, NautilusTrader (adapter in development), custom connectors
- AI workflow integration
- MCP control surface for Cursor, Claude Code, GitHub Copilot and CLI agents
- TradingHost role
- Runtime, deployment, logs, health checks, region selection, MCP control
- Schwab role
- Broker account, API access, market data, execution venue, custody, settlement, tax reporting, margin management
- Regulators
- Charles Schwab & Co., Inc.: SEC and FINRA registered broker-dealer (CRD 5393). Charles Schwab Futures and Forex LLC: CFTC and NFA registered Futures Commission Merchant (NFA 0263130). SIPC member.
- US retail
- Yes. Sandbox / mock environment available for development.
- Affiliation
- TradingHost is independent and is not affiliated with Charles Schwab & Co., Inc., The Charles Schwab Corporation, or TD Ameritrade (acquired by Schwab in October 2020, account integration completed May 2024).
Section 02 · What Schwab offers
What Charles Schwab offers
The Schwab API launched in late 2024 to replace the legacy TD Ameritrade developer endpoints. It covers US equities, options, futures (via Charles Schwab Futures and Forex LLC), bonds, ETFs and mutual funds under one credential, with OAuth 2.0 + PKCE authentication. The post-TD migration completed account-level integration in May 2024; the API migration completed in early 2025.
Markets and strategy patterns
- Multi-asset US strategies under one Schwab credential
- US options multi-leg through the Schwab Trader API
- CME futures and options on futures via Schwab Futures
- Cross-account portfolio rebalancing
- Mock-environment-validated strategies promoted to live
- thinkorswim-experienced traders bridging to cloud-hosted automation
API surface
- Product surfaces
- Schwab Trader API for US equities, US options and account state. Schwab Market Data API for quotes, options chains, historical data. Futures are handled through Charles Schwab Futures and Forex LLC account types. The Schwab API launched in late 2024 to replace developer.tdameritrade.com endpoints; legacy TD Ameritrade tokens stopped working in early 2025.
- Connection methods
- HTTPS REST for orders, account state, options chains and history. Streaming over a separate WebSocket-style endpoint. Sandbox / mock environment serves the same endpoint shapes with mock data; production endpoints use api.schwabapi.com.
- Authentication
- OAuth 2.0 with PKCE (Proof Key for Code Exchange). Application registration through developer.schwab.com requires a Schwab brokerage account. Refresh tokens expire after seven days, which requires either an interactive re-authentication or an automated refresh job inside that window.
For specifics, refer to Charles Schwab
Specific endpoints, rate limits, options approval requirements and market data entitlements live in Schwab’s developer documentation. Treat these as the source of truth.
Section 03 · Build with AI
Build your Schwab strategy with AI
Pick an integration method, fork a starter, and author your strategy in an AI IDE. Cursor, Claude Code, GitHub Copilot and CLI-based AI agents all work with the same GitHub-native deployment loop.
Native Schwab API
Direct HTTPS REST against api.schwabapi.com with OAuth 2.0 + PKCE. Streaming over a separate endpoint. Application registration at developer.schwab.com requires a Schwab brokerage account.
schwab-py
Community Python SDK that wraps the Schwab API. Continues the lineage of the older tda-api project (TD Ameritrade era) with updated auth and endpoint shapes for the post-migration Schwab API.
Framework adapters
NautilusTrader and other event-driven frameworks expose Schwab through community adapters in development. Verify against the adapter's current docs before relying on specific cells.
Custom connector
Your own in-house engine or proprietary Schwab integration. The REST surface is well-documented and the auth flow is standard OAuth 2.0 + PKCE.
Library and framework support for Schwab products
The Schwab API is still maturing after the TD migration. schwab-py is the most active community Python SDK; NautilusTrader’s Schwab adapter is in active development. Custom connectors are practical because the Schwab REST surface is small.
✓ confirmed support per the library or surface docs. "check repo" / "in dev" indicate support is version-dependent or still under active development.
TradingHost does not force a library. It runs your project.
Author with AI
Schwab’s API surface is small and the auth flow is standard OAuth 2.0 + PKCE, both of which AI IDEs handle well. The TradingHost MCP control surface closes the loop: AI tools can inspect deployments, review logs and manage the runtime alongside you, never the trade execution path.
Section 04 · Run on TradingHost
Run your code on TradingHost
Charles Schwab provides the broker account, API access and execution venue. TradingHost provides the production environment where your Schwab-connected strategy runs.
Instead of running strategy code on a laptop, desktop machine, generic VPS or manually configured server, you deploy from GitHub into a TradingHost-managed container runtime.
You
- Your repo contains your code.
- Your deployment defines how it runs.
- Your strategy connects to Schwab.
TradingHost
- Keeps the runtime online.
- Surfaces logs and health checks.
- Region selection.
- Controlled deployment surface.
Deployment flow
- STEP 01
Connect GitHub
Authorise TradingHost to access your GitHub account.
- STEP 02
Link a repo or start from a starter
Point TradingHost at your existing Schwab strategy repo, or fork a Schwab API or schwab-py starter for a working baseline.
- STEP 03
Deploy into a TradingHost container
Pick a region (US-East is the natural pick for US equities, options and CME futures), supply your Schwab OAuth client ID, secret and refresh token as environment values, and deploy. TradingHost runs your strategy on managed Kubernetes infrastructure. Schwab refresh tokens expire after seven days, so build an automated refresh job into your strategy or schedule a re-authentication touchpoint.
- STEP 04
Monitor logs and health
Watch live logs, health and runtime state from the TradingHost dashboard. The same surface is reachable through MCP from any AI IDE. Trade execution stays on the strategy code path, not on MCP.
- STEP 05
Update and redeploy
Push changes to your GitHub main branch and TradingHost redeploys automatically.
Section 05 · Operational notes
Operational notes for Charles Schwab
Things that bite you when you actually run a Charles Schwab strategy in a containerised cloud runtime. The post-TD-Ameritrade migration is the dominant operational reality. Every claim below is quoted or paraphrased from Schwab’s own documentation or a primary regulator source.
01 · TD Ameritrade migration
Legacy TD developer endpoints sunset; Schwab API is the replacement
The TD Ameritrade developer endpoints at developer.tdameritrade.com were retired through early 2025 following Schwab's acquisition of TD Ameritrade. The replacement is the Schwab API at developer.schwab.com. Strategies that previously used tda-api or direct TD endpoints need to migrate to schwab-py or direct Schwab REST. Account integration (combining TD accounts into Schwab accounts) completed in May 2024.
02 · OAuth 2.0 + PKCE
Refresh tokens expire after seven days
The Schwab API uses OAuth 2.0 with PKCE (Proof Key for Code Exchange). Application registration requires a Schwab brokerage account. Refresh tokens have a documented seven-day lifetime: a strategy that runs longer than that needs either an interactive re-authentication touchpoint or an automated refresh workflow that completes inside the window. This is the most-cited Schwab-API operational gotcha.
03 · Sandbox
Mock environment available for development
Schwab exposes a mock environment for development and certification. Endpoint shapes mirror production; balances and orders are simulated. Promoting a strategy from mock to production is a credential and base-URL swap. Keep mock and production credentials in separate TradingHost Secrets entries.
04 · Futures account
Futures trading is through Charles Schwab Futures and Forex LLC
Schwab's futures and forex business runs through a separate registered entity, Charles Schwab Futures and Forex LLC (NFA 0263130), with separate account application and approval. The Schwab API exposes futures by account; a user with only an equities account cannot place futures orders even if the application registration is correct.
05 · Options approval
Options approval is per account, tiered, and gates the order endpoint
Options trading on Schwab requires a tiered approval. Approval level controls which strategies the order endpoint accepts; orders that exceed the approved level are rejected by the broker. Plan strategies around your approved level or upgrade with Schwab before deploying.
SourceSchwab options trading06 · No direct crypto
Schwab does not offer direct crypto trading; exposure is via ETFs and futures
Charles Schwab does not offer direct spot crypto trading on retail brokerage accounts. Crypto exposure for Schwab clients is via crypto ETFs (e.g. spot Bitcoin ETFs since January 2024 approval) and crypto futures via Schwab Futures and Forex. Strategies that need direct spot crypto need a different broker; cross-list to a crypto exchange page in TradingHost.
Section 06 · Built for
Built for
TradingHost Charles Schwab runtimes are best suited to:
- Developers building strategies in AI IDEs (Cursor, Claude Code)
- Former TD Ameritrade API users migrating to Schwab
- Multi-asset systematic traders (equities, options, futures)
- thinkorswim-experienced traders moving to cloud-hosted automation
- Long-horizon portfolio rebalancing strategy authors
Connecting GitHub and creating your first strategy is free.
Section 08 · FAQ
FAQ
No. TradingHost is independent and is not affiliated with Charles Schwab & Co., Inc., The Charles Schwab Corporation, or the legacy TD Ameritrade entities Schwab acquired in October 2020.
No. TradingHost is a runtime for trading strategy code. Charles Schwab & Co., Inc. is the broker-dealer (FINRA CRD 5393), a SIPC member. Futures and forex are handled through Charles Schwab Futures and Forex LLC (NFA 0263130). Your account, custody, market access, settlement and tax reporting all sit with Schwab.
The TD Ameritrade developer endpoints at developer.tdameritrade.com were retired through early 2025 following Schwab's acquisition of TD Ameritrade. The replacement is the Schwab API at developer.schwab.com. Strategies that used tda-api need to migrate to schwab-py or direct Schwab REST. Account integration (combining TD accounts into Schwab accounts) completed in May 2024.
No. Your strategy code connects to Schwab and sends order instructions according to your own logic, account permissions and integration method. TradingHost provides the runtime where that code runs.
No. Schwab API access is provided by Charles Schwab. You are responsible for your Schwab account, application registration at developer.schwab.com, OAuth tokens and compliance with Schwab's terms.
Yes, subject to a Schwab Futures account approval. Futures and forex are handled through the separately registered Charles Schwab Futures and Forex LLC (NFA 0263130).
Yes, subject to Schwab options approval. Approval level controls which strategies the broker accepts; TradingHost does not bypass approval.
Not directly. Schwab does not offer spot crypto trading. Crypto exposure for Schwab clients is via crypto ETFs and crypto futures. For direct spot crypto, use a crypto exchange (Coinbase, Kraken, etc.) and cross-list to the crypto cluster.
Any language that runs in a container. Schwab's API is HTTPS REST plus streaming, so any HTTP and WebSocket-style client can talk to it. schwab-py is the most active community Python SDK.
Register an application at developer.schwab.com (requires a Schwab brokerage account). Run the OAuth 2.0 + PKCE authorisation flow once to obtain a refresh token. Connect your GitHub repo, link it to TradingHost, and deploy with the refresh token in TradingHost Secrets. Schedule an automated refresh because tokens expire after seven days.
In your GitHub-controlled secrets workflow. TradingHost reads them at runtime through GitHub repository secrets, environment secrets or your own approved secret-management process. TradingHost does not need custody of your client ID, client secret or refresh token. See platform secrets.
Schwab refresh tokens have a documented seven-day lifetime. A strategy that runs longer needs either an interactive re-authentication touchpoint or an automated refresh job that completes inside the window. This is the most-cited Schwab API operational gotcha.
Yes. TradingHost supports MCP-based control for AI IDEs including Cursor, Claude Code, GitHub Copilot and CLI-based AI agents. MCP is a control and observability surface, not the trade execution path.
No. The PDT rule (FINRA Rule 4210) is enforced by Schwab, not by TradingHost. Margin accounts under $25,000 are subject to PDT restrictions on day trading.
No. Your 1099 forms come from Schwab at year-end, not from TradingHost.
No. SIPC covers your Schwab brokerage account up to $500,000 (including $250,000 in cash). TradingHost's runtime is not SIPC-insured because TradingHost is not a broker.
TradingHost runs in the EU and US-East regions. US-East is the natural pick for US equities, options and CME futures via Schwab Futures. See the regions page.
No. TradingHost is focused on production runtime and deployment. Backtesting belongs in your research stack, framework or AlgoBuilder.