RealizeAlpha has integrated with Charles Schwab to provide users with a broader range of brokerage options. This integration allows Schwab clients to connect their accounts and manage their portfolios directly from the RealizeAlpha app.
SchwabService: A dedicated service class handles all interactions with the Schwab API, ensuring secure and efficient data retrieval.Instrument.fromSchwabJson, OptionOrder.fromSchwabJson) have been implemented to parse Schwab-specific data formats.SchwabService.placeOptionsOrder() supports single-leg option orders, while placeMultiLegOptionsOrder() supports multi-leg strategies. Both methods use the linked Schwab account and preserve the existing order-status workflow.The Charles Schwab Developer Portal (developer.schwab.com) provides two primary REST products and a high-throughput WebSocket streaming engine:
/marketdata/v1) — Issue #93 (Implemented)GET /marketdata/v1/quotes): Real-time bid, ask, size, last trade, 52-week ranges, PE ratio, and dividend yields for individual or batch symbols via SchwabService.getQuote() and refreshQuote().GET /marketdata/v1/pricehistory): Historical OHLCV candlestick bars across multiple intervals (minute, daily, weekly) and spans (day, month, year, ytd) with extended-hours support via SchwabService.getInstrumentHistoricals(). Backs interactive charts and backtesting.GET /marketdata/v1/instruments?projection=fundamental): Fundamental statistics including market cap, EPS, shares outstanding, and dividend metrics via SchwabService.getFundamentals() and getFundamentalsById().GET /marketdata/v1/movers/{index}): Real-time top gainers/losers by percentage change or volume for $DJI, $COMPX, $SPX via SchwabService.getMovers() and screener feed for SearchWidget via SchwabService.getTopMovers().GET /marketdata/v1/markets): Operating schedules, pre-market/after-hours states, and market holiday calendars via SchwabService.getMarketHours().GET /marketdata/v1/chains): Fast retrieval of available expiration dates via SchwabService.getOptionExpirationChain(), option market quotes and Greeks via SchwabService.getOptionMarketData(), and periodic refresh via SchwabService.refreshOptionMarketData().GET /marketdata/v1/chains?strategy=...): Full multi-leg strategy chain parsing supporting all 11 strategies (SINGLE, COVERED, VERTICAL, CALENDAR, STRANGLE, STRADDLE, BUTTERFLY, CONDOR, DIAGONAL, COLLAR, ROLL) via SchwabService.getStrategyOptionChain() and buildStrategyChainUrl(). Parses monthlyStrategyList, composite package pricing (bid, ask, mark), spread widths, net debit/credit classifications, composite Greeks ($\Delta, \Gamma, \Theta, \mathcal{V}, \rho$), and constituent legs via SchwabStrategyChain, SchwabMonthlyStrategy, SchwabStrategyPackage, and SchwabStrategyLeg. Interactive viewing and selection provided by SchwabStrategyChainWidget./trader/v1) — Issue #91, Issue #122GET /trader/v1/accounts): Balances, positions, cash, and margin buying power (Implemented).GET /trader/v1/accountNumbers): Multi-account mapping between masked account numbers and encrypted hash values (Implemented).POST /trader/v1/accounts/{accountNumber}/orders): Single-leg and multi-leg equity and options order routing via SchwabService.placeInstrumentOrder, placeOptionsOrder, and placeMultiLegOptionsOrder (Implemented).POST /trader/v1/accounts/{accountNumber}/previewOrder): Pre-trade validation of buying power impact, estimated commission, regulatory fees (SEC, TAF, Opt Reg), and margin requirements via SchwabService.previewOrder, previewEquityOrder, previewOptionsOrder, and previewMultiLegOptionsOrder, integrated into TradeInstrumentWidget and TradeOptionWidget with SchwabOrderPreviewCard (Implemented).PUT /trader/v1/accounts/{accountNumber}/orders/{orderId}): In-flight price and contract count adjustments for working orders via SchwabService.replaceOrder (Implemented).DELETE /trader/v1/accounts/{accountNumber}/orders/{orderId}): Working order cancellation with populated cancel and cancelUrl links (Implemented).GET /trader/v1/accounts/{accountNumber}/transactions) — Issue #91 (Implemented): Historical executions, dividends, interest credits, cash transfers, and fee audits via SchwabService.getSchwabTransactions(), getSchwabTransaction(), getDividends(), streamDividends(), getInterests(), and streamInterests(). Integrates directly with DividendStore and IncomeTransactionsWidget for dividend yield and cash flow tracking. Dedicated interactive viewing, filtering (trades, income, cash, fees, symbol, date presets 1M/3M/6M/YTD/1Y/custom), and CSV export provided by SchwabTransactionsWidget.GET /trader/v1/userPreference) — Issue #91 (Implemented): Account defaults, primary account detection, streamer connection credentials, and market data offer permissions via SchwabService.getUserPreferences() and SchwabUserPreference.wss://streamer-api.schwab.com/ws) — Issue #145 (Implemented)wss://streamer-api.schwab.com/ws and issues ADMIN LOGIN handshake with OAuth access token and correlation metadata from GET /trader/v1/userPreference (schwabClientCustomerId, schwabClientCorrelId, schwabClientChannel, schwabClientFunctionId).LEVELONE_EQUITIES): Sub-second streaming quote updates (SchwabEquityQuoteUpdate, Quote.fromSchwabStreamer) tracking bid, ask, size, last price, volume, day high/low, and 52-week ranges.LEVELONE_OPTIONS): Streaming option market data and real-time Greeks (SchwabOptionQuoteUpdate, OptionMarketData.fromSchwabStreamer) tracking Delta, Gamma, Theta, Vega, Rho, and Implied Volatility (IV).ACCT_ACTIVITY): Push-based order fill notifications, cancellations, and execution confirmations via SchwabAccountActivity.CHART_EQUITY): 1-minute OHLCV candlestick bar push feeds for active chart views via SchwabChartBarUpdate.LEVELONE_FUTURES, LEVELONE_FOREX): Real-time streaming for Schwab futures contracts (/ES, /NQ) and currency pairs (EUR/USD).{"notify": [{"heartbeat": "..."}]}) and exponential backoff auto-reconnect with state preservation (automatically re-subscribes all active tickers upon reconnect).