Skip to main content
WSS
What this stream gives you. Open one connection to wss://api.aries.com/v1/market/ws, authenticate once, and the server will push live prices, trades, and order-book activity for any symbols you ask about. You can stream the same data a professional trader watches on screen — bid/ask quotes, last sale prices, intraday OHLC, every individual trade as it prints, full depth-of-market, and option Greeks — without polling.

Key Features

Field-Level Subscriptions

Choose specific quote/trade fields or use wildcard * for all fields. Minimize bandwidth by requesting only the data you need.

Real-Time Updates

NDJSON message framing for optimal performance with millisecond-level latency.

Initial Snapshot

Get the current market state when you subscribe.

Multi-Symbol Support

Subscribe to multiple symbols in a single request for efficient batch subscriptions.

Equities & Options

Stream real-time data for stocks and option contracts using OSI symbols.

Market Indices

Track major indices including SPX, NDX, DJI, VIX, and more in real-time.

Equities

Standard stock ticker symbols. Pass them just as you’d type them on a brokerage screen — for example AAPL, MSFT, GOOGL, TSLA. No special formatting required.

Indices

Major market indices are supported:
Indices are computed values, not securities you can buy and sell directly, so they don’t have bid/ask quotes. When subscribing to an index, only request trade fields (lastPrice, openPrice, highPrice, lowPrice, netChange, totalVolume, etc.). Quote fields like bidPrice/askPrice will be empty.

Options

Option contracts use OSI (Options Symbology Initiative) symbols — the 21-character standard the U.S. options industry uses to uniquely identify a contract.The format is ROOT + YYMMDD + C/P + 00000000 (the strike price in cents, left-padded). For example, AAPL240119C00150000 decodes as:
  • AAPL — underlying stock
  • 240119 — expiration date, 2024-01-19
  • C — call (use P for a put)
  • 00150000 — strike price, $150.00 (00150000 ÷ 1000)
When subscribing to options, set symbolType: "option" so the server knows to apply option-specific routing and to enable Greeks if requested.

Quote Data

The best price a buyer is currently willing to pay (bid) and the best price a seller is currently willing to accept (ask), pulled from all U.S. exchanges combined — known as the NBBO (National Best Bid and Offer).

Trade Data

The price and size of the most recent trade, plus session-level totals: OHLC = Open, High, Low, Close — the standard four prices used to draw a candle on a chart.

Level 2 / Order Book Data

Market depth — every visible bid and ask across the major exchanges, not just the single best price. Lets you see how much demand is sitting at each price level and which exchanges are quoting it.

Time & Sales Data

Every individual trade as it prints, with price, size, timestamp, and the exchange where it executed. Often called “the tape” — traders use it to read order flow and gauge buying vs. selling pressure.

Greeks Data

For option contracts: the standard risk measures (delta, gamma, theta, vega, rho) plus implied volatility. The first message is a snapshot of the last known values; after that you receive updates whenever the Greeks are recalculated. Only available when symbolType: "option" and greeksFields is specified.

Market Status

Whether the U.S. market is currently open, closed, in pre-market, or in after-hours trading, plus the status of individual exchanges.
What you receive first: Quote, trade, and Greeks subscriptions all send an initial snapshot of the current state, then stream updates as values change. Level 2 is the exception — it does not send a snapshot, only live updates as new depth arrives from the exchanges.
Level 2 updates are forwarded from the market feed as compact string arrays. payload.data.orderBook entries use askSize:price:bidSize, and payload.data.quotes entries use exchange:askPrice:askSize:bidPrice:bidSize.Example:
To keep latency low when the market is active, the server may bundle several updates into a single WebSocket frame and separate them with a newline character (\n). This format is called NDJSON — Newline-Delimited JSON.What this means for you: Don’t just call JSON.parse(frame) on every incoming message. Instead, split the frame on \n, drop empty lines, and parse each line independently. Otherwise you will silently lose messages whenever the server coalesces.

Example

A single WebSocket frame may contain:
Clients should split on \n and parse each line independently.

WebSocket Client

Library that supports WSS protocol for secure WebSocket connections.

Authentication

Valid authentication token (if required by your environment).

JSON Parser

NDJSON message format handling capability for parsing streaming data.

Network Connectivity

Stable network connection to the WebSocket endpoint.

Portfolio Monitoring

Live price updates, bid/ask spreads, and intraday performance tracking for your holdings.

Trading Applications

Real-time market prices for order entry systems and trade execution platforms.

Market Dashboards

Display market trends and index movements (SPX, NDX, VIX) on your analytics dashboard.

Price Alert Systems

Trigger notifications on price thresholds, volume spikes, or custom market conditions.

