# Websocket IEX API Reference Price, Top-of-Book, & Last Trade Endpoint wss://api.tiingo.com/iex
Just remember, you will need your token in order to connect. Keep it safe.
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 our data through raw binary feeds we receive via a physical connection to IEX in the NY5 data center. We then send the data straight from IEX to you after minor processing (even before we update our databases). This means we send you the IEX data as a JSON array within our JSON object.
To further minimize latency, we use bare metal machines for our cloud infrastructure which are located about 15 miles from the NY5 data center.
With Tiingo Free, Power, Commercial, and Redistribution plans all come with access to the firehose. 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, otherwise you may use our REST API which leverages Tiingo's infrastructure for this purpose.
As of February 1st, 2025 IEX Exchange has changed their market data policies. To receive the FULL TOPS Feed, you must now have a market data agreement signed with the IEX Exchange. Upon signing, you will then be able to receive the full TOPS feed in real-time. If you want a thresholdLevel of 0 or 5 as described below, you will need this agreement.
For customers who do not want to sign a license agreement, you may use our derived data that calculates a reference price for each asset in real-time. While this is not a subsitute for the TOPS Feed, we do believe it will fulfill the needs of 95% of our customer base. There is no additional cost to the IEX Exchange if using our derived data. If you want this compliant-friendly reference price, you may use a thresholdLevel of 6 as described below.
You can find out about the full product offering on the Product - IEX page.
If you do not want to formally paper an agreement with the exchange, you may use the Tiingo Reference price calculation. This calculation is not a full substitute for the TOPS feed, but should fulfill 95% of our customer use cases that require real-time price data. In fact, we even encourage customers who register with the exchange to still use this calculation as it will result in fuller charts and more frequent price updates.
If you do need the full IEX TOPS feed, please scroll below to section 3.3.3
For the Tiingo Reference Price Websocket API:
# Websocket Top-of-Book & Last Trade Endpoint wss://api.tiingo.com/iex
The 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 Tiingo Websocket IEX Reference Price API.
service
messageType
data
To see what fields are returned in the "data" field, please see the table below.
0
1
2
With Tiingo's Websocket/Firehose IEX API, you can gain access to all data we receive via the cross connect, or to data our system determines is a major update.
To control how much data you would like to receive, read about the "thresholdLevel" request parameter below. A higher "thresholdLevel" means you will get less updates, which could potentially be more relevant.
For the IEX Websocket API:
# Websocket Top-of-Book & Last Trade Endpoint wss://api.tiingo.com/iex
The IEX 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 IEX API.
service
messageType
data
To see what fields are returned in the "data" field, please see the table below.
0
1
2
3
4
5
6
mid = (bidPrice + askPrice)/2.0This value is calculated by Tiingo and not provided by IEX.
7
8
9
10
11
12
13
14
15