Price & Volume Chart
curl --request GET \
--url https://api.cryptorank.io/v3/currencies/{id}/sparkline \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.cryptorank.io/v3/currencies/{id}/sparkline"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.cryptorank.io/v3/currencies/{id}/sparkline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptorank.io/v3/currencies/{id}/sparkline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cryptorank.io/v3/currencies/{id}/sparkline"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cryptorank.io/v3/currencies/{id}/sparkline")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cryptorank.io/v3/currencies/{id}/sparkline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"price": "65000.5",
"time": 1715000000000,
"volume": "28000000000"
}
],
"status": {
"timestamp": 1780000000000,
"usedCredits": 1
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"status": 400
}
}{
"error": {
"code": "API_KEY_MISSING",
"message": "API key is missing",
"status": 401
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found",
"status": 403
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"status": 429
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"status": 500
}
}Currencies
Price & Volume Chart
Returns data points for a coin’s price and volume chart.
Available from: Basic
Cost: 1 credit per request
GET
/
v3
/
currencies
/
{id}
/
sparkline
Price & Volume Chart
curl --request GET \
--url https://api.cryptorank.io/v3/currencies/{id}/sparkline \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.cryptorank.io/v3/currencies/{id}/sparkline"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.cryptorank.io/v3/currencies/{id}/sparkline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptorank.io/v3/currencies/{id}/sparkline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cryptorank.io/v3/currencies/{id}/sparkline"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cryptorank.io/v3/currencies/{id}/sparkline")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cryptorank.io/v3/currencies/{id}/sparkline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"price": "65000.5",
"time": 1715000000000,
"volume": "28000000000"
}
],
"status": {
"timestamp": 1780000000000,
"usedCredits": 1
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"status": 400
}
}{
"error": {
"code": "API_KEY_MISSING",
"message": "API key is missing",
"status": 401
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found",
"status": 403
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"status": 429
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"status": 500
}
}Depth and granularity depend on the plan:
Basic — up to 30d at 5m/15m/1h, up to 1y at 1d;
Advanced — up to 30d at 5m/15m/1h, up to 2y at 1d;
Pro — up to 90d at 5m/15m/1h, up to 5y at 1d;
Business — up to 1y at 5m/15m/1h, full history at 1d.
With no parameters, returns the last 7 days at 1h.
Authorizations
Path Parameters
Coin ID. See: GET /v3/currencies/map.
Example:
1
Query Parameters
Window start. Defaults to 7d before to. Accepted: ISO 8601, bare date (YYYY-MM-DD), or Unix timestamp in seconds/milliseconds.
Window end. Defaults to now. Accepted: ISO 8601, bare date (YYYY-MM-DD), or Unix timestamp in seconds/milliseconds. Bare dates resolve to end-of-day UTC.
Step between points. Depth allowed per interval depends on your plan.
Available options:
5m, 15m, 1h, 1d Order by time.
Available options:
asc, desc