Agent skill

Coingecko API

by agiprolabs in agiprolabs/claude-trading-skills

Broad crypto market data from CoinGecko covering 13,000+ tokens.

MITAuto-check passedBusiness, Finance & HR

Install Coingecko API

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill coingecko-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills coingecko-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/coingecko-api .claude/skills/coingecko-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
coingecko-api
GitHub stars
410
Token cost
~1.6k tokens
SKILL.md length
347 words
Files
6 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Broad crypto market data from CoinGecko covering 13,000+ tokens.

  • Tasks that involve Stock and market analysis
  • SKILL.md covers When to Use This Skill, Quick Start, Authentication and Rate Limiting, plus 3 more sections
  • Runs Python scripts from its folder; reaches api.coingecko.com and pro-api.coingecko.com; needs API_KEY and COINGECKO_API_KEY

What it does

Coingecko API is an agent skill from agiprolabs/claude-trading-skills. Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/data_quality.md`, `references/endpoints.md` and `references/id_mapping.md`).

It sits in Business, Finance & HR, covering Stock and market analysis. It works with Solana. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve Stock and market analysis

Example prompts

  • “/coingecko-api”

Requirements

  • Python 3
  • A credential in COINGECKO_API_KEY
  • A credential in API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.coingecko.com
    • pro-api.coingecko.com

    Also links to:

    • coingecko.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY
    • COINGECKO_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Coingecko API loads about 1.6k tokens when it runs, and up to ~6.1k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 347 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 347 words, ~1,615 tokens.

Download SKILL.mdSave it as .claude/skills/coingecko-api/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
coingecko-api
description
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
dependencies
httpx, pandas, numpy
tags
api, market-data, crypto, historical, macro

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
python
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
python
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
python
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
python
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
python
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']:,}")
python
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:

bash
export COINGECKO_API_KEY="CG-xxxxxxxxxxxxxxxxxxxx"

Pro requests use a different base URL and header:

python
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:

python
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):

python
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)

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/coingecko-api of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/data_quality.md
  • references/endpoints.md
  • references/id_mapping.md
  • scripts/fetch_market_data.py
  • scripts/historical_analysis.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Coingecko API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Coingecko API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Coingecko API this skillagiprolabs/claude-trading-skills410—~1.6kAutomated safety check: PassMIT
Emblemai Crypto Walletsickn33/agentic-awesome-skills47k2 repos~669Automated safety check: PassMIT
Binance Token InfoTermiX-official/cryptoclaw100—~767Automated safety check: PassMIT
Onchainsundial-org/awesome-openclaw-skills663—~2.2kAutomated safety check: PassNone
Alpaca CLIalpacahq/cli177—~2.6kAutomated safety check: PassApache-2.0
YfinanceSilvioBaratto/optimizer176—~4kAutomated safety check: NotesCustom licence

Similar skills

  • Emblemai Crypto Wallet

    sickn33/agentic-awesome-skills

    Crypto wallet management across 7 blockchains via EmblemAI Agent Hustle API.

    47k GitHub starsUsed in 2 repos~669 tokens
    Business, Finance & HRAuto-check passed
  • Binance Token Info

    TermiX-official/cryptoclaw

    Binance Web3 official skill — search tokens, retrieve metadata, real-time market data, and candlestick charts across BSC, Base, and Solana.

    100 GitHub stars~767 tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Onchain

    sundial-org/awesome-openclaw-skills

    CLI for crypto portfolio tracking, market data, CEX history, and transaction lookups.

    663 GitHub stars~2.2k tokensUpdated 7 mo ago
    Business, Finance & HRAuto-check passed
  • Alpaca CLI

    alpacahq/cli

    Install, configure, and use the Alpaca CLI - a command-line tool for the Alpaca Trading API.

    177 GitHub stars~2.6k tokensUpdated 6 days ago
    Business, Finance & HRAuto-check passed
  • Yfinance

    SilvioBaratto/optimizer

    Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…

    176 GitHub stars~4k tokensUpdated yesterday
    Business, Finance & HRAuto-check: notes
  • Miniqmt CLI

    oopslink/trading-skills

    Operate miniQMT/xtquant via the miniqmt-cli tool -- market data queries, real-time streaming, account management, order placement with safety guards, daemon health checks, SSH tunnel management, and…

    176 GitHub stars~8.2k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Cost Basis Engine

    agiprolabs/claude-trading-skills

    Multi-method cost basis computation including specific identification, FIFO, LIFO, HIFO, and proportional average cost with partial sell handling

    410 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Coingecko API

What does Coingecko API do?

Broad crypto market data from CoinGecko covering 13,000+ tokens. Coingecko API is an agent skill from agiprolabs/claude-trading-skills. Broad crypto market data from CoinGecko covering 13,000+ tokens.

When should I use Coingecko API?

Coingecko API fits situations like: tasks that involve Stock and market analysis.

How do I install Coingecko API in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill coingecko-api -a claude-code`. Or copy the skill folder (skills/coingecko-api in agiprolabs/claude-trading-skills) into .claude/skills/coingecko-api in your project. Claude Code loads it when a task matches its description.

How do I install Coingecko API in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill coingecko-api -a codex`. Or copy the skill folder (skills/coingecko-api in agiprolabs/claude-trading-skills) into .agents/skills/coingecko-api in your project. Codex loads it when a task matches its description.

Can I use Coingecko API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill coingecko-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/coingecko-api, .gemini/skills/coingecko-api, .github/skills/coingecko-api and .opencode/skills/coingecko-api in your project.

What does Coingecko API need to run?

Going by SKILL.md and its folder, Coingecko API needs Python for the scripts in its folder and credentials named API_KEY and COINGECKO_API_KEY. Our summary lists: Python 3; A credential in COINGECKO_API_KEY; A credential in API_KEY.

Does Coingecko API access the network?

SKILL.md names 3 domains. In commands or code: api.coingecko.com and pro-api.coingecko.com; the agent is likely to contact these when it follows the instructions. As links in the text: coingecko.com. This is read from the text; nothing was executed.

Is Coingecko API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Coingecko API use?

Coingecko API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Coingecko API use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.5k tokens, read only when the agent opens those files.

What are the alternatives to Coingecko API?

Skills that share tags, products or a category with Coingecko API: Emblemai Crypto Wallet (sickn33/agentic-awesome-skills, 47k stars), Binance Token Info (TermiX-official/cryptoclaw, 100 stars), Onchain (sundial-org/awesome-openclaw-skills, 663 stars) and Alpaca CLI (alpacahq/cli, 177 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Coingecko API?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.