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.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thetadata-streaming-websocket-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

AsyncAPI Specification

thetadata-streaming-asyncapi.yml Raw ↑
# Derived event surface — ThetaData publishes no AsyncAPI document; this file
# is derived faithfully from the streaming documentation (message types,
# channel pages, and connection rules). Never a provider-published artifact.
asyncapi: 3.0.0
info:
  title: ThetaData Streaming WebSocket API (derived)
  version: v1
  description: >-
    JSON WebSocket streaming of US stock trade/quote, option trade/quote/full-trade,
    and index price/market-value streams, served locally by Theta Terminal v3.
    A single connection per user is permitted; all stream messages arrive on
    one endpoint and it is up to the consumer to distribute them. A STATUS
    keep-alive message is sent every second. Requires a paid subscription with
    streaming permissions (Standard/Pro tiers).
  externalDocs:
    url: https://docs.thetadata.us/Streaming/Getting-Started.html
  x-provenance:
    generated: '2026-07-22'
    method: derived
    source:
      - https://docs.thetadata.us/Streaming/Getting-Started.html
      - https://docs.thetadata.us/Streaming/US-Stocks/Trade-Stream.html
      - https://docs.thetadata.us/Streaming/US-Stocks/Quote-Stream.html
      - https://docs.thetadata.us/Streaming/US-Options/Trade-Stream.html
      - https://docs.thetadata.us/Streaming/US-Options/Quote-Stream.html
      - https://docs.thetadata.us/Streaming/US-Options/Full-Trade-Stream.html
      - https://docs.thetadata.us/Streaming/US-Indices/Price-Stream.html
      - https://docs.thetadata.us/Streaming/US-Indices/Market-Value-Stream.html
defaultContentType: application/json
servers:
  theta-terminal:
    host: 127.0.0.1:25520
    protocol: ws
    pathname: /v1/events
    description: >-
      Local Theta Terminal FPSS WebSocket endpoint. Streaming requests are sent
      and all event messages received on this single connection. Connection
      status is DISCONNECTED until the first request is made. FPSS region is
      configurable ([fpss] fpss_region = fpss_nj_hosts | fpss_stage_hosts |
      fpss_dev_hosts).
channels:
  events:
    address: /v1/events
    description: The single event channel carrying all STATUS, QUOTE, and TRADE messages.
    messages:
      status:
        $ref: '#/components/messages/status'
      quote:
        $ref: '#/components/messages/quote'
      trade:
        $ref: '#/components/messages/trade'
operations:
  receiveEvents:
    action: receive
    channel:
      $ref: '#/channels/events'
    summary: Receive STATUS keep-alives and QUOTE/TRADE stream messages.
components:
  messages:
    status:
      name: STATUS
      summary: Keep-alive sent every second with terminal-to-FPSS connectivity status.
      payload:
        type: object
        properties:
          header:
            $ref: '#/components/schemas/header'
    quote:
      name: QUOTE
      summary: NBBO quote event for a subscribed contract.
      payload:
        type: object
        properties:
          header:
            $ref: '#/components/schemas/header'
          contract:
            $ref: '#/components/schemas/contract'
    trade:
      name: TRADE
      summary: Trade event for a subscribed contract.
      payload:
        type: object
        properties:
          header:
            $ref: '#/components/schemas/header'
          contract:
            $ref: '#/components/schemas/contract'
  schemas:
    header:
      type: object
      description: Present on every message; describes type and connectivity status.
      properties:
        status:
          type: string
          enum: [CONNECTED, DISCONNECTED]
        type:
          type: string
          enum: [STATUS, QUOTE, TRADE]
    contract:
      type: object
      description: >-
        Present on QUOTE and TRADE messages. For options, strike is in 1/10th
        of a cent ($140 strike = 140000).
      properties:
        security_type:
          type: string
          description: e.g. OPTION, STOCK, INDEX
        root:
          type: string
          description: Underlying symbol (e.g. TTWO)
        expiration:
          type: integer
          description: YYYYMMDD (options)
        strike:
          type: integer
          description: Strike in 1/10th of a cent (options)
        right:
          type: string
          enum: [C, P]