Returns historical price data for a specific coin at regular intervals. Use this for price charts and historical analysis.
From spec: Get historical price data for a coin. Returns timestamped price points for charting.
Usage Tips
- Valid timePeriod values: 1h, 3h, 12h, 24h, 7d, 30d, 3m, 1y, 5y
- Returns timestamped price points
- Each point represents a 5-minute interval for shorter periods
- Data points are evenly distributed across the requested time period
Parameters (3)
referenceCurrencyUuid(string, query, optional)
timePeriod(string, query, optional, default: 24h)
Time period for price history. Free tier limited to max 1y.
import zingu_apis
api = zingu_apis.api("coinranking")
result = api.fetch("coin/{uuid}/price-history", timePeriod="24h")
for item in result:
print(item)
const resp = await fetch("https://api.coinranking.com/v2/coin/Qwsogvtv82FCd/price-history?timePeriod=24h");
const data = await resp.json();