Coin Price by Token Addresses
curl --request GET \
--url https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id}"
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/simple/token_price/{id}', 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/simple/token_price/{id}",
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/simple/token_price/{id}"
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/simple/token_price/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id}")
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{
"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
"usd": 76721,
"usd_market_cap": 9008047197.715635,
"usd_24h_vol": 181232010.10689816,
"usd_24h_change": -1.6069562341774564,
"last_updated_at": 1779094527
}
}简易
Coin Price by Token Addresses
当你有代币地址而没有 CoinGecko id 时,按链上合约地址查询价格。
GET
https://api.aisa.one
/
apis
/
v1
/
coingecko
/
simple
/
token_price
/
{id}
Coin Price by Token Addresses
curl --request GET \
--url https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id}"
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/simple/token_price/{id}', 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/simple/token_price/{id}",
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/simple/token_price/{id}"
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/simple/token_price/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/coingecko/simple/token_price/{id}")
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{
"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
"usd": 76721,
"usd_market_cap": 9008047197.715635,
"usd_24h_vol": 181232010.10689816,
"usd_24h_change": -1.6069562341774564,
"last_updated_at": 1779094527
}
}以链上合约地址而非 CoinGecko id 为键的价格查询。
在你的 agent 里把这个端点跑起来 →
id 是资产所在链,contract_addresses 是逗号分隔的代币地址列表,vs_currencies 是计价货币。返回以小写合约地址为键的映射,其字段名由计价货币拼接而成——包含 usd,并在设置了对应的 include_market_cap、include_24hr_vol、include_24hr_change 和 include_last_updated_at 标志时额外返回 usd_market_cap、usd_24h_vol、usd_24h_change 和 last_updated_at。当你只有地址而没有 id 时使用它。如需该代币的完整档案,请使用 get_coingecko_token_data;如果你已经有 CoinGecko id,请使用 get_coingecko_simple_price。
第一次用? 把任意 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.
路径参数
Asset platform's ID.
*refers to /asset_platforms
查询参数
Token contract addresses, comma-separated if querying more than 1 token
Include 24-hour change percentage. Default: false
Include 24-hour trading volume. Default: false
Include last updated price time as a UNIX timestamp. Default: false
Include market capitalization. Default: false
Decimal places for currency price value
可用选项:
full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 Target currency of coins, comma-separated if querying more than 1 currency.
*refers to /simple/supported_vs_currencies
响应
Token prices
Show child attributes
Show child attributes