# Websocket Forex API Top-of-Book Endpoint wss://api.tiingo.com/fx
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 price) change.
We obtain our data through raw binary feeds we receive via feeds that cannot to tier-1 banks and FX dark pools. We then send the data straight to you after minor processing (even before we update our databases).
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 microsecond resolution. Please build your systems cautiously and to scale, otherwise you may use our REST API which leverages Tiingo's infrastructure for this purpose.
You can find out about the full product offering on the Product - Forex page.
With Tiingo's Websocket/Firehose Forex API, you can gain access to all data we receive via our feeds.
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 Forex Websocket API:
# Websocket Top-of-Book Endpoint wss://api.tiingo.com/fx
The Forex 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 FX 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
mid = (bidPrice + askPrice)/2.0
7
6