# Websocket IEX API 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 June 29th, 2022, we have implemented a 15ms delay. This delay is a new requirement by the IEX Exchange to keep the data free for customers without a license fee, separate license agreement, and reporting to the IEX Exchange. If you need data faster than 15ms, IEX Exchange does require a $500/month license fee paid directly to the Exchange along with a separate license agreement between you and the IEX Exchange. Please reach out to sales@tiingo.com and we can put you in touch with the IEX Exchange for this paperwork. Our belief is that a 15ms delay should make no practical impact to our customers, since network latency between our servers in NY/NJ and most of our customers outside of the NY Metro area, will have network latency greater than 15ms just by geographical separation.
You can find out about the full product offering on the Product - IEX page.
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