Get historical HBAR price data (minutely)
curl --request GET \
--url https://api.saucerswap.finance/stats/hbarHistoricalPrices \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.saucerswap.finance/stats/hbarHistoricalPrices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.saucerswap.finance/stats/hbarHistoricalPrices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"priceUsd": 0.04830379666666667,
"timestampSeconds": 1697599980
}
]Stats
REST API: Historical HBAR prices
Query minutely historical HBAR prices in USD between two unix-second timestamps, for charting, backtesting, and converting tinybar values to dollars.
GET
/
stats
/
hbarHistoricalPrices
Get historical HBAR price data (minutely)
curl --request GET \
--url https://api.saucerswap.finance/stats/hbarHistoricalPrices \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.saucerswap.finance/stats/hbarHistoricalPrices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.saucerswap.finance/stats/hbarHistoricalPrices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"priceUsd": 0.04830379666666667,
"timestampSeconds": 1697599980
}
]Authorizations
API key provisioned by the SaucerSwap team. Request one from [email protected] and send it in the x-api-key header with every request.
Headers
API key for authentication. Request a key from [email protected].
Example:
"YOUR_API_KEY"
Query Parameters
From unix seconds
Example:
1697600000
To unix seconds
Example:
1697610000
Was this page helpful?