Nyria Docs

Connect Schwab to Nyria

End-to-end Charles Schwab setup — developer prerequisites, OAuth flow, account selection, Stock Slices, 4-leg options, and how to fix reauth_required.

By the end you will have a Charles Schwab brokerage account connected to Nyria, with one or more accounts selected for trading, and verified routing for stocks (including fractional Stock Slices) and up to 4-leg option orders.

Schwab is live trading only. Schwab does not expose a paper / sandbox trading API. Test every strategy with the smallest position size your account allows before raising sizing, and read Live vs paper before connecting.

Prerequisites

Before you start, make sure you have:

  • An active Charles Schwab brokerage account in good standing. New accounts can take 1–3 business days to be eligible for API access after funding clears.
  • Options trading approval if you plan to trade options. Schwab assigns an options level (0 through 4). Spreads require Level 2 or higher; long calls/puts require Level 1 or higher. Confirm your level inside the Schwab client portal under Service → Account Settings → Trading & Margin.
  • Margin enabled if you plan to trade short stock or short option spreads. Cash accounts cannot hold short positions.
  • A funded Nyria account on a plan that allows broker connections. See Plans if you have not picked one yet.

You do not need a Schwab developer account or API key. Nyria is the registered developer app — you authorize Nyria from your normal Schwab client login, the same way you would authorize any third-party broker integration.

Step 1: Open the broker connection modal

Sign in to Nyria and open the Integrations tab in the left sidebar.

Click Add Integration.

Choose Schwab from the broker list. The Schwab connection modal opens and shows the supported equity types (stocks and options) and a Connect Schwab button.

If you want a direct link from the marketing site or a Discord post, append ?brokerModal=schwab to the integrations URL — for example https://app.nyria.io/integrations?brokerModal=schwab — and Nyria opens the Schwab modal for you after login.

Step 2: Complete the OAuth flow

Click Connect Schwab in the modal. Nyria redirects you to Schwab's official login page on schwab.com. Verify the URL bar shows schwab.com before entering credentials.

Sign in with your Schwab username and password. If you have 2FA enabled (recommended), complete the second factor.

On the Authorize App screen, review the permissions Nyria is requesting — read account data, read positions, place and cancel orders. Click Allow.

Schwab redirects you back to app.nyria.io/integrations. The URL will look like:

https://app.nyria.io/integrations?broker=schwab&status=connected&accounts=2&connectionAction=connected

Nyria shows the Connection Successful modal listing the accounts that were imported.

Nyria never sees your Schwab username or password. The OAuth flow exchanges an authorization code for an access token directly between Schwab and Nyria's server. Tokens are refreshed automatically.

If the redirect comes back with ?error=... instead of ?status=connected, jump to Common errors below.

Step 3: Select which accounts to trade

A single Schwab login can expose multiple accounts (individual, joint, IRA, trust). Nyria imports them all but does not start trading any of them until you explicitly enable one.

On the Integrations tab, click the newly added Schwab row to expand it. You will see one Account card per Schwab account number, with a masked account label like …1234 — Individual.

Toggle the Enabled for trading switch on each account you want bots to be able to route to. Leave it off for accounts you only want to read balances and positions from.

For each enabled account, set a Display nickname (for example Schwab Roth IRA or Schwab Main). This is what shows up in the bot creation flow.

IRAs and other retirement accounts cannot hold short stock positions or short naked options. If you enable a retirement account, restrict the bot's strategy to long-only or to defined-risk spreads.

Step 4: Confirm live trading only

Schwab does not offer a paper / sandbox API. There is no toggle to flip — every order routed through this connection is real money. Nyria reflects this in the account picker by greying out the Paper option for Schwab and labelling the connection Live.

If you want to dry-run a strategy before going live with Schwab:

  1. Connect a paper broker first (Tradier paper, Alpaca paper, or nyria-paper).
  2. Build and validate the strategy on the paper account.
  3. Once entries and exits behave the way you expect, clone the strategy and switch the account to Schwab.

See Tradier and Alpaca for paper-capable broker setup.

Step 5: Verify stock routing (including Stock Slices)

Schwab supports Stock Slices, their name for fractional shares. Nyria routes fractional quantities to Stock Slices automatically when the strategy is configured with a dollar-budget position sizer instead of a whole-share quantity.

Create a tiny test strategy (or reuse an existing one) with:

  • Equity type: Stocks
  • Position sizing: Fixed dollar amount, set to $10
  • Symbol: any S&P 500 ticker that Schwab supports for slices (e.g. AAPL, MSFT, SPY)

Fire a test entry alert through the strategy's webhook. For the raw payload shape, see Webhook Payload Reference.

