# Subscribe

## What is this endpoint for? <a href="#what-is-this-endpoint-for" id="what-is-this-endpoint-for"></a>

Reference Rates that average the prices over a period of time to determine an average value and daily “close” prices (as crypto is 24/7, "close" prices are always synthetic). They can be used for several use cases, from settlement of derivatives contracts to asset pricing and valuation. More information on the specific rates can be found [here](https://www.kaiko.com/products/rates-and-indices/kaiko-digital-asset-rates).

## Endpoints

{% tabs %}
{% tab title="gRPC" %}

```url
gateway-v0-grpc.kaiko.ovh
```

{% endtab %}

{% tab title="http" %}

```url
gateway-v0-http.kaiko.ovh
```

{% endtab %}

{% tab title="API (testing)" %}
{% code overflow="wrap" %}

```url
https://gateway-v0-http.kaiko.ovh/api/stream/index_v1
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Request parameters

<table><thead><tr><th width="184">Parameter</th><th width="400">Description</th><th>Examples</th></tr></thead><tbody><tr><td><code>index_code</code></td><td>The Kaiko Benchmark Reference Rate ticker. You can find a full list of our tickers <a href="https://www.kaiko.com/products/rates-and-indices/kaiko-digital-asset-rates">here</a> or by API <a href="broken-reference">here</a>.</td><td><code>KK_BRR_BTCUSD</code></td></tr></tbody></table>

{% hint style="info" %}
**Requesting multiple tickers at the same time**\
\
To configure multiple tickers in the same stream, provide the  `indexCode` as a comma-separated list, e.g. `KK_PR_BTCUSD,KK_AAVE_USD`

\
Alternatively, use a wildcard by entering a `*` ,and you'll receive all tickers you have as part of you Kaiko subscription.
{% endhint %}

## Response fields

<table><thead><tr><th width="210">Field</th><th width="537">Description</th></tr></thead><tbody><tr><td><code>indexCode</code></td><td>The ticker identifying the rate.</td></tr><tr><td><code>commodity</code></td><td>The type of publication. Either real-time or fixings</td></tr><tr><td><code>interval</code></td><td>The time period in which transaction data are considered for the calculation of the rate. If a rate's calculation methodology has an interval of 15 seconds, <code>startTime</code> and <code>endTime</code> will be separated by <code>15s</code>.</td></tr><tr><td><code>quote</code></td><td>The quote asset used for the rate denomination.</td></tr><tr><td><code>bases</code></td><td>The list of base assets included in the rate and their weight. For reference rates, this will always be a single asset. </td></tr><tr><td><code>exchanges</code></td><td>The exchanges involved in the computation. This list may change every quarter during the rebalancing period and depending on the new results of the Kaiko Exchange Ranking.</td></tr><tr><td><code>percentages</code></td><td>The different distribution levels included in the price computation.</td></tr><tr><td><code>price</code></td><td>The value of the rate in the quote denomination.</td></tr><tr><td><code>pairs</code></td><td>The list of pairs combined with additional details included in the computation.</td></tr><tr><td><code>tsEvent</code></td><td>The exact time of price publication.</td></tr><tr><td><code>sequenceId</code></td><td>A unique identifier for the publication.</td></tr><tr><td><code>lastIngestTime</code></td><td>The timestamp of the last trade ingested and used in the rate computation.</td></tr><tr><td><code>lastAnomalyIngestTime</code></td><td>The timestamp of the last anomaly detected during ingestion.</td></tr><tr><td><code>fallbackInfo</code></td><td>An object containing fallback information</td></tr></tbody></table>

## Request examples

{% tabs %}
{% tab title="Python" %}
{% @github-files/github-code-block url="<https://github.com/kaikodata/kaiko-sdk-examples/blob/master/python/code-example/index_rate_request.py>" visible="false" %}
{% endtab %}

{% tab title="Python (Replay)" %}
**This example demonstrates how to request historical data using replay. The maximum amount of data you can request for one replay cannot exceed a total of 24 hours in `hours`, `seconds`, and `minutes`.** \
\
**Replay data is available on a 72-hour rolling basis and should only be used to retrieve missed data. If full history is required, please use Rest API or CSV deployment methods.**

{% @github-files/github-code-block url="<https://github.com/kaikodata/kaiko-sdk-examples/blob/master/python/code-example/index_rate_request_replay.py>" visible="false" %}
{% endtab %}

{% tab title="cURL" %}
**cURL requests are intended for testing purposes only.**

{% code overflow="wrap" %}

```url
curl -X POST "https://gateway-v0-http.kaiko.ovh/api/stream/index_v1" -H "accept: application/json" -H "X-Api-Key: $KAIKO_API_KEY" -H "Content-Type: application/json" -d "{\"indexCode\": \"KK_BRR_BTCUSD\"}"
```

{% endcode %}
{% endtab %}

{% tab title="Other examples" %}
For more advanced users, you can access our full SDK [here](https://github.com/kaikodata/kaiko-sdk-examples/tree/master), where you'll find more coding languages, examples and guidance.
{% endtab %}
{% endtabs %}

## Response Example

```json
{
  "result": {
    "indexCode": "KK_BRR_BTCUSD_LDNLF",
    "commodity": "SIC_DAILY_FIXING",
    "interval": {
      "startTime": "2026-03-15T15:55:00Z",
      "endTime": "2026-03-15T16:00:00Z"
    },
    "quote": "usd",
    "bases": [
      {
        "asset": "btc",
        "weight": 1
      }
    ],
    "exchanges": [
      "crco",
      "gmni",
      "krkn",
      "lmax",
      "stmp"
    ],
    "percentages": [
      {
        "percentage": 1,
        "price": 71504.35309090909,
        "pairs": [
          {
            "pair": "btc-usd",
            "weight": 1,
            "instruments": [
              {
                "partition": "0",
                "price": 71494,
                "volume": 0.19981715,
                "count": "12",
                "underlyingTrade": {
                  "volume": 0.04441,
                  "exchange": "crco",
                  "id": "1773590109095301942",
                  "datetime": "2026-03-15T15:55:09.095Z"
                }
              },
              {
                "partition": "1",
                "price": 71499.01,
                "volume": 0.9988525499999997,
                "count": "59",
                "underlyingTrade": {
                  "volume": 0.03,
                  "exchange": "crco",
                  "id": "1773590139013290780",
                  "datetime": "2026-03-15T15:55:39.013Z"
                }
              },
              {
                "partition": "2",
                "price": 71521.99,
                "volume": 7.455164940000001,
                "count": "85",
                "underlyingTrade": {
                  "volume": 0.06718,
                  "exchange": "crco",
                  "id": "1773590166944032527",
                  "datetime": "2026-03-15T15:56:06.944Z"
                }
              },
              {
                "partition": "3",
                "price": 71520.55,
                "volume": 0.65069622,
                "count": "38",
                "underlyingTrade": {
                  "volume": 0.07051,
                  "exchange": "crco",
                  "id": "1773590209541279735",
                  "datetime": "2026-03-15T15:56:49.541Z"
                }
              },
              {
                "partition": "6",
                "price": 71499,
                "volume": 0.33936496,
                "count": "51",
                "underlyingTrade": {
                  "volume": 0.03062718,
                  "exchange": "krkn",
                  "id": "97190194",
                  "datetime": "2026-03-15T15:58:23.269434Z"
                }
              },
              {
                "partition": "7",
                "price": 71485.44,
                "volume": 0.96415299,
                "count": "85",
                "underlyingTrade": {
                  "volume": 0.05482,
                  "exchange": "crco",
                  "id": "1773590318011259597",
                  "datetime": "2026-03-15T15:58:38.011Z"
                }
              },
              {
                "partition": "4",
                "price": 71520,
                "volume": 2.8886697400000005,
                "count": "85",
                "underlyingTrade": {
                  "volume": 0.1,
                  "exchange": "stmp",
                  "id": "547083599",
                  "datetime": "2026-03-15T15:57:29Z"
                }
              },
              {
                "partition": "8",
                "price": 71500.79,
                "volume": 0.88407981,
                "count": "50",
                "underlyingTrade": {
                  "volume": 0.03509,
                  "exchange": "crco",
                  "id": "1773590342864005707",
                  "datetime": "2026-03-15T15:59:02.864Z"
                }
              },
              {
                "partition": "9",
                "price": 71499.56,
                "volume": 0.57279782,
                "count": "43",
                "underlyingTrade": {
                  "volume": 0.06,
                  "exchange": "crco",
                  "id": "1773590373299603299",
                  "datetime": "2026-03-15T15:59:33.299Z"
                }
              },
              {
                "partition": "5",
                "price": 71520,
                "volume": 2.172445329999999,
                "count": "97",
                "underlyingTrade": {
                  "volume": 0.06991051,
                  "exchange": "stmp",
                  "id": "547083602",
                  "datetime": "2026-03-15T15:57:30.071Z"
                }
              }
            ]
          }
        ]
      }
    ],
    "tsEvent": "2026-03-15T16:00:00.806764411Z",
    "sequenceId": "d6rdf01r6s9c72s1gun0",
    "lastIngestTime": "2026-03-15T15:59:59.822071833Z",
    "lastAnomalyIngestTime": null,
    "fallbackInfo": {
      "fallbackUsed": false
    }
  }
}
```
