For the complete documentation index, see llms.txt. This page is also available as Markdown.

Direct price

What is this endpoint for?

This endpoint returns a price calculation for a specific pair by aggregating prices from our trading data. The computation works as follows:

  1. Listen to trades from all selected exchanges where the instrument is actively traded.

  2. 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 recommend using Cross Prices.

Read the full methodology here.

While Fair Market Value Pricing includes fiat conversions, our Oanda FX Rates add-on endpoint ensures IFRS-compliant, auditable conversions for non-USD fiat currencies.

Endpoints

gateway-v0-grpc.kaiko.ovh
gateway-v0-http.kaiko.ovh
https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_spot_direct_exchange_rate_v2

Parameters

Parameter
Description
Examples
Mandatory?

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

1s

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

Explore instruments, codes and exchanges in the Instrument Explorer or Reference Data.

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

Fields

Field
Description

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.

Request examples

Make sure to read our Python quick-start guide before starting.

cURL requests are intended for testing purposes only.

For more advanced users, you can access our full SDK here, where you'll find more coding languages, examples and guidance.

Response Example

Last updated

Was this helpful?