Skip to Content
BlitzPulse docs are live. Looking for the app? Visit https://app.blitzglobalcapital.com.
Api ReferenceSchwab API

Schwab API

Auto-generated from openapi-snapshot.json. Do not edit by hand — changes are overwritten by scripts/docs/generate_api_reference.py.

18 endpoints in this group.

GET /api/schwab/accounts

Schwab Accounts

Return linked account numbers (display only — not the encrypted hashes).

Responses

CodeDescription
200Successful Response

GET /api/schwab/auth-url

Schwab Auth Url

Return the Schwab OAuth authorisation URL and CSRF state nonce for the connect flow.

Responses

CodeDescription
200Successful Response

GET /api/schwab/balance

Schwab Balance

Return account balance / margin data from Schwab (currentBalances + projectedBalances).

Responses

CodeDescription
200Successful Response

POST /api/schwab/connect

Schwab Connect

Exchange a one-time Schwab authorization code for tokens. The auth code is obtained by redirecting the user to the auth_url and capturing the code query parameter on the callback URL.

Responses

CodeDescription
200Successful Response

POST /api/schwab/disconnect

Schwab Disconnect

Remove stored Schwab tokens.

Responses

CodeDescription
200Successful Response

GET /api/schwab/instrument

Schwab Instrument

Parameters

NameInTypeRequiredDescription
symbolquerystringrequiredTicker symbol or CUSIP
projectionquerystringoptional

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/market-hours

Schwab Market Hours

Parameters

NameInTypeRequiredDescription
marketsquerystringoptional
datequeryoptionalYYYY-MM-DD (defaults to today)
persistquerybooleanoptional

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/movers

Schwab Movers

Parameters

NameInTypeRequiredDescription
indexquerystringoptionalIndex: $SPX
sortquerystringoptional
frequencyqueryintegeroptional0=all

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/open-orders

Schwab Open Orders

Parameters

NameInTypeRequiredDescription
account_hashqueryoptionalhashValue from /accounts. Omit for all linked accounts.

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/option-chain

Schwab Option Chain

Parameters

NameInTypeRequiredDescription
symbolquerystringrequiredUnderlying ticker
contract_typequerystringoptionalALL
strike_countqueryoptional
strategyquerystringoptional
from_datequeryoptionalYYYY-MM-DD
to_datequeryoptionalYYYY-MM-DD

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/positions

Schwab Positions

Fetch current positions from the Schwab broker API.

Responses

CodeDescription
200Successful Response

GET /api/schwab/price-history

Schwab Price History

Parameters

NameInTypeRequiredDescription
symbolquerystringrequiredTicker symbol
period_typequerystringoptional
periodqueryintegeroptional
frequency_typequerystringoptional
frequencyqueryintegeroptional
need_extended_hoursquerybooleanoptional

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/purchasing-power

Schwab Purchasing Power

Aggregate buying power across all Schwab accounts for the Funds widget.

BP-016 (was BP-005 regression): widget called this endpoint and got 404 because only /balance existed. This is a thin summation over /balance that degrades gracefully on Schwab API failure instead of 502-ing.

Returns zeros with degraded=true on failure so the widget can still render.

Responses

CodeDescription
200Successful Response

GET /api/schwab/quotes

Schwab Quotes

Real-time quotes from Schwab Market Data API. Falls back to yfinance (15-min delayed) if Schwab API is unavailable.

Parameters

NameInTypeRequiredDescription
symbolsquerystringrequiredComma-separated ticker symbols, e.g. AAPL,MSFT

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/schwab/refresh

Schwab Refresh

Force-refresh the Schwab access token using the stored refresh token.

Responses

CodeDescription
200Successful Response

GET /api/schwab/status

Schwab Status

Return whether Schwab is connected and when it was last synced.

Responses

CodeDescription
200Successful Response

GET /api/schwab/transactions

Schwab Transactions

Fetch TRADE transactions for a full tax year. account_hash must be the encrypted hashValue, NOT the plain account number.

Parameters

NameInTypeRequiredDescription
account_hashquerystringrequiredEncrypted account hashValue from /accounts
yearquerystringrequiredTax year, e.g. 2025

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/schwab/transactions-auto

Schwab Transactions Auto

Fetch transactions for ALL linked Schwab accounts automatically. Resolves account hashes internally — no account_hash param needed. Flattens each transaction’s transferItems into individual rows.

Parameters

NameInTypeRequiredDescription
yearquerystringrequiredTax year, e.g. 2025
typesquerystringoptionalComma-separated transaction types, e.g. TRADE,DIVIDEND

Responses

CodeDescription
200Successful Response
422Validation Error