curl --request GET \
--url https://test.deribit.com/api/v2/public/get_basket_index_composition \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "public/get_basket_index_composition",
"params": {
"index_name": "COIN50"
}
}
'import requests
url = "https://test.deribit.com/api/v2/public/get_basket_index_composition"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "public/get_basket_index_composition",
"params": { "index_name": "COIN50" }
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'public/get_basket_index_composition',
params: {index_name: 'COIN50'}
})
};
fetch('https://test.deribit.com/api/v2/public/get_basket_index_composition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/public/get_basket_index_composition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'public/get_basket_index_composition',
'params' => [
'index_name' => 'COIN50'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_basket_index_composition"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/public/get_basket_index_composition")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_basket_index_composition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"product_id": "COIN50",
"divisor": "3935813421.91702",
"timestamp": "2024-11-11T14:47:26Z",
"inception_timestamp": "2020-12-31T00:00:00Z",
"last_rebalance": "2024-08-30T00:00:00Z",
"constituents": [
{
"symbol": "BTC-USD",
"name": "Bitcoin",
"rank": 1,
"cap_factor": "0.456192678887042",
"amount": "19745468",
"market_cap": "1625637364529.9463",
"index_market_cap": "741603864223.787",
"weight": "0.5130230783794717",
"running_weight": "0.5130230783794717"
},
{
"symbol": "ETH-USD",
"name": "Ethereum",
"rank": 2,
"cap_factor": "1",
"amount": "120390000",
"market_cap": "396812441178.12",
"index_market_cap": "396812441178.12",
"weight": "0.2745124011023314",
"running_weight": "0.7875354794818031"
},
{
"symbol": "SOL-USD",
"name": "Solana",
"rank": 3,
"cap_factor": "1",
"amount": "467810000",
"market_cap": "82144117812.45",
"index_market_cap": "82144117812.45",
"weight": "0.0568124011023314",
"running_weight": "0.8443478805841345"
}
]
}
}public/get_basket_index_composition
Retrieves the latest composition of a basket index, including constituents, weights, cap factors, and the index divisor. The composition object is returned as received from the index composition service; Deribit does not remap field names or types.
The index_name parameter is case-insensitive. Only basket indexes listed on Deribit are accepted; currently this is COIN50. Other Coinbase baskets such as AI10 or TECH100 are rejected. An unknown or missing index_name returns invalid_params.
curl --request GET \
--url https://test.deribit.com/api/v2/public/get_basket_index_composition \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "public/get_basket_index_composition",
"params": {
"index_name": "COIN50"
}
}
'import requests
url = "https://test.deribit.com/api/v2/public/get_basket_index_composition"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "public/get_basket_index_composition",
"params": { "index_name": "COIN50" }
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'public/get_basket_index_composition',
params: {index_name: 'COIN50'}
})
};
fetch('https://test.deribit.com/api/v2/public/get_basket_index_composition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/public/get_basket_index_composition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'public/get_basket_index_composition',
'params' => [
'index_name' => 'COIN50'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_basket_index_composition"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/public/get_basket_index_composition")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_basket_index_composition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"public/get_basket_index_composition\",\n \"params\": {\n \"index_name\": \"COIN50\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"product_id": "COIN50",
"divisor": "3935813421.91702",
"timestamp": "2024-11-11T14:47:26Z",
"inception_timestamp": "2020-12-31T00:00:00Z",
"last_rebalance": "2024-08-30T00:00:00Z",
"constituents": [
{
"symbol": "BTC-USD",
"name": "Bitcoin",
"rank": 1,
"cap_factor": "0.456192678887042",
"amount": "19745468",
"market_cap": "1625637364529.9463",
"index_market_cap": "741603864223.787",
"weight": "0.5130230783794717",
"running_weight": "0.5130230783794717"
},
{
"symbol": "ETH-USD",
"name": "Ethereum",
"rank": 2,
"cap_factor": "1",
"amount": "120390000",
"market_cap": "396812441178.12",
"index_market_cap": "396812441178.12",
"weight": "0.2745124011023314",
"running_weight": "0.7875354794818031"
},
{
"symbol": "SOL-USD",
"name": "Solana",
"rank": 3,
"cap_factor": "1",
"amount": "467810000",
"market_cap": "82144117812.45",
"index_market_cap": "82144117812.45",
"weight": "0.0568124011023314",
"running_weight": "0.8443478805841345"
}
]
}
}Query Parameters
Basket index identifier. Case-insensitive. Currently COIN50 is the only supported value.
Basket index identifier (case-insensitive). Currently only COIN50 is supported.
"COIN50"
Response
Success response
The JSON-RPC version (2.0)
2.0 Latest basket composition, forwarded as received from the index composition service. Deribit does not remap field names or types. Typical fields from the former INTX composition endpoint are listed below; additional properties may be present.
Hide child attributes
Hide child attributes
Basket index identifier
"COIN50"
Index divisor used to scale the basket market cap into the published index level
"3935813421.91702"
Snapshot timestamp of this composition (RFC 3339)
"2024-11-11T14:47:26Z"
Timestamp when this index was first created (RFC 3339)
"2020-12-31T00:00:00Z"
Timestamp of the last index rebalance (RFC 3339)
"2024-08-30T00:00:00Z"
Ordered set of index constituents
Hide child attributes
Hide child attributes
Constituent asset pair symbol
"BTC-USD"
Constituent name
"Bitcoin"
Constituent rank order in the index
1
Constituent market-cap factor (multiplier) applied for capping
"0.456192678887042"
Constituent amount outstanding
"19745468"
Constituent total market cap
"1625637364529.9463"
Constituent market cap represented in the index after capping
"741603864223.787"
Weight of the constituent in the index
"0.5130230783794717"
Cumulative weight of this constituent and all higher-ranked constituents
"0.5130230783794717"
The id that was sent in the request
Related topics
public/get_index_pricepublic/get_index_chart_datapublic/get_supported_index_namespublic/get_index_price_namespublic/get_volatility_index_dataWas this page helpful?