Staking rates
Last updated
Was this helpful?
Was this helpful?
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://us.market-api.kaiko.io/v2/data/staking.v1/protocols/solana?start_date=20261001'import http.client
import json
# Enter your Kaiko API Key
api_key = "KAIKO_API_KEY"
api_host = "us.market-api.kaiko.io"
api_base_endpoint = "/v2/data/staking.v1/protocols/solana"
# Start of mandatory parameter configuration
mandatory_params = {
}
# End of mandatory parameter configuration
# Start of optional parameter configuration
optional_params = {
'start_date':'20251001',
'page_size':100,
'sort':'desc',
'methodology':'epoch_aggregate_v1'
}
# End of optional parameter configuration
conn = http.client.HTTPSConnection(api_host)
headers = {
"X-Api-Key": api_key,
"Accept": "application/json"
}
all_params = {**mandatory_params, **optional_params}
url_params = []
for param, value in all_params.items():
url_params.append(f"{param}={value}")
url_params = '&'.join(url_params)
endpoint_with_params = f"{api_base_endpoint}?{url_params}"
# Pagination for next pages
all_data = []
next_url = endpoint_with_params
while next_url:
conn.request("GET", next_url, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode("utf-8"))
all_data.extend(data.get("data", []))
print(f"Fetched {len(data.get('data', []))} datapoints. Total: {len(all_data)}")
next_url = data.get("next_url", "").replace("https://us.market-api.kaiko.io", "")
if not next_url:
break
conn.close()
print(f" datapoints fetched: {(all_data)}"){
"query":
{
"start_date": "20260101",
"end_date": "20260422",
"start_time": "2026-01-01T00:00:00Z",
"end_time": "2026-04-22T00:00:00Z",
"sort": "descending",
"page_size": "10",
"methodology": "epoch_aggregate_v1"
},
"time": "2026-04-22T14:46:38.274392363Z",
"timestamp": 1776869198,
"data":
[
{
"date": "2026-04-21",
"protocol": "solana",
"apr": 4.758636113435191,
"validators": 777,
"methodology": "epoch_aggregate_v1"
},
/** Results **/
],
"continuation_token": "xxx",
"next_url": "https://eu.market-api.kaiko.io/v2/data/staking.v1/protocols/solana?continuation_token=xxx"
}