WebSocket Endpoints
Beta

The BOATS Overnight Real-time Websocket Endpoints are currently in beta. For production use cases, we recommend the IEX websocket endpoints - which these endpoints expand upon.

# Websocket BOATS API Top-of-Book & Last Trade Endpoint
wss://api.tiingo.com/boats

Just remember, you will need your token in order to connect. Keep it safe.

.

3.5 Websockets (Firehose) - BOATS

3.5.1 Overview

Tiingo provides updates via websocket every time the Top-of-book (best bid/offer prices and sizes) change and when a trade is executed.

We obtain BOATS (Blue Ocean ATS) top-of-book and last-sale feeds, normalize them into Tiingo's realtime array format, and forward every validated update to entitled websocket clients with minimal processing. Updates are delivered as a JSON array inside our JSON object.

To further minimize latency, we use bare metal machines for our realtime infrastructure close to the market-data path.

  • Trades are when a security/stock was traded on an exchange and includes the price (lastPrice), the volume done (lastSize), and the four raw MEMOIR sale-condition characters from BOATS (Sale Condition 1–4).
  • A quote update is when the bid/ask changes, but no trades were done. Tiingo sends a Quote update message via the Websocket if the Top-of-Book values change. In other words, if the best bid price, best bid size, best ask price, or best ask size change, then an update is sent.

The BOATS firehose is an add-on entitlement (BOATS Real-time). Please note the firehose exposes a very high amount of data, in some cases to the nanosecond resolution. Please build your systems cautiously and to scale.

Access to the BOATS firehose requires the BOATS Real-time entitlement on your API account. Without that entitlement, subscribe requests to wss://api.tiingo.com/boats are rejected.

The public BOATS websocket currently exposes a single threshold level: thresholdLevel 3, which streams every validated venue-native quote and trade update Tiingo receives from BOATS (Blue Ocean ATS).

For REST snapshots and overnight OHLC history, see 2.7 REST - BOATS Overnight Real-time. You can find out about the full product offering on the Product - BOATS page.

3.5 Websockets (Firehose) - BOATS

3.5.2 Top-of-Book & Last Trade

With Tiingo's Websocket/Firehose BOATS API, you receive every validated top-of-book and last-trade update from the BOATS venue feed.

Use thresholdLevel 3 (the only public BOATS channel today) to subscribe to the full venue firehose.

For the BOATS Websocket API:

  • A "thresholdLevel" of 3 means you will get ALL venue-native Top-of-Book AND Last Trade updates from BOATS.
To request top-of-book and last trade data, use the following Websocket endpoint.
# Websocket Top-of-Book & Last Trade Endpoint
wss://api.tiingo.com/boats

The BOATS websocket returns meta information about the websocket update message along with the raw data related to that update message.

Check out the table below to see the top-level fields returned from the Websocket BOATS API.

Field Name
JSON Field
Data Type
Description
Service code
service
string
An identifier telling you this is BOATS data. The value returned by this will always be "boats".
Message Type
messageType
char
A value telling you what kind of data packet this is from our BOATS feed. Will always return "A" meaning new price quotes.
BOATS TOP/Price Data
data
array
An array containing the BOATS data. Quote ("Q") and Trade ("T") / Break ("B") updates use different compact layouts — see the tables below. This is a venue-native firehose shape, not the longer IEX /equities array.

To see what fields are returned in the "data" field, please see the table below.

Top-of-Book (Quote) Update Messages

Quote ("Q") updates return a compact 9-element data array with the venue top-of-book only (bid/mid/ask). Halt, after-hours, and trade-slot placeholders from the older IEX-style layout are not included on this feed.

Field Name
Array Index
Data Type
Description
Update Message Type
0
char
Communicates what type of price update this is. Always "Q" for top-of-book quote updates.
Date
1
datetime
A string representing the datetime this quote came in. This is the timestamp reported by BOATS in JSON ISO Format.
Nanoseconds
2
int64
An integer representing the number of nanoseconds since POSIX (Epoch) time UTC.
Ticker
3
string
Ticker related to the asset.
Bid Size
4
int32
The number of shares at the bid price.
Bid Price
5
float
The current highest bid price.
Mid Price
6
float
The mid price when both bidPrice and askPrice are positive. In mathematical terms:
mid = (bidPrice + askPrice)/2.0
This value is calculated by Tiingo and not provided by BOATS.
Null when either side is missing or non-positive (for example a one-sided book).
Ask Price
7
float
The current lowest ask price.
Ask Size
8
int32
The number of shares at the ask price.

Trade & Break Update Messages

Trade ("T") and Break ("B") updates return a compact 10-element data array: last price/size plus the four raw MEMOIR Sale Condition characters at indexes 6–9 (so values like "H" vs "X" stay distinct).

Field Name
Array Index
Data Type
Description
Update Message Type
0
char
Communicates what type of price update this is. "T" for last trade, "B" for trade break.
Date
1
datetime
A string representing the datetime this trade came in. This is the timestamp reported by BOATS in JSON ISO Format.
Nanoseconds
2
int64
An integer representing the number of nanoseconds since POSIX (Epoch) time UTC.
Ticker
3
string
Ticker related to the asset.
Last Price
4
float
The price at which the last trade was executed.
Last Size
5
int32
The amount of shares (volume) traded at the last price.
Sale Condition 1
6
char
The first MEMOIR Last Sale sale-condition character from BOATS. Whitespace-padded venue slots are returned as an empty string "". Commonly "@" for a regular sale.
Sale Condition 2
7
char
The second MEMOIR Last Sale sale-condition character from BOATS. "F" indicates an Intermarket Sweep Order (ISO) / trade-through exemption. Unused positions are "".
Sale Condition 3
8
char
The third MEMOIR Last Sale sale-condition character from BOATS. "T" indicates a Form T / extended-hours trade. Unused positions are "".
Sale Condition 4
9
char
The fourth MEMOIR Last Sale sale-condition character from BOATS. Notable values include "I" (odd lot), "H" (price variation), and "X" (cross / periodic auction). "H" and "X" are kept distinct so clients do not lose that MEMOIR distinction. Unused positions are "".