Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

ThetaData Streaming WebSocket API

JSON WebSocket streaming of US stock trade/quote, options trade/quote, and index price streams, served locally by the Theta Terminal at ws://127.0.0.1:25520/v1/events. Requires a paid subscription with streaming permissions; a single connection per user is permitted, with CONNECTED/DISCONNECTED status headers and QUOTE/TRADE/STATUS message types.

ThetaData Streaming WebSocket API is one of 14 APIs that ThetaData publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include Streaming, WebSocket, Trades, Quotes, and Real-Time. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

This event API exposes 0 operations across 1 channel, and defines 5 schemas. It is described by AsyncAPI 3.0.0, at version v1.

The API connects through a single server, 127.0.0.1:25520 (ws).

0 operations 1 channels 5 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 3.0.0
API Version
v1
Base URL
ws://127.0.0.1:25520/v1/events

Messages & Schemas 5

The contract defines 5 schemas that model the data carried by its messages. The most detailed are contract (5 properties), header (2 properties). Each schema is shown below with its type and property counts.

status
message
Keep-alive sent every second with terminal-to-FPSS connectivity status.
quote
message
NBBO quote event for a subscribed contract.
trade
message
Trade event for a subscribed contract.
header
object
Present on every message; describes type and connectivity status.
2 properties
contract
object
Present on QUOTE and TRADE messages. For options, strike is in 1/10th of a cent ($140 strike = 140000).
5 properties

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

thetadata-streaming-asyncapi.yml Raw ↑

Other APIs ThetaData publishes across the network.

ThetaData MCP Server
ThetaData At-Time API
ThetaData Calendar API
ThetaData FlatFile API
ThetaData History API
ThetaData Index API
ThetaData Interest Rate API
ThetaData List API
ThetaData Option API
ThetaData Single Day API
ThetaData Snapshot API
ThetaData Stock API