Get lifetime earnings of KVault users
curl --request POST \
--url https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings \
--header 'Content-Type: application/json' \
--data '
{
"owners": [
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({owners: ['VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd']})
};
fetch('https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings"
payload = { "owners": ["VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)false{
"vault": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"tokenMint": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"asOf": "2025-03-01T12:00:00.000Z",
"tokenPrice": "1234.56789",
"tokensPerShare": "1234.56789",
"owners": [
{
"owner": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"lifetimeEarned": "1234.56789",
"lifetimeEarnedUsd": "1234.56789",
"deposited": "1234.56789",
"withdrawn": "1234.56789",
"currentShares": "1234.56789",
"currentAmount": "1234.56789",
"reconciled": true
}
]
}{
"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": "Not authorized for this request. Please include the basic auth headers."
}{
"metadata": "Account could not be found"
}{
"error": "An internal error occurred"
}{
"error": "<string>"
}Kamino Earn Vaults
Get lifetime earnings of KVault users
Get the lifetime earnings of up to 100 wallets in one Kamino Earn Vault, across every position each wallet opened and closed. Earnings are tokens withdrawn minus tokens deposited plus the value of the open position, net of vault fees and withdrawal penalties, so they can be negative. Every value is measured at the latest vault snapshot (asOf), taken every 15 minutes; deposits and withdrawals after it are not counted yet. Wallets without vault activity return zeros. Returns 503 when the vault has no snapshot from the last 24 hours. Private (authorized) API access only, please add a basic auth header to your request.
POST
/
kvaults
/
vaults
/
{pubkey}
/
users
/
lifetime-earnings
Get lifetime earnings of KVault users
curl --request POST \
--url https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings \
--header 'Content-Type: application/json' \
--data '
{
"owners": [
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({owners: ['VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd']})
};
fetch('https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/kvaults/vaults/{pubkey}/users/lifetime-earnings"
payload = { "owners": ["VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)false{
"vault": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"tokenMint": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"asOf": "2025-03-01T12:00:00.000Z",
"tokenPrice": "1234.56789",
"tokensPerShare": "1234.56789",
"owners": [
{
"owner": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"lifetimeEarned": "1234.56789",
"lifetimeEarnedUsd": "1234.56789",
"deposited": "1234.56789",
"withdrawn": "1234.56789",
"currentShares": "1234.56789",
"currentAmount": "1234.56789",
"reconciled": true
}
]
}{
"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": "Not authorized for this request. Please include the basic auth headers."
}{
"metadata": "Account could not be found"
}{
"error": "An internal error occurred"
}{
"error": "<string>"
}Path Parameters
Body
application/json
Response
OK