Market Analysis Tools

Real-time data feeds for technical analysis and market research applications.

Authentication

If authentication is enabled, authenticate after opening the WebSocket and before subscribing. Auth uses the request/response envelope with POST /auth; the body is only the token object expected by the backend. Client sends:
Server responds:

Subscribing to Market Data

Basic Subscription Structure

To start receiving data for a symbol, send a subscribe message. The payload is always an array, even when you only want one symbol — each item describes one symbol and the specific fields you want to receive for it. Subscription object fields:
Defaults & shortcuts.
  • symbolType defaults to "equity". Set it to "option" only when you’re subscribing to an option contract.
  • If you omit both quoteFields and tradeFields, the server treats it as “send me everything” and subscribes you to all quote and all trade fields for that symbol.
  • Any field list (quoteFields, tradeFields, timeAndSalesFields, greeksFields) accepts either a single string ("bidPrice") or an array (["bidPrice", "askPrice"]). Arrays are recommended for consistency.

Subscription Examples

Subscribe to Trade Fields Only

Get just price and size data for AAPL:

Subscribe to All Quote and Trade Fields

When both quoteFields and tradeFields are omitted, the backend subscribes to all quote and all trade fields:

Subscribe to Quote Fields Only

Include only quoteFields when you do not want a trade subscription:

Subscribe to All Fields Using Wildcard

Use "*" to subscribe to all available fields:

Subscribe to Specific Quote Fields for Multiple Symbols

Subscribe to Multiple Symbols with Different Fields

Different symbols can have different field subscriptions:

Subscribe to Level 2 Order Book Data

Subscribe to Time & Sales Data

Subscribe to Both Level 2 and Time & Sales

Perfect for tape reading and order flow analysis:

Full Market Data Suite

Subscribe to quotes, trades, Level 2, and Time & Sales:

Subscribe to S&P 500 Index

Indices do not have bid/ask quote data. Use tradeFields only.

Subscribe to Multiple Indices

Mixed Equities and Indices

Subscribe to a Single Option Contract

Options use OSI (Options Symbology Initiative) symbols. You must set symbolType: "option".

Subscribe to Multiple Option Contracts

Subscribe to All Greeks (Wildcard)

Use "*" to receive all Greeks fields for an option contract:

Subscribe to Specific Greeks Fields

Request only the Greeks you need to minimize bandwidth:

Subscribe to Greeks Alongside Quotes

Combine Greeks with quote data in a single subscription:
greeksFields is only applicable when symbolType is "option". Including it for equity symbols has no effect.

Available Fields Reference

Frequently used fields you can subscribe to, organized by data type. The wildcard ["*"] expands to every backend-supported field for that category.

Quote Fields

Subscribe to these fields using the quoteFields array. Use ["*"] for all fields.
Fields from type down are fundamental and reference data drawn from the symbol snapshot rather than the live order book. They are delivered as strings (except hasOptions, which is a boolean), and field names are case-sensitive — use the exact casing shown (e.g. PE, EPSDiluted).
Example:
Subscribe to these fields using the tradeFields array. Use ["*"] for all fields.Example:
For Indices: Use trade fields only. Indices do not have bid/ask quote data.
Subscribe to these fields using the timeAndSalesFields array when timeAndSales: true. Use ["*"] for all fields (default if not specified).Example:
Time & Sales shows every individual trade execution in real-time. Essential for tape reading and order flow analysis.
Level 2 data is enabled with level2: true. The response contains market depth across multiple exchanges in a compact format.Order Book Format: Each entry in orderBook follows: "askSize:price:bidSize"
  • askSize: Number of shares at ask (0 if no ask)
  • price: Price level
  • bidSize: Number of shares at bid (0 if no bid)
Quotes Format: Each entry in quotes follows: "EXCHANGE:askPrice:askSize:bidPrice:bidSize"
  • EXCHANGE: Exchange code (NSDQ, NYSE, BATS, EDGX, etc.)
  • askPrice: Ask price at this exchange
  • askSize: Number of shares at ask
  • bidPrice: Bid price at this exchange
  • bidSize: Number of shares at bid
Example Response:
Format Guide:
  • orderBook: askSize:price:bidSize (e.g., "0:250.00:100" = 0 shares ask, $250.00 price, 100 shares bid)
  • quotes: exchange:askPrice:askSize:bidPrice:bidSize (e.g., "EDGX:272.55:100:272.00:500" = EDGX exchange, 272.55askwith100shares,272.55 ask with 100 shares, 272.00 bid with 500 shares)
