Exchange Rates
Exchange rate is defined as (VWAP-24H) last 24 hour (rolling window over time) Volume Weighted Average Price across multiple data sources listed on our platform. We are selecting and managing the data sources that are used in the calculation based on multiple factors to provide data of highest quality.
Algorithm is described below:
- Exchange rates are produced from quotes, trades, and metadata datasets.
- Symbols that are not data_type = "SPOT" are excluded from the calculation.
- Symbols from the data sources that were marked by us as not legitimate are excluded from the calculation.
- Quotes data where the spread is outside the range of
<0$; 67%>
are discarded.spreadPrc = (ask - bid) / ((ask + bid) / 2)
- The midpoint from the quote data is used as a pricing reference and it's weighted by the passive cumulative volume resting on the best prices.
- Volume from the trades is used to weight the midpoint prices in the VWAP24 algorithm.
- Midpoint data that has not been updated in the last 5 minutes and 1 second is discarded.
- The last 24-hour volume for each symbol is updated every 4 hours when approximately 20% of the data in the sliding window changes (also, the list of eligible markets is updated at the same time).
- Everywhere in the algorithm below, we are using asset pairs only from exchanges that have the highest legitimacy rank, and the rest of the exchanges are discarded. As we establish the highest-ranking exchanges that have this data for each asset pair, we ensure that the highest quality data is used for each of them. The rank used for asset pairing is carried over to the following steps.
- Every 1 second, we update VWAP24 data for every asset pair across all data sources.
- For each asset pair, we also discard data that is outside the 3 sigma range if there are at least 3 exchanges for this asset pair.
- From the VWAP24 data, we are creating a tree structure where node/vertex = asset and edge = rate.
- By traversing the tree structure using the BFS algorithm and our secret sauce, we are able to establish the final exchange rates.
📄️ Get all current rates
Get the current exchange rate between requested asset and all other assets.
📄️ Get specific rate
Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.
📄️ Timeseries data
Get the historical exchange rates between two assets in the form of the timeseries.
📄️ Timeseries periods
You can also obtain historical exchange rates of any asset pair, grouped into time periods.
Was this section helpful?