Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

coingecko-apicoingecko API 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

332

周安装

33

GitHub Stars

16

下载量

261
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:coingecko-api(coingecko API 搜索)
来源仓库:https://github.com/agiprolabs/claude-trading-skills
仓库路径:skills/coingecko-api
安装命令:
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill coingecko-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill coingecko-api

简介

coingecko-api 查询 CoinGecko 市场数据,覆盖价格、成交量、趋势币种等信息。

  • 免费层无需 API 密钥,支持每分钟 30 次调用,适合宏观分析与跨交易所比较。
  • 可用于历史 OHLCV 数据获取、分类资产对比及全球统计指标查询。
  • 适用于发现热门代币、监控市场情绪或构建投资组合参考基准。
  • 建议优先使用官方文档提供的端点,避免自行拼接 URL 导致错误。

SKILL.md

CoinGecko API Skill

Query the CoinGecko API for comprehensive crypto market data — prices, historical charts, exchange volumes, trending tokens, global stats, and category breakdowns. The free tier requires no API key and supports 30 calls/min.

When to Use This Skill

  • Macro analysis: Global market cap, BTC dominance, total volume trends
  • Historical data: Daily/hourly OHLCV going back years (not minutes-level)
  • Cross-exchange comparisons: Exchange volume rankings and trust scores
  • Trending/discovery: What tokens are trending on CoinGecko in the last 24h
  • Category analysis: Compare DeFi vs L1 vs meme coin market caps
  • Token research: Full metadata including links, description, community stats

Use Birdeye or DexScreener instead for real-time Solana DEX data, new token launches, or sub-daily granularity on Solana tokens.

Quick Start

Get Current Prices

import httpx

# No API key needed for free tier
resp = httpx.get(
    "https://api.coingecko.com/api/v3/simple/price",
    params={"ids": "solana,bitcoin,ethereum", "vs_currencies": "usd",
            "include_24hr_change": "true"},
)
data = resp.json()
for coin, info in data.items():
    print(f"{coin}: ${info['usd']:.2f} ({info['usd_24h_change']:+.1f}%)")

Get Top Coins by Market Cap

import httpx

resp = httpx.get(
    "https://api.coingecko.com/api/v3/coins/markets",
    params={"vs_currency": "usd", "order": "market_cap_desc",
            "per_page": 10, "page": 1, "sparkline": "false"},
)
for coin in resp.json():
    print(f"{coin['symbol'].upper():>6}  ${coin['current_price']:>10,.2f}  "
          f"MCap: ${coin['market_cap']/1e9:.1f}B  "
          f"24h: {coin['price_change_percentage_24h']:+.1f}%")

Get Historical Price Data

import httpx
import pandas as pd

resp = httpx.get(
    "https://api.coingecko.com/api/v3/coins/solana/market_chart",
    params={"vs_currency": "usd", "days": "90", "interval": "daily"},
)
data = resp.json()
df = pd.DataFrame(data["prices"], columns=["timestamp", "price"])
df["date"] = pd.to_datetime(df["timestamp"], unit="ms")
df = df.set_index("date").drop(columns=["timestamp"])
print(df.describe())

Get OHLC Candle Data

import httpx

resp = httpx.get(
    "https://api.coingecko.com/api/v3/coins/solana/ohlc",
    params={"vs_currency": "usd", "days": "30"},
)
# Returns [[timestamp, open, high, low, close], ...]
candles = resp.json()
for c in candles[-5:]:
    print(f"  O={c[1]:.2f}  H={c[2]:.2f}  L={c[3]:.2f}  C={c[4]:.2f}")

Global Market Stats

import httpx

resp = httpx.get("https://api.coingecko.com/api/v3/global")
g = resp.json()["data"]
print(f"Total Market Cap:  ${g['total_market_cap']['usd']/1e12:.2f}T")
print(f"24h Volume:        ${g['total_volume']['usd']/1e9:.0f}B")
print(f"BTC Dominance:     {g['market_cap_percentage']['btc']:.1f}%")
print(f"Active Coins:      {g['active_cryptocurrencies']:,}")

Trending Coins

import httpx

resp = httpx.get("https://api.coingecko.com/api/v3/search/trending")
for item in resp.json()["coins"]:
    coin = item["item"]
    print(f"#{coin['market_cap_rank'] or '?':>4}  {coin['name']} ({coin['symbol']})")

Authentication

The free tier requires no API key (30 calls/min). For higher limits, get a Pro key from https://www.coingecko.com/en/api/pricing and set:

export COINGECKO_API_KEY="CG-xxxxxxxxxxxxxxxxxxxx"

Pro requests use a different base URL and header:

import os, httpx

API_KEY = os.getenv("COINGECKO_API_KEY", "")
if API_KEY:
    BASE_URL = "https://pro-api.coingecko.com/api/v3"
    HEADERS = {"x-cg-pro-api-key": API_KEY}
else:
    BASE_URL = "https://api.coingecko.com/api/v3"
    HEADERS = {}

Rate Limiting

Free tier: 30 requests/min. Implement backoff on 429 responses:

import time, httpx

def cg_get(url: str, params: dict, max_retries: int = 3) -> dict:
    """GET with retry on rate limit."""
    for attempt in range(max_retries):
        resp = httpx.get(url, params=params, headers=HEADERS, timeout=15.0)
        if resp.status_code == 429:
            wait = 2 ** attempt * 10
            print(f"Rate limited, waiting {wait}s...")
            time.sleep(wait)
            continue
        resp.raise_for_status()
        return resp.json()
    raise RuntimeError("Max retries exceeded")

Finding CoinGecko Token IDs

CoinGecko uses slug-style IDs (e.g., solana, bitcoin, usd-coin). To find an ID from a contract address or name, see references/id_mapping.md.

Quick lookup by contract address (useful for Solana tokens):

import httpx

# Look up by Solana contract address
contract = "So11111111111111111111111111111111111111112"
resp = httpx.get(
    "https://api.coingecko.com/api/v3/coins/solana/contract/"
    + contract
)
coin = resp.json()
print(f"ID: {coin['id']}, Name: {coin['name']}")

Key Limitations

  • No real-time data: Prices update every 1-2 minutes on free tier
  • Limited Solana coverage: Many newer Solana tokens are not listed
  • OHLC granularity: Only 1/7/14/30/90/180/365 day windows, candle size depends on the window (see references/endpoints.md)
  • Historical gaps: Some tokens have missing data for early periods
  • Free tier throttling: 30 req/min means batch operations need careful pacing

See references/data_quality.md for detailed notes on data gaps and tier differences.

Files

References

  • references/endpoints.md — Complete endpoint reference with parameters, response schemas, and rate limits
  • references/id_mapping.md — How to find CoinGecko IDs for tokens, contract address mapping, search tips
  • references/data_quality.md — Data quality notes, historical gaps, free vs pro tier differences

Scripts

  • scripts/fetch_market_data.py — Fetch top coins, trending tokens, and global stats (supports --demo mode)
  • scripts/historical_analysis.py — Fetch historical OHLCV data and compute returns, volatility, drawdown (supports --demo mode)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.28%
按下载量换算87

Claude

31.59%
按下载量换算82

Cursor

17.92%
按下载量换算47

Gemini CLI

8.01%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills