Last updated
Last updated
This endpoint returns a price calculation for a specific pair by aggregating prices from our trading data. The computation works as follows:
Listen to trades from all selected exchanges where the instrument is actively traded.
Compute RWM price. The computation is based on two principles:
A robust aggregation of prices (derived from a weighted median methodology: full details available here)
An incremental increase of the estimation window seeking for sufficient dataset to compute a robust price (e.g. number of trades under a certain threshold)
At the end of the computation, in case there are still no trades, a null value will be returned. In this instance, we'd reccomend using .
Exchanges that send their trades late may not be captured in the given sliding window.
Make sure to read our before starting.
For more advanced users, you can access our full SDK , where you'll find more coding languages, examples and guidance.
assets
The base
and quote assets
as configured above.
price
The calculated Cross Price.
timestamp
The time the Cross Price was calculated.
window
A nested object containing the following fields:
startTime
- The start of the calculation window for this Cross Price
endTime
- The end of the calculation window for this Cross Price
Duration
- The window as configured above
noTrade
If false
a price was able to be calculated within the window provided. If true
the extrapolate_missing_values
parameter was needed to calculate a price.
window
The window on which you would like your Cross Price to be calculated.
Available windows: 1s
, 5s
, 15s
, 30s
, 60s
, 300s
5s
update_frequency
How regularly you would like to receive your pricing updates.
Available frequencies: 1s
, 5s
, 10s
, 30s
, and 1m
2s
assets
A nested object to configure following properties for your stream:
base
- the base asset you'd like your price to be based on
quote
- the asset you'd like the price to be quoted in
btc
usd
extrapolate_missing_values
This parameter is set to false
by default. Setting it to true
means that if there is no trade price available from the calculation window you configured, the last available price (from outside the window) will be used.
false
Explore codes in the Instrument Explorer or by using the endpoint.