Real-time streaming API for equity quotes, trades, and market indices. Subscribe to specific symbols with field-level granularity to receive only the data you need, minimizing bandwidth and latency.
Documentation Index
Fetch the complete documentation index at: https://finance.dev/llms.txt
Use this file to discover all available pages before exploring further.
Key Features
* for all fields. Minimize bandwidth by requesting only the data you need.Supported Symbols
AAPL, MSFT, GOOGL, TSLA).lastPrice, openPrice, highPrice, lowPrice, etc.).AAPL240119C00150000 for AAPL Jan 19 2024 $150 Call).When subscribing to options, set symbolType: "option" in your subscription request.Data Types
symbolType: "option" and greeksFields is specified.Level 2: compact order book rows
payload.data.orderBook entries use askSize:price:bidSize, and payload.data.quotes entries use exchange:askPrice:askSize:bidPrice:bidSize.Example:Message Framing (NDJSON)
\n). This is known as Newline-Delimited JSON (NDJSON).Clients MUST handle this by splitting incoming WebSocket frames on newline characters and parsing each line as a separate JSON message.\n and parse each line independently.Requirements
Use Cases
POST /auth; the body is only the token object expected by the backend.
Client sends:
payload value is an array of symbol subscription objects.
symbolType defaults to equity. If quoteFields and tradeFields are both omitted, the backend subscribes to all quote and all trade fields for that symbol. Field lists (fields, quoteFields, tradeFields, timeAndSalesFields, greeksFields) accept either a string or an array of strings; arrays are recommended.Basic Examples
quoteFields and tradeFields are omitted, the backend subscribes to all quote and all trade fields:quoteFields when you do not want a trade subscription:"*" to subscribe to all available fields:Multiple Symbols
Level 2 & Time & Sales
Option Contracts
symbolType: "option"."*" to receive all Greeks fields for an option contract:greeksFields is only applicable when symbolType is "option". Including it for equity symbols has no effect.["*"] expands to every backend-supported field for that category.
Quote Fields
quoteFields array. Use ["*"] for all fields.| Field | Description |
|---|---|
* | Wildcard - Subscribe to all available quote fields |
bidPrice | Current best bid price - the highest price a buyer is willing to pay |
bidChange | Change in bid price from the previous quote update |
bidSize | Number of shares available at the bid price (typically in round lots of 100) |
bidSizeChange | Change in bid size from the previous quote update |
bidTimestamp | Unix timestamp in milliseconds when the bid was last updated |
bidExchange | Exchange code where the best bid originated (e.g., ‘Q’ for NASDAQ, ‘N’ for NYSE) |
askPrice | Current best ask (offer) price - the lowest price a seller is willing to accept |
askChange | Change in ask price from the previous quote update |
askSize | Number of shares available at the ask price (typically in round lots of 100) |
askSizeChange | Change in ask size from the previous quote update |
askTimestamp | Unix timestamp in milliseconds when the ask was last updated |
askExchange | Exchange code where the best ask originated (e.g., ‘Q’ for NASDAQ, ‘N’ for NYSE) |
quoteTimestamp | Unix timestamp in milliseconds of the consolidated/top-of-book quote time |
midPrice | Midpoint price calculated as (bidPrice + askPrice) / 2 |
spread | Bid-ask spread calculated as askPrice - bidPrice |
openInterest | Total outstanding open contracts for the option (options only; include in quoteFields when symbolType is "option") |
Trade Fields
tradeFields array. Use ["*"] for all fields.| Field | Description |
|---|---|
* | Wildcard - Subscribe to all available trade fields |
price | Last trade execution price (same as lastPrice in most cases) |
size | Number of shares in the last trade execution |
totalVolume | Cumulative trading volume for the current session (total shares traded) |
tickVolume | Volume of shares traded in the most recent tick/update |
openPrice | Opening price for the current trading session |
highPrice | Highest price reached during the current trading session |
lowPrice | Lowest price reached during the current trading session |
lastPrice | Most recent trade price (last sale price) |
netChange | Net price change from previous close (lastPrice - previousClosePrice) |
tick | Tick direction indicator: ‘up’ (uptick), ‘down’ (downtick), or ‘unchanged’ |
tradeSeq | Trade sequence number - monotonically increasing identifier for each trade |
tradeTimestamp | ISO 8601 timestamp of when the trade was executed |
closePrice | Official closing price (may be from current or previous session depending on market hours) |
previousClosePrice | Previous trading session’s official closing price, used to calculate netChange |
Time & Sales Fields
timeAndSalesFields array when timeAndSales: true. Use ["*"] for all fields (default if not specified).| Field | Description |
|---|---|
* | Wildcard - Subscribe to all available Time & Sales fields |
symbol | The ticker symbol for the trade |
price | Trade execution price |
size | Number of shares in the trade |
tick | Tick direction indicator: ‘up’ (uptick), ‘down’ (downtick), or ‘unchanged’ |
tradeSeq | Trade sequence number - monotonically increasing identifier for each trade |
tradeExchange | Exchange code where the trade was executed (e.g., ‘Q’ for NASDAQ, ‘N’ for NYSE, ‘D’ for FINRA ADF) |
tradeTimestamp | ISO 8601 timestamp of when the trade was executed |
Level 2 Fields
level2: true. The response contains market depth across multiple exchanges in a compact format.| Field | Description |
|---|---|
symbol | The ticker symbol for the order book |
orderBook | Array of compact order book entries in format "askSize:price:bidSize" |
quotes | Array of exchange quotes in format "EXCHANGE:askPrice:askSize:bidPrice:bidSize" |
timestamp | ISO 8601 timestamp of the update |
orderBook follows: "askSize:price:bidSize"askSize: Number of shares at ask (0 if no ask)price: Price levelbidSize: Number of shares at bid (0 if no bid)quotes follows: "EXCHANGE:askPrice:askSize:bidPrice:bidSize"EXCHANGE: Exchange code (NSDQ, NYSE, BATS, EDGX, etc.)askPrice: Ask price at this exchangeaskSize: Number of shares at askbidPrice: Bid price at this exchangebidSize: Number of shares at bidaskSize:price:bidSize (e.g., "0:250.00:100" = 0 shares ask, $250.00 price, 100 shares bid)exchange:askPrice:askSize:bidPrice:bidSize (e.g., "EDGX:272.55:100:272.00:500" = EDGX exchange, 272.00 bid with 500 shares)Greeks Fields
greeksFields array. Only available for option contracts (symbolType: "option"). Use ["*"] for all fields.| Field | Description |
|---|---|
* | Wildcard - Subscribe to all available Greeks fields |
delta | Rate of change of option price per $1 move in the underlying. Ranges 0 to 1 for calls, -1 to 0 for puts |
gamma | Rate of change of delta per $1 move in the underlying. Measures curvature of option value |
theta | Daily time decay of the option price. Typically negative |
vega | Rate of change of option price per 1% change in implied volatility |
rho | Rate of change of option price per 1% change in the risk-free interest rate |
impliedVolatility | Market-implied volatility as a decimal (e.g., 0.2752 = 27.52%) |
symbol | The OSI symbol of the option contract |
timestamp | ISO 8601 timestamp of when the Greeks were last calculated |
Quote Snapshot Example
Trade Snapshot Example
Level 2 Update Example
askSize:price:bidSizeexchange:askPrice:askSize:bidPrice:bidSizeTime & Sales Update Example
Option Contract Snapshot
Greeks Snapshot & Update Example
greeksFields, the server immediately sends a snapshot of the last known Greeks values. Subsequent updates are streamed whenever Greeks are recalculated.1. Initial snapshot (received immediately on subscribe):greeksFields: ["delta", "impliedVolatility"]):action: "snapshot" vs action: "update" to distinguish the initial state from real-time changes. Only the fields you subscribed to are included in each message.Quote Update
Trade Update
| Field | Type | Description |
|---|---|---|
type | string | Outer envelope type. Streaming market data events use event. |
payload.action | string | Event action: snapshot or update |
payload.type | string | Data type: quote, trade, level2nOB, timeAndSales, greeks, or marketStatus |
payload.symbol | string | The ticker or option symbol for symbol-specific events. Omitted for market status events. |
payload.data | object | The event payload. Quote updates include only changed fields. |
payload.id | string | Correlation ID when the server echoes a subscription request ID |
payload.timestamp | integer | Event timestamp in Unix milliseconds |
type: "event" with an action-specific payload. Protocol ping replies use type: "pong". On-demand queries use type: "response".| Message | Description | Resolution |
|---|---|---|
authentication required | The connection must authenticate before this action | Send a POST /auth request message with a valid token |
invalid subscribe format | Subscribe payload could not be parsed as an array of symbol requests | Send payload as an array of objects |
invalid unsubscribe format | Unsubscribe payload could not be parsed as an array of strings or objects | Send payload as ["AAPL"] or [{ "symbol": "AAPL", "quote": true }] |
no symbols provided | The request did not include any symbols | Include at least one symbol |
too many symbols in request | Request exceeded the backend symbol limit | Split symbols across multiple requests |
invalid quote fields: ... | One or more quote field names are not supported | Check field names against the quote field list |
invalid trade fields: ... | One or more trade field names are not supported | Check field names against the trade field list |
invalid greeks fields: ... | One or more Greeks field names are not supported | Use only delta, gamma, theta, vega, rho, or impliedVolatility |
type: "response" with payload.status and payload.data.
Request/response errors use type: "response" with payload.status and payload.error. Streaming subscription errors use type: "event" with payload.action: "error".