Coin Historical Chart Data within Time Range by ID
curl --request GET \
--url https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range', 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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prices": [
[
1779027899041,
77953.82550382407
],
[
1779028199661,
78052.87543398788
]
],
"market_caps": [
[
1779027899041,
1560631481361.8042
],
[
1779028199661,
1562027330524.267
]
],
"total_volumes": [
[
1779027899041,
18688431751.857048
],
[
1779028199661,
18974828816.446976
]
]
}历史数据
Coin Historical Chart Data within Time Range by ID
返回单个币种在两个明确时间戳之间的历史序列——注意入参为秒、出参为毫秒。
GET
https://api.aisa.one
/
apis
/
v1
/
coingecko
/
coins
/
{id}
/
market_chart
/
range
Coin Historical Chart Data within Time Range by ID
curl --request GET \
--url https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range', 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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prices": [
[
1779027899041,
77953.82550382407
],
[
1779028199661,
78052.87543398788
]
],
"market_caps": [
[
1779027899041,
1560631481361.8042
],
[
1779028199661,
1562027330524.267
]
],
"total_volumes": [
[
1779027899041,
18688431751.857048
],
[
1779028199661,
18974828816.446976
]
]
}返回单个币种在两个明确时间点之间的历史序列。
在你的 agent 里把这个端点跑起来 →
from 和 to 为 Unix 秒级时间戳,而响应内部的时间戳单位为毫秒——两者单位不同,这是结果为空或错位的常见原因。返回 prices、market_caps 和 total_volumes,均为「时间戳,数值」二元组;CoinGecko 会根据窗口长度自动选择粒度。适合用于把序列对齐到某个已知事件窗口。如需截至当前的回溯窗口,get_coingecko_coins_id_market_chart 改用 days 天数参数。
第一次用? 把任意 MCP 客户端指向
https://mcp.aisa.one/mcp —— Claude Code、
Codex、Cursor、VS Code 都可以。鉴权走 OAuth:客户端打开浏览器,你点一次
Allow,不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
aisa.one/zh-cn/mcp。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
Coin ID.
*refers to /coins/list.
查询参数
Starting date in ISO date string (YYYY-MM-DD or YYYY-MM-DDTHH:MM) or UNIX timestamp.
Use ISO date string for best compatibility.
Data interval, leave empty for auto granularity.
可用选项:
1m, 5m, hourly, daily Decimal place for currency price value.
可用选项:
full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 Ending date in ISO date string (YYYY-MM-DD or YYYY-MM-DDTHH:MM) or UNIX timestamp.
Use ISO date string for best compatibility.
Target currency of market data.
*refers to /simple/supported_vs_currencies.