# Staking Indices

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

This endpoint is used for staking indices, which are custom products whose value is derived from a combination of price data and yield data. The underlying quantity increases daily according to the APR of the asset, and the index value is obtained by multiplying the quantity by the asset price.

## 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/staking_rates_v1
```

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

## Parameters

<table><thead><tr><th width="184">Parameter</th><th width="272.23828125">Description</th><th>Examples</th></tr></thead><tbody><tr><td><code>index_code</code></td><td>The ticker of the staking rate</td><td><code>KAIKO_STK_ETHUSD_LDNLF</code></td></tr></tbody></table>

## Fields

<table><thead><tr><th width="296.20184326171875">Field</th><th width="425.2421875">Description</th></tr></thead><tbody><tr><td><code>indexCode</code></td><td>The ticker identifying the staking index.</td></tr><tr><td><code>commodity</code></td><td>The publication type.</td></tr><tr><td><code>interval</code></td><td>A nested object containing the requested time interval.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>startTime</code></mark></li></ul></td><td>The start time of the interval.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>endTime</code></mark></li></ul></td><td>The end time of the interval.</td></tr><tr><td><code>composition</code></td><td>A nested object containing the inputs used to calculate the index price.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>quantity</code></mark></li></ul></td><td>A nested object containing the quantity inputs.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>value</code></mark></li></ul></td><td>The quantity used in the index calculation.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>baseQuantity</code></mark></li></ul></td><td>The base quantity used to derive <code>quantity.value</code>.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>utilizationRate</code></mark></li></ul></td><td>The utilization rate used in the quantity calculation.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>underlyingPrice</code></mark></li></ul></td><td>A nested object containing the underlying price input.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>name</code></mark></li></ul></td><td>The name of the price series used as the underlying price.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>price</code></mark></li></ul></td><td>The underlying asset price used in the calculation.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>tsEvent</code></mark></li></ul></td><td>The publication timestamp of the underlying price.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>apr</code></mark></li></ul></td><td>A nested object containing the APR input.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>name</code></mark></li></ul></td><td>The name of the APR series used in the calculation.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>value</code></mark></li></ul></td><td>The APR value used in the calculation.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>forwardFilled</code></mark></li></ul></td><td>Indicates whether the APR value was forward-filled.</td></tr><tr><td><ul><li><mark style="color:blue;"><code>tsEvent</code></mark></li></ul></td><td>The publication timestamp of the APR value.</td></tr><tr><td><code>price</code></td><td>The calculated staking index price.</td></tr><tr><td><code>tsEvent</code></td><td>The exact time of the publication.</td></tr></tbody></table>

## Request examples

{% tabs %}
{% tab title="Python" %}
**Make sure to read our** [**Python quick-start guide**](broken://pages/vCciDqbvlaVg9L8IGTOq) **before starting.**

{% code overflow="wrap" %}

```python
 # This is a code example. Configure your parameters below #

from __future__ import print_function

import logging
import os

import grpc

from google.protobuf.json_format import MessageToJson

from kaikosdk import sdk_pb2_grpc
from kaikosdk.stream.staking_rates_v1 import request_pb2 as pb_staking_rates


def staking_rates_v1_request(channel: grpc.Channel):
    try:
        with channel:
            stub = sdk_pb2_grpc.StreamStakingRatesServiceV1Stub(channel)

            responses = stub.Subscribe(pb_staking_rates.StreamStakingRatesServiceRequestV1(
                index_code="KK_STK_ETHUSD_LDNLF"
            ))

            for response in responses:
                print("Received message %s" % (MessageToJson(response, including_default_value_fields=True)))

    except grpc.RpcError as e:
        print(e.details(), e.code())


def run():
    credentials = grpc.ssl_channel_credentials(root_certificates=None)
    call_credentials = grpc.access_token_call_credentials(os.environ['KAIKO_API_KEY'])
    composite_credentials = grpc.composite_channel_credentials(credentials, call_credentials)
    channel = grpc.secure_channel('gateway-v0-grpc.kaiko.ovh', composite_credentials)

    staking_rates_v1_request(channel)


if __name__ == '__main__':
    logging.basicConfig()
    run()
```

{% endcode %}
{% endtab %}

{% tab title="Python (Replay)" %}

```python
# This is a code example. Configure your parameters below #

from __future__ import print_function

from datetime import datetime, timedelta
import logging
import os

from google.protobuf.timestamp_pb2 import Timestamp
import grpc

from google.protobuf.json_format import MessageToJson

from kaikosdk import sdk_pb2_grpc
from kaikosdk.stream.staking_rates_v1 import request_pb2 as pb_staking_rates


def staking_rates_v1_request(channel: grpc.Channel):
    try:
        # start of date configuration #
        start = Timestamp()
        start.FromDatetime(datetime.utcnow() - timedelta(days=3))
        end = Timestamp()
        end.FromDatetime(datetime.utcnow())
        # end of date configuration #

        stub = sdk_pb2_grpc.StreamStakingRatesServiceV1Stub(channel)

        responses = stub.Subscribe(pb_staking_rates.StreamStakingRatesServiceRequestV1(
            index_code="KK_STK_ETHUSD_LDNLF",
            interval={
                'start_time': start,
                'end_time': end
            }
        ))

        for response in responses:
            print("Received message %s" % (MessageToJson(response, including_default_value_fields=True)))

    except grpc.RpcError as e:
        print(e.details(), e.code())


def run():
    credentials = grpc.ssl_channel_credentials(root_certificates=None)
    call_credentials = grpc.access_token_call_credentials(os.environ['KAIKO_API_KEY'])
    composite_credentials = grpc.composite_channel_credentials(credentials, call_credentials)
    channel = grpc.secure_channel('gateway-v0-grpc.kaiko.ovh', composite_credentials)

    staking_rates_v1_request(channel)


if __name__ == '__main__':
    logging.basicConfig()
    run()
```

{% endtab %}

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

{% code overflow="wrap" %}

```
curl -X POST "https://gateway-v0-http.kaiko.ovh/api/stream/staking_rates_v1" -H  "accept: application/json" -H  "X-Api-Key: $MARKET_DATA_API_KEY" -H  "Content-Type: application/json" -d '{  "indexCode": "KK_STK_ETHUSD_LDNLF", "interval": { "startTime": "2026-04-21T11:00:00Z", "endTime": "2026-04-24T22:00:00Z" } }'
```

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

## Response Example

```json
{
	"result": {
		"indexCode": "KK_STK_ETHUSD_LDNLF",
		"commodity": "SIC_DAILY_FIXING",
		"interval": {
			"startTime": "2026-04-22T14:00:00Z",
			"endTime": "2026-04-22T15:00:00Z"
		},
		"composition": {
			"quantity": {
				"value": 0.035460005259701076,
				"baseQuantity": 0.03544209350535485,
				"utilizationRate": 0.42
			},
			"underlyingPrice": {
				"name": "KK_RFR_ETHUSD_LDNLF",
				"price": 2405.6083636363633,
				"tsEvent": "2026-04-22T15:00:02.190418795Z"
			},
			"apr": {
				"name": "eth-apr-2-d",
				"value": 0.0276,
				"forwardFilled": true,
				"tsEvent": "2026-04-21T00:00:00Z"
			}
		},
		"price": 85.30288522732634,
		"tsEvent": "2026-04-22T15:00:05.029978898Z"
	}
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kaiko.com/kaiko-indices/customized-indices/staking-indices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
