Skip to main content

Module streaming

Module streaming 

Source
Expand description

Real-time streaming WebSocket message types and subscription management. Real-time streaming WebSocket types for the Schwab Streamer API.

This module contains types for the WebSocket streaming interface:

  • Request types for subscriptions and commands
  • Response types for acknowledgments
  • Data types for real-time market data
  • Service enums, field tables, and typed payloads per service

§Services

The streaming API supports multiple services:

  • LEVELONE_EQUITIES - Real-time equity quotes
  • LEVELONE_OPTIONS - Real-time option quotes
  • CHART_EQUITY - Real-time chart data
  • ACCT_ACTIVITY - Account activity notifications

Data frames arrive with numbered fields (DataContent::fields); DataItem::decode and the per-service from_content constructors turn them into StreamPayload values with named fields.

Structs§

AccountActivity
An ACCT_ACTIVITY order event. message_data is JSON serialized into a string for order events and plain text for errors; see AccountActivity::message for the parsed form.
AcctActivityFields
Field numbers and names for AccountActivity.
Book
A NYSE_BOOK, NASDAQ_BOOK or OPTIONS_BOOK depth snapshot. Every frame carries the whole book.
BookFields
Field numbers and names for Book.
BookLevel
One price level of a Book side.
BookMarketMaker
One market maker’s quote inside a BookLevel.
ChartEquity
A CHART_EQUITY minute candle. seq numbers the candles of the day; Schwab’s published field order for this service is wrong, this table matches the wire.
ChartEquityFields
Field numbers and names for ChartEquity.
ChartFutures
A CHART_FUTURES minute candle.
ChartFuturesFields
Field numbers and names for ChartFutures.
DataContent
One item of a data frame as the streamer sends it: the subscription key, the service’s envelope keys, and the numbered fields.
DataItem
Field
One row of a service’s field table.
LevelOneEquity
A LEVELONE_EQUITIES quote. Deltas carry only the changed fields.
LevelOneEquityFields
Field numbers and names for LevelOneEquity.
LevelOneForex
A LEVELONE_FOREX quote. Deltas carry only the changed fields.
LevelOneForexFields
Field numbers and names for LevelOneForex.
LevelOneFutures
A LEVELONE_FUTURES quote. Deltas carry only the changed fields.
LevelOneFuturesFields
Field numbers and names for LevelOneFutures.
LevelOneFuturesOption
A LEVELONE_FUTURES_OPTIONS quote. Deltas carry only the changed fields.
LevelOneFuturesOptionFields
Field numbers and names for LevelOneFuturesOption.
LevelOneOption
A LEVELONE_OPTIONS quote. Deltas carry only the changed fields.
LevelOneOptionFields
Field numbers and names for LevelOneOption.
NotifyItem
Schwab documents only the heartbeat notification. Anything else it sends here (an ADMIN notice with a content.code, say) is kept in extra rather than dropped.
ResponseContent
ResponseItem
Screener
A SCREENER_EQUITY or SCREENER_OPTION ranking. Every frame carries the whole list.
ScreenerFields
Field numbers and names for Screener.
ScreenerItem
One ranked symbol in a Screener result. Named on the wire already.
StreamData
StreamNotify
StreamParameters
StreamRequest
StreamRequests
StreamResponse
StreamStatus
Local lifecycle notification, never accepted from the broker wire. lost_messages is cumulative; any increase requires REST reconciliation for account activity. A new session does not recover missed executions. It counts exactly the frames dropped at a full queue. Frames queued before a gap are delivered ahead of the status that reports it.

Enums§

StreamCommand
StreamEnd
Why a stream stopped for good.
StreamMessage
StreamPayload
A DataContent decoded for its service.
StreamResponseCode
StreamService