curl --request GET \
--url https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/history"
response = requests.get(url)
print(response.text)false[
{
"createdOn": "2023-11-07T05:31:56Z",
"usdAmount": "1234.56789",
"interestEarnedUsd": "1234.56789",
"solAmount": "1234.56789",
"interestEarnedSol": "1234.56789"
}
]{
"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 wallet token earnings and growth history
Get total earn position value and interest earned per bucket across vaults and lending deposits for the requested obligation types. Lending obligations that owe debt now are left out with their whole history.
curl --request GET \
--url https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/v3/earn/users/{userPubkey}/tokens/{tokenMint}/metrics/history"
response = requests.get(url)
print(response.text)false[
{
"createdOn": "2023-11-07T05:31:56Z",
"usdAmount": "1234.56789",
"interestEarnedUsd": "1234.56789",
"solAmount": "1234.56789",
"interestEarnedSol": "1234.56789"
}
]{
"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
User wallet address
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Token mint address
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Query Parameters
Obligation types to include. Defaults to all seven types for compatibility. Earn products are Vanilla, Lending, and LendingFixedRate. Allowed values: Vanilla, Lending, LendingFixedRate, Multiply, MultiplyFixedRate, Leverage, LeverageFixedRate.
"Vanilla,Lending,LendingFixedRate"
Include private-credit vault positions, earnings, and activity alongside Earn vaults. Also accepts other truthy/falsy strings such as "1"/"0", "yes"/"no", "on"/"off".
true, false 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"
Response
OK
Bucket timestamp
Total position value in USD at this bucket
"1234.56789"
Interest earned in USD during this bucket
"1234.56789"
Total position value in SOL at this bucket, or null when no SOL price is available
"1234.56789"
Interest earned in SOL during this bucket, valued at the SOL price when it was earned
"1234.56789"