curl --request GET \
--url https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/history"
response = requests.get(url)
print(response.text)false[
{
"timestamp": "2023-11-07T05:31:56Z",
"depositReserve": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"borrowReserve": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"rewardToken": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"rewardApy": "0.123"
}
]{
"error": "Invalid query request",
"details": [
{
"code": "invalid_union",
"errors": [
[
{
"code": "custom",
"path": [],
"message": "Invalid date string"
}
],
[
{
"expected": "number",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected number, received string"
}
]
],
"path": [
"start"
],
"message": "Invalid input"
}
]
}{
"error": "An internal error occurred"
}Get KLend reward history
Fetches historical KLend reward metrics for a specific deposit and borrow reserve pair
curl --request GET \
--url https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/klend/{depositReservePubkey}/{borrowReservePubkey}/rewards/history"
response = requests.get(url)
print(response.text)false[
{
"timestamp": "2023-11-07T05:31:56Z",
"depositReserve": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"borrowReserve": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"rewardToken": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"rewardApy": "0.123"
}
]{
"error": "Invalid query request",
"details": [
{
"code": "invalid_union",
"errors": [
[
{
"code": "custom",
"path": [],
"message": "Invalid date string"
}
],
[
{
"expected": "number",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected number, received string"
}
]
],
"path": [
"start"
],
"message": "Invalid input"
}
]
}{
"error": "An internal error occurred"
}Path Parameters
Deposit reserve public key
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Borrow reserve public key
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Query Parameters
Date input (ISO 8601 string or epoch in ms)
"2024-01-01T00:00:00.000Z"
Date input (ISO 8601 string or epoch in ms)
"2024-01-01T00:00:00.000Z"
Frequency of historical data aggregation
hour, day "hour"
"day"
Response
OK
Timestamp of the data point
Deposit reserve public key, if applicable
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Borrow reserve public key, if applicable
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Mint address of the reward token
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Annual Percentage Yield from rewards at this point in time
"0.123"