Open the bot's log on the Bots tab. You should see a bot_broker_place_timing line followed by a fill at a fractional quantity (for AAPL at $200, expect ~0.05 shares).

Confirm the position appears in Schwab's client portal under Positions with the same fractional quantity.

Stock Slices are supported on a subset of S&P 500 names. If you send a fractional order on a symbol Schwab does not slice, the order is rejected with Invalid order quantity — switch to a whole-share quantity or pick a sliceable symbol.

Step 6: Verify option routing (up to 4 legs)

Schwab supports single-leg options and multi-leg orders up to 4 legs, which covers calls, puts, verticals, calendars, diagonals, iron condors, and iron butterflies. Nyria formats the OCC symbol with Schwab's required spacing automatically — you never type an OCC symbol yourself.

Create a test options strategy with:

  • Equity type: Options
  • Strategy type: Vertical spread (or single-leg long call if your account is options level 1)
  • Symbol: a liquid optionable name like SPY
  • Position sizing: 1 contract

Fire a test entry alert. For multi-leg orders, the parser builds the spread off the strikes you reference in the alert payload — see Webhook Payload Reference for the legs array shape.

Check the bot log. A successful 2-leg order shows a single bot_broker_place_timing line with legs=2. A 4-leg iron condor shows legs=4.

Confirm the spread is held as a single position in Schwab's portal — the legs should be grouped, not listed individually.

Schwab rejects 5+ leg combinations at the API level. If your alert parses into 5 or more legs (for example, a custom condor with a protective wing), Nyria will return Order rejected: too many legs and the order is not placed.

Common errors and fixes

reauth_required

After 7 days of inactivity — or any time Schwab forces a global re-auth (security event, app version bump, password reset on your Schwab account) — Nyria's stored refresh token stops working. The next time the strategy tries to place an order, the bot log shows:

broker=schwab error=reauth_required action=blocked

and the Integrations tab marks Schwab with a red Reconnect badge.

Fix:

Open the Integrations tab and click the Reconnect button on the Schwab row.

Complete the Schwab OAuth flow again (same steps as Step 2 above).

After the redirect, Nyria automatically re-enables the previously selected accounts — you do not need to re-pick them. Bots that were paused because of the failed auth resume on the next incoming alert.

To avoid surprise reauths, set the Auth health notification channel on your profile. Nyria emails you 24 hours before a Schwab refresh token is projected to expire.

Insufficient buying power

Schwab calculated that the order would exceed your available cash + margin. Common causes:

  • Credit spread sizing — Schwab reserves the max loss (width − credit) as buying power. A 5-wide SPY put credit spread sold for $1.00 reserves $400 per contract.
  • Unsettled funds — after a stock sale, cash is unsettled for T+1. Schwab will block new purchases against unsettled funds in a cash account.
  • Day-trade buying power exhaustion in a pattern day trader account.

Reduce position size or wait for settlement, then re-fire the alert.

Invalid option symbol

The strike or expiry Nyria built does not exist on Schwab's option chain. Causes:

  • Strike rounded to a value Schwab does not list (e.g. $0.50 increment on a stock that only lists $1 strikes).
  • Expiry is a non-standard date Schwab does not carry.
  • Weekly that Schwab has not yet listed (sometimes lags by a day).

Pick a different strike or expiry in the alert payload.

Account not approved for options

Your Schwab options level is too low for the order Nyria tried to place. Levels:

  • Level 1 — long calls and long puts
  • Level 2 — Level 1 + covered calls + cash-secured puts + long spreads
  • Level 3 — Level 2 + short spreads + uncovered short index options
  • Level 4 — Level 3 + uncovered short equity options

Apply for a higher level inside Schwab's client portal under Service → Account Settings → Trading & Margin → Options. Approval typically takes 1–2 business days.

Redirect comes back with ?error=access_denied

You clicked Deny (or closed the tab) on Schwab's authorization screen. Retry from Step 1 and click Allow.

Redirect comes back with ?error=server_error

Schwab's OAuth service had a transient failure. Wait 1–2 minutes and retry. If it persists for more than 15 minutes, check the Schwab status page and the Nyria status banner before opening a support ticket.

What this connection does not do

Per Nyria's broker scope, the Schwab integration does not support:

  • Bracket / OCO / OTO orders — Nyria manages exits on its own server-side; broker-attached brackets are intentionally out of scope.
  • Trailing stops — not supported on Nyria; exits are driven by your strategy's exit alerts.
  • Attached-leg take-profits on the same broker order ticket.
  • Futures or cryptocurrency — Schwab's futures API is not integrated. For futures, see Tradovate; for crypto, see Binance (Coinbase coming soon).
  • Paper / sandbox trading — Schwab does not expose one. See Step 4.