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 quotesLEVELONE_OPTIONS- Real-time option quotesCHART_EQUITY- Real-time chart dataACCT_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§
- Account
Activity - An
ACCT_ACTIVITYorder event.message_datais JSON serialized into a string for order events and plain text for errors; seeAccountActivity::messagefor the parsed form. - Acct
Activity Fields - Field numbers and names for
AccountActivity. - Book
- A
NYSE_BOOK,NASDAQ_BOOKorOPTIONS_BOOKdepth snapshot. Every frame carries the whole book. - Book
Fields - Field numbers and names for
Book. - Book
Level - One price level of a
Bookside. - Book
Market Maker - One market maker’s quote inside a
BookLevel. - Chart
Equity - A
CHART_EQUITYminute candle.seqnumbers the candles of the day; Schwab’s published field order for this service is wrong, this table matches the wire. - Chart
Equity Fields - Field numbers and names for
ChartEquity. - Chart
Futures - A
CHART_FUTURESminute candle. - Chart
Futures Fields - Field numbers and names for
ChartFutures. - Data
Content - One item of a data frame as the streamer sends it: the subscription
key, the service’s envelope keys, and the numbered fields. - Data
Item - Field
- One row of a service’s field table.
- Level
OneEquity - A
LEVELONE_EQUITIESquote. Deltas carry only the changed fields. - Level
OneEquity Fields - Field numbers and names for
LevelOneEquity. - Level
OneForex - A
LEVELONE_FOREXquote. Deltas carry only the changed fields. - Level
OneForex Fields - Field numbers and names for
LevelOneForex. - Level
OneFutures - A
LEVELONE_FUTURESquote. Deltas carry only the changed fields. - Level
OneFutures Fields - Field numbers and names for
LevelOneFutures. - Level
OneFutures Option - A
LEVELONE_FUTURES_OPTIONSquote. Deltas carry only the changed fields. - Level
OneFutures Option Fields - Field numbers and names for
LevelOneFuturesOption. - Level
OneOption - A
LEVELONE_OPTIONSquote. Deltas carry only the changed fields. - Level
OneOption Fields - Field numbers and names for
LevelOneOption. - Notify
Item - Schwab documents only the heartbeat notification. Anything else it sends
here (an
ADMINnotice with acontent.code, say) is kept inextrarather than dropped. - Response
Content - Response
Item - Screener
- A
SCREENER_EQUITYorSCREENER_OPTIONranking. Every frame carries the whole list. - Screener
Fields - Field numbers and names for
Screener. - Screener
Item - One ranked symbol in a
Screenerresult. Named on the wire already. - Stream
Data - Stream
Notify - Stream
Parameters - Stream
Request - Stream
Requests - Stream
Response - Stream
Status - Local lifecycle notification, never accepted from the broker wire.
lost_messagesis 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§
- Stream
Command - Stream
End - Why a stream stopped for good.
- Stream
Message - Stream
Payload - A
DataContentdecoded for its service. - Stream
Response Code - Stream
Service