curl --request GET \
--url https://api.kamino.finance/v2/prices/{mint}/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/v2/prices/{mint}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/v2/prices/{mint}/history"
response = requests.get(url)
print(response.text)false{
"mint": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"frequency": "hour",
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"price": "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"
}
]
}{
"metadata": "Account could not be found"
}{
"error": "An internal error occurred"
}Get token USD price history
Returns one unrounded spot price in USD per bucket, preferring the most recently observed spot token ID throughout the request and filling its missing buckets from other spot IDs. Timestamps are bucket starts; gaps are possible. Start is inclusive and defaults to full history; end is exclusive and defaults to now.
curl --request GET \
--url https://api.kamino.finance/v2/prices/{mint}/historyconst options = {method: 'GET'};
fetch('https://api.kamino.finance/v2/prices/{mint}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/v2/prices/{mint}/history"
response = requests.get(url)
print(response.text)false{
"mint": "VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd",
"frequency": "hour",
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"price": "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"
}
]
}{
"metadata": "Account could not be found"
}{
"error": "An internal error occurred"
}Path Parameters
Valid base58-encoded address
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Query Parameters
Solana cluster environment
mainnet-beta, devnet, localnet "mainnet-beta"
Bucket frequency. Defaults to hour for a start-to-end range of at most 32 days, otherwise day.
hour, day 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
Token mint requested by the caller.
"VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd"
Bucket frequency. Defaults to hour for a start-to-end range of at most 32 days, otherwise day.
hour, day Spot prices ordered by bucket start, with one price per bucket. Gaps are possible.
Show child attributes
Show child attributes