Ae · Coingecko · Simple · Price
0.50积分/次
ae_coingecko_simple_price
通过币种 ID、符号或名称获取当前加密货币价格。
0.50积分/次
价格说明
0.50积分/次
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
cURL
curl --request POST \
--url 'https://api.agentearth.ai/v1/tools/run' \
--header 'Authorization: Bearer $AGENTEARTH_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"tool": "ae_coingecko_simple_price",
"input": {
"ids": "xxx",
"names": "xxx",
"symbols": "xxx",
"precision": "xxx",
"vs_currencies": "xxx",
"include_tokens": "xxx",
"include_24hr_vol": "xxx",
"include_market_cap": "xxx",
"include_24hr_change": "xxx",
"include_last_updated_at": "xxx"
}
}'- 请求方式
- POST
- 接口地址
- /v1/tools/run
- 鉴权方式
- Bearer Token
- 超时时间
- 60 秒
- 当前版本
- —
响应示例
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
ids | string | 否 | coins' IDs, comma-separated if querying more than 1 coin. *refers to [`/coins/list`](/reference/coins-list). | — |
names | string | 否 | coins' names, comma-separated if querying more than 1 coin. | — |
symbols | string | 否 | coins' symbols, comma-separated if querying more than 1 coin. | — |
precision | enum (full | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18) | 否 | decimal place for currency price value | — |
vs_currencies | string | 是 | 必填。只能传 CoinGecko 支持的法币/计价货币代码,必须来自 coingecko_simple_supported_currencies 或接口支持列表。禁止传中文、股票代码、自然语言或占位符。 查询价格时还需提供 ids、names 或 symbols 中至少一项。 | — |
include_tokens | enum (top | all) | 否 | for `symbols` lookups, specify `all` to include all matching tokens Default `top` returns top-ranked tokens (by market cap or volume) | — |
include_24hr_vol | boolean | 否 | include 24hr volume, default: false | — |
include_market_cap | boolean | 否 | include market capitalization, default: false | — |
include_24hr_change | boolean | 否 | include 24hr change percentage, default: false | — |
include_last_updated_at | boolean | 否 | include last updated price time in UNIX, default: false | — |
