Get historical junior tranche statistics
curl --request GET \
--url https://prod.api.reflect.money/tranches/junior/{id}/stats/historicalimport requests
url = "https://prod.api.reflect.money/tranches/junior/{id}/stats/historical"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod.api.reflect.money/tranches/junior/{id}/stats/historical', 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://prod.api.reflect.money/tranches/junior/{id}/stats/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://prod.api.reflect.money/tranches/junior/{id}/stats/historical"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.api.reflect.money/tranches/junior/{id}/stats/historical")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.reflect.money/tranches/junior/{id}/stats/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": "<string>",
"historicalData": [
{
"liquidity_pool_id": "<string>",
"lp_token_supply": "<string>",
"total_value_locked": "<string>",
"holders": 123,
"exchange_rate_usd": "<string>",
"exchange_rate_underlying": "<string>",
"coverage_ratio_bps": 123,
"apy_bps": 123,
"apy_bps_7d": 123,
"market_cap": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"message": "Invalid request data: depositAmount must be positive"
}Tranches - Junior
Get historical junior tranche statistics
Available on development API only.
Retrieve time-bucketed historical statistics for a junior tranche. Returns hourly data for periods ≤ 7 days, daily data otherwise.
GET
/
tranches
/
junior
/
{id}
/
stats
/
historical
Get historical junior tranche statistics
curl --request GET \
--url https://prod.api.reflect.money/tranches/junior/{id}/stats/historicalimport requests
url = "https://prod.api.reflect.money/tranches/junior/{id}/stats/historical"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod.api.reflect.money/tranches/junior/{id}/stats/historical', 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://prod.api.reflect.money/tranches/junior/{id}/stats/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://prod.api.reflect.money/tranches/junior/{id}/stats/historical"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.api.reflect.money/tranches/junior/{id}/stats/historical")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.reflect.money/tranches/junior/{id}/stats/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": "<string>",
"historicalData": [
{
"liquidity_pool_id": "<string>",
"lp_token_supply": "<string>",
"total_value_locked": "<string>",
"holders": 123,
"exchange_rate_usd": "<string>",
"exchange_rate_underlying": "<string>",
"coverage_ratio_bps": 123,
"apy_bps": 123,
"apy_bps_7d": 123,
"market_cap": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"message": "Invalid request data: depositAmount must be positive"
}Path Parameters
Junior tranche ID (PDA address)
Query Parameters
Period in days (default: 7)
Solana cluster (defaults to mainnet)
Available options:
mainnet, devnet ⌘I