curl --request GET \
--url 'https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin",
CURLOPT_RETURNTRANSFER => true,
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"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin"
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.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/coins/charts")
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[
{
"coinId": "bitcoin",
"chart": [
[
1438905600,
2.83162,
0.0101411,
1
],
[
1438992000,
2.7976,
0.0100039,
1
],
[
1439078400,
2.8091,
0.0102231,
1
]
],
"errorMessage": "ERR_COIN_CHART_NOT_FOUND"
}
]{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Get Coins Charts
Get historical chart data for multiple cryptocurrencies
curl --request GET \
--url 'https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin",
CURLOPT_RETURNTRANSFER => true,
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"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin"
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.coinstats.app/v1/coins/charts?period=24h&coinIds=bitcoin,ethereum,dogecoin")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/coins/charts")
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[
{
"coinId": "bitcoin",
"chart": [
[
1438905600,
2.83162,
0.0101411,
1
],
[
1438992000,
2.7976,
0.0100039,
1
],
[
1439078400,
2.8091,
0.0102231,
1
]
],
"errorMessage": "ERR_COIN_CHART_NOT_FOUND"
}
]{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Multipliers
Multipliers
You will get
You will get
- Historical price data
- Values in USD, BTC, ETH
Required
Required
- coinIds: Comma-separated list of coin identifiers. At least one is required.
- period: Time range for the chart data.
Optional
Optional
- currency: Display currency (defaults to USD).
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Query Parameters
Time period for the chart data.
all, 24h, 1w, 1m, 3m, 6m, 1y "24h"
Comma-separated list of coin identifiers to fetch chart data for
"bitcoin,ethereum,dogecoin"
Currency for chart values. Default is USD.
"USD"
Response
Get Historical global avg price charts for multiple coins.
Unique identifier of the cryptocurrency
"bitcoin"
Array of historical price data points. Each data point is an array containing:
- TIMESTAMP - Unix timestamp in seconds
- USD - Price in USD
- BTC - Price in Bitcoin
- ETH - Price in Ethereum
[ [1438905600, 2.83162, 0.0101411, 1], [1438992000, 2.7976, 0.0100039, 1], [1439078400, 2.8091, 0.0102231, 1] ]
Error message if data fetching failed for this specific coin. This allows partial success responses where some coins data is available while others failed.
"ERR_COIN_CHART_NOT_FOUND"
Was this page helpful?