curl --request GET \
--url https://astreus.ai/api/v1/crypto/{id}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/crypto/{id}/prices"
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://astreus.ai/api/v1/crypto/{id}/prices', 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://astreus.ai/api/v1/crypto/{id}/prices",
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://astreus.ai/api/v1/crypto/{id}/prices"
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://astreus.ai/api/v1/crypto/{id}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/crypto/{id}/prices")
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{
"symbol": "BTC",
"bars": [
{
"t": 1790812800000,
"o": 83576.13460018387,
"h": 83576.13460018387,
"l": 83576.13460018387,
"c": 83576.13460018387,
"v": 35066512389.815475,
"adj": 83576.13460018387
},
{
"t": 1790899200000,
"o": 84841.66634358242,
"h": 84841.66634358242,
"l": 84841.66634358242,
"c": 84841.66634358242,
"v": 33100807361.305866,
"adj": 84841.66634358242
}
],
"displayFrom": 1790812800000,
"currency": "USD",
"range": "1M",
"rangeFrom": "2026-10-01",
"lookbackBars": 0,
"coverageFrom": "2025-10-28"
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Crypto price history
Daily USD closes from CoinGecko snapshots, from the first day of range to the latest. Open, high and low repeat the close; these are close-only bars. History starts where the CoinGecko backfill did (about 365 days before the section launched on 2026-10-28), so 2Y, 5Y and ALL start there: coverageFrom is the first day held and note says so. lookback adds earlier bars for moving averages; displayFrom is the epoch ms of the first bar inside the range. An unknown coin is a 404. Preserve source attribution.
curl --request GET \
--url https://astreus.ai/api/v1/crypto/{id}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/crypto/{id}/prices"
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://astreus.ai/api/v1/crypto/{id}/prices', 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://astreus.ai/api/v1/crypto/{id}/prices",
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://astreus.ai/api/v1/crypto/{id}/prices"
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://astreus.ai/api/v1/crypto/{id}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/crypto/{id}/prices")
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{
"symbol": "BTC",
"bars": [
{
"t": 1790812800000,
"o": 83576.13460018387,
"h": 83576.13460018387,
"l": 83576.13460018387,
"c": 83576.13460018387,
"v": 35066512389.815475,
"adj": 83576.13460018387
},
{
"t": 1790899200000,
"o": 84841.66634358242,
"h": 84841.66634358242,
"l": 84841.66634358242,
"c": 84841.66634358242,
"v": 33100807361.305866,
"adj": 84841.66634358242
}
],
"displayFrom": 1790812800000,
"currency": "USD",
"range": "1M",
"rangeFrom": "2026-10-01",
"lookbackBars": 0,
"coverageFrom": "2025-10-28"
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Authorizations
Astreus API key (pk_live_...), created on the Developers page in the terminal. Also accepted as Authorization: Bearer pk_live_....
Path Parameters
CoinGecko coin ID.
Query Parameters
Window of bars served: from the range's first day to the latest bar.
1M, 3M, 6M, YTD, 1Y, 2Y, 5Y, ALL Bars to add before the range's first day (e.g. 200 for a 200-day moving average). Default 0.
0 <= x <= 1000