No Initial Snapshot: Level 2 data does not provide an initial snapshot. You will receive updates as they arrive from the market feed.
Subscribe to these fields using the greeksFields array. Only available for option contracts (symbolType: "option"). Use ["*"] for all fields.What are Greeks? Greeks are standard risk measures that tell you how an option’s price is likely to move when something changes — the underlying stock price, time, or volatility. They are the building blocks of options risk management.Example (all Greeks):
Example (selective fields):
greeksFields is only applicable when symbolType is "option". It has no effect for equity or index symbols.

Unsubscribing from Market Data

The WebSocket supports three unsubscribe modes for flexible subscription management.
Remove all subscriptions for one or more symbols:
This removes all quote, trade, Level 2, Time & Sales, and Greeks subscriptions for the specified symbols.

Unsubscribe Response

When you unsubscribe, the server confirms the action:

Message Formats & Responses

Snapshot Responses

When you subscribe, you immediately receive a snapshot of current market data. The snapshot contains all requested fields.

Quote Snapshot Example

Level 2 does not send an initial snapshot. You receive updates as they arrive.
Format Guide:
  • orderBook: askSize:price:bidSize
  • quotes: exchange:askPrice:askSize:bidPrice:bidSize
Each Time & Sales message represents a single trade execution. You may receive multiple messages per second during active trading.
Upon subscribing with 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):
2. Real-time update (streamed when Greeks change):
Selective fields (using greeksFields: ["delta", "impliedVolatility"]):
Use 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.

Update Responses

After the snapshot, you receive real-time updates with only changed fields:

Quote Update

Bandwidth Optimization: Updates contain only fields that changed since the last message, minimizing network usage.

Market Status Updates

After successful authentication and whenever market status changes, the server can send a market status event:

Streaming event structure

Streaming market data events use the following envelope:
Quick guide to outer type values:
  • event — Streaming pushes from the server: market data, auth/refresh notifications, unsubscribe confirmations, subscription errors.
  • pong — Reply to a ping you sent. Used only for keep-alive.
  • response — Reply to an on-demand request you sent (e.g. fetching option expiry dates).

Error Handling

Error Response Format

Common Error Messages

Always implement error handling in your WebSocket client to handle network issues, invalid requests, and server errors gracefully.

Connection Management

Ping/Pong Keepalive

Send periodic pings to keep the WebSocket connection alive and detect network issues: Client sends:
Server responds:
Recommended: Send a ping every 30-60 seconds to maintain the connection and detect disconnects quickly.

Handling Disconnects

Implement exponential backoff for reconnections: start with 1 second, then 2s, 4s, 8s, up to a maximum of 60 seconds.

Request/Response Pattern

Besides streaming subscriptions, the WebSocket supports on-demand queries using a RESTful-style request/response pattern.

Get Option Expiry Dates

Query all available expiration dates for an underlying symbol: Request:
Response:

Get Option Contract Symbols

Query all call and put contracts for a symbol and expiration date: Request:
For weekly contracts, include the optional frequency path segment:
Response:

Request Responses

Successful request replies are returned as 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".
Auth Request
type:object

Request to authenticate the WebSocket connection

Subscribe Request
type:object

Request to subscribe to market data for one or more symbols

Unsubscribe Request
type:object

Request to unsubscribe from market data

Ping Request
type:object

Keep-alive ping message

Get Expiry Dates Request
type:object

Request to get option expiration dates for a symbol

Get Contract Symbols Request
type:object

Request to get option contract symbols for a symbol and expiry date

Get Equity Snapshot Request
type:object

Request to get a full snapshot of equity data for a symbol

Quote Update
type:object

Real-time quote update for a subscribed symbol

Trade Update
type:object

Real-time trade/price update for a subscribed symbol

Level 2 / Order Book Update
type:object

Real-time Level 2 order book update showing market depth across exchanges

Time & Sales Update
type:object

Real-time trade execution from the time and sales feed

Greeks Update
type:object

Greeks snapshot on subscribe and real-time updates for an option contract

Error Response
type:object

Error message from the server

Auth Required Response
type:object

Server requests authentication

Refresh Auth Response
type:object

Server warns authentication expires soon

Auth Expired Response
type:object

Server notifies authentication has expired

Auth Success Response
type:object

Successful authentication response

Snapshot Response
type:object

Initial snapshot of market data after subscription

Unsubscribe Response
type:object

Confirmation of unsubscribe request

Pong Response
type:object

Response to ping request

Get Expiry Dates Response
type:object

Response containing option expiration dates

Get Contract Symbols Response
type:object

Response containing option contract symbols (calls and puts)

Get Equity Snapshot Response
type:object

Response containing comprehensive equity data snapshot

Market Status Update
type:object

Current market status