LogoLogo
  • Kaiko Knowledge Hub
  • GETTING STARTED
    • About Kaiko Indices
    • General information
      • API Key
      • Timestamps
      • Index codes
  • Benchmarks: Single-Asset Reference Rates
    • Subscribe
    • Reference data
    • Historical prices
    • FOREX conversion
    • Replication data
  • Benchmarks: Indices
    • Subscribe
  • Customized Indices
    • Valour - CDF Index
Powered by GitBook
On this page
  • What is this endpoint for?
  • Endpoints
  • Parameters
  • Fields
  • Request examples
  • Response Example

Was this helpful?

Export as PDF
  1. Customized Indices

Valour - CDF Index

PreviousSubscribe

Last updated 20 days ago

Was this helpful?

What is this endpoint for?

This endpoint is a customized index made specifically for Valour, a Kaiko Indices client. It's designed to serve as an underlying price feed for leveraged financial instruments. The price is calculated by measuring the performance of live futures contracts with a constant time to expiry to effectively reflect a price, mitigating the volatility caused by rollovers.

You can find out more about our Customized Indices .

Endpoints

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

Parameters

Parameter
Description
Examples

index_code

The Kaiko CDF Index tickers

KAIKO_CDF_BTCUSDT

See the methodology for a full list of tickers.

Requesting multiple tickers at the same time To configure multiple tickers in the same stream, provide the indexCode as a comma separated list eg KAIKO_CDF_BTCUSDT,KAIKO_CDF_ETHUSDT Alternatively, use a wildcard by entering a * and you'll receive all tickers you have as part of you Kaiko subscription.

Fields

Field
Description

commodity

The type of publication. Either real-time or fixings

indexCode

The ticker identifying the rate.

base

Base asset of futures

quote

Quote asset of futures

computedCdf

Price of CDF index

exchange

frontFuture

A nested object containing:

  • symbol

  • price

  • expiry

The timestamp of expiration of front future

  • timestamp

The timestamp of the price of front future. If price is 1-min VWAP, endTime of the calculation if price is from the last trade, the timestamp of the trade

  • weight

Applied weight to the price of front future

backFuture

A nested object containing:

  • symbol

  • price

  • expiry

The timestamp of expiration of back future

  • timestamp

The timestamp of the price of back future. If price is 1-min VWAP, endTime of the calculation if price is from the last trade, the timestamp of the trade

  • weight

Applied weight to the price of back future

constantDuration

Constant Duration

status

Status of the publication CDF_SUCCESS : Calculation succeeded

CDF_NO_FUTURE : Cannot find the relevant front or back future

CDF_NO_PRICE : Futures are available but prices are not available

rateQuoteConversion

A nested object containing:

  • index

  • value

Price of rateQuoteConversion / index

  • timestamp

Timestamp of rateQuoteConversion / index

interval_startTime

The start time for the interval.

interval_endTime

The end time for the interval.

tsEvent

The exact time of the publication.

Request examples

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

 # 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.constant_duration_indices_v1 import request_pb2 as pb_constant_duration_indices

def constant_duration_indices_v1_request(channel: grpc.Channel):
    try:
        with channel:
            stub = sdk_pb2_grpc.StreamConstantDurationIndicesServiceV1Stub(channel)

            responses = stub.Subscribe(pb_constant_duration_indices.StreamConstantDurationIndicesServiceRequestV1(
                index_code = "KAIKO_CDF_BTCUSDT"
            ))
            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)
    constant_duration_indices_v1_request(channel)

if __name__ == '__main__':
    logging.basicConfig()
    run()
# 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.constant_duration_indices_v1 import request_pb2 as pb_constant_duration_indices

def constant_duration_indices_v1_request(channel: grpc.Channel):
    try:
        # start of date configuration #
        start = Timestamp()
        start.FromDatetime(datetime.utcnow() - timedelta(days=2))
        end = Timestamp()
        end.FromDatetime(datetime.utcnow() - timedelta(days=1))
        # end of date configuration #
        
        stub = sdk_pb2_grpc.StreamConstantDurationIndicesServiceV1Stub(channel)

        responses = stub.Subscribe(pb_constant_duration_indices.StreamConstantDurationIndicesServiceRequestV1(
            index_code = "KAIKO_CDF_BTCUSDT",
            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)
    constant_duration_indices_v1_request(channel)

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

cURL requests are intended for testing purposes only.

curl -X POST "https://gateway-v0-http.kaiko.ovh/api/stream/constant_duration_indices_v1" -H "accept: application/json" -H "X-Api-Key: $KAIKO_API_KEY" -H "Content-Type: application/json" -d '{ "indexCode": "KAIKO_CDF_BTCUSDT", "interval": {"startTime": "2025-04-24T15:30:00.000Z", "endTime": "2025-04-24T15:31:00.000Z" } }'

Response Example

{
   "result":{
      "commodity":"SIC_REAL_TIME",
      "indexCode":"KAIKO_CDF_BTCUSDT",
      "composition":{
         "base":"btc",
         "quote":"usdt",
         "data":[
            {
               "computedCdf":95024.52103689784,
               "exchange":"binc",
               "frontFuture":{
                  "symbol":"btcusdt_250627",
                  "price":94481.42295081966,
                  "expiry":"2025-06-27T08:00:00Z",
                  "timestamp":"2025-04-25T09:31:00Z",
                  "weight":0.6813186813186813
               },
               "backFuture":{
                  "symbol":"btcusdt_250926",
                  "price":96096.2,
                  "expiry":"2025-09-26T08:00:00Z",
                  "timestamp":"2025-04-25T09:29:41.131Z",
                  "weight":0.31868131868131866
               },
               "constantDuration":91,
               "status":"CDF_SUCCESS",
               "rateQuoteConversion":{
                  "index":"KK_RFR_USDTUSD",
                  "value":1.0003,
                  "timestamp":"2025-04-25T09:31:00Z"
               }
            }
         ]
      },
      "startTime":"2025-04-25T09:30:00Z",
      "endTime":"2025-04-25T09:31:00Z",
      "tsEvent":"2025-04-25T09:31:05.247126935Z"
   }
}

The exchange code for underlying futures trade. Please find for a full name of exchange.

Instrument code of front future. Please find for detailed information.

1-min VWAP of front future (Relevant doc of VWAP can be found .) If it's not available, last traded price

Instrument code of back future. Please find for detailed information.

1-min VWAP of back future (Relevant doc of VWAP can be found .) If it's not available, last traded price

Kaiko Reference Rate that is used to convert the currency. Detailed methodology of Kaiko Reference rate can be found

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

here
here
instrument explorer
instrument explorer
here
instrument explorer
here
here