> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://coingecko.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://coingecko.ferndocs.com/_mcp/server.

# CoinGecko CLI

> A high-performance terminal interface for real-time & historical crypto data, built in Go.

![](https://mintcdn.com/coingecko/2wLa35TPQIr07ei5/images/Screenshot2026-03-06at11.32.40PM.png?fit=max\&auto=format\&n=2wLa35TPQIr07ei5\&q=85\&s=992d3bb122c95866a4bdc7018a458ee2)

> **Warning**
>
> CoinGecko CLI is currently in Beta. We're constantly improving, and your feedback is crucial. \
> Please share your feedback via this [form](https://forms.gle/VgpVbwsSJLgE7D8Q7), or submit a [PR](https://github.com/coingecko/coingecko-cli/pulls).

The **CoinGecko CLI** is a fast, full-featured terminal interface designed for developers, data analysts, and AI Agents who prefer the command line over a browser. It bridges the gap between raw API access and local data workflows with interactive dashboards and machine-readable outputs.

## Get Started

#### Get API Key

Sign up for Demo (Free) or Pro (Paid) API key [here](https://www.coingecko.com/en/api/pricing), and retrieve the API Key in [Developer Dashboard](https://www.coingecko.com/en/developers/dashboard).

#### Install CoinGecko CLI

Visit the official [CoinGecko CLI GitHub](https://github.com/coingecko/coingecko-cli?tab=readme-ov-file#install) for full installation guides. It takes just 1-click, and less than a minute to complete the setup.

#### Use Commands

Refer [here](https://github.com/coingecko/coingecko-cli?tab=readme-ov-file#commands) for full list of commands and features.

---

## Features at a Glance

#### Interactive TUI

Full-screen terminal dashboard with live navigation and 7-day braille price charts.

#### Data Pipelines

Export market rankings and historical data directly to CSV or JSON.

#### Live Price Streaming

Stream real-time market data and stay ahead of the curve.

#### AI Agent-Friendly

Easily test and integrate with AI/LLM tools via CLI.

| Feature                          | What it does                                                                                 |
| -------------------------------- | -------------------------------------------------------------------------------------------- |
| 🎮 **Interactive TUI Dashboard** | High-fidelity terminal interface with live navigation and 7-day price charts.                |
| ⚡ **Real-Time Prices**           | Blazingly fast, type-safe API calls for the most current market valuations.                  |
| 📡 **Live WebSocket Streaming**  | Real-time price updates via `cg watch` with NDJSON output for piping.                        |
| 📅 **Deep Historical Data**      | Fetch precise data for specific dates, custom date ranges, or the past N days.               |
| 📥 **CSV Export Support**        | Export any market or history query directly to CSV for external analysis in Excel or Python. |
| 🏷️ **Category Smart**           | Filter by 500+ categories including AI, Layer-2, Tokenized Stocks, Gold, and Silver.         |
| 📊 **Unlimited Markets**         | Seamless pagination to fetch 1,000+ coins in a single command.                               |
| 🔥 **Trending Everything**       | Real-time tracking of Trending Coins, NFTs, and Categories.                                  |
| ⌨️ **JSON Output**               | Machine-readable `-o json` for scripting and pipelines.                                      |
| 🤖 **Agent/LLM Friendly**        | `--dry-run` mode and `cg commands` for tool integration.                                     |

\
![](https://mintcdn.com/coingecko/2wLa35TPQIr07ei5/images/Screenshot2026-03-06at11.27.04PM.png?fit=max\&auto=format\&n=2wLa35TPQIr07ei5\&q=85\&s=ece120ab311d044749b934e95319ccf3)\
![](https://mintcdn.com/coingecko/2wLa35TPQIr07ei5/images/Screenshot2026-03-06at11.28.44PM.png?fit=max\&auto=format\&n=2wLa35TPQIr07ei5\&q=85\&s=1bde63b518cb4fba6dc7d7759d2d1490)\
![](https://mintcdn.com/coingecko/T0h960qynVPtBI8e/images/Screenshot2026-03-06at11.29.50PM.png?fit=max\&auto=format\&n=T0h960qynVPtBI8e\&q=85\&s=23187f8a5de84c21b648f772fc6a1576)

---

## Common Use Cases

The CoinGecko CLI is designed to be versatile, supporting both high-speed developer workflows and complex reasoning tasks for AI agents.

#### Developers: Market Monitoring & Tooling

* **CI/CD Alerts**: Integrate the CLI into GitHub Actions or local cron jobs to monitor price thresholds using `-o json` and tools like `jq`.
* **Rapid Dataset Generation**: Fetch and export large market datasets (e.g. top 1000 coins) to CSV in seconds, bypassing the need for custom scripts.
* **Debugging & Tool Testing**: Use `--dry-run` to visualize the exact API parameters and URL being constructed before implementing them in production code.
* **Shell Integration**: Embed the CLI into your terminal prompt to see live metrics every time you open a session or run a command.

#### AI Agents: Data Retrieval & Reasoning

* **Function Calling**: Give your LLM the `cg` binary as a tool to resolve coin symbols via `cg search` and perform technical analysis on results
* **Automated Market Research**: Agents can identify "hot" sectors using `cg trending` and then drill down into specific performers using the `--category` filter.
* **Context Injection**: Provide your agent with fresh, machine-readable data via `-o json` to ensure reasoning is based on real-time market conditions rather than static training data.
* **Agent Discovery**: Use the `cg commands` utility to let an agent "self-document" its capabilities by reading the available sub-commands and metadata.

#### Analysts: Data Pipelines

* **Historical Snapshots**: Quickly generate historical CSV reports for specific dates or ranges to feed into Excel or Python dataframes.
* **Movers Analysis**: Track the biggest gainers and losers across different timeframes and pool sizes for deeper sentiment analysis.
* **Category Benchmarking**: Export raw data for specific sectors like "Layer-2" or "RWA" to compare performance metrics across an entire category.

## Demo vs. Pro API Key

|                     | Demo Key (Free)                                                                 | Pro Key (Paid)                                                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Rate Limit**      | 30 calls/minute                                                                 | >250 calls/minute Refer [Pricing page](https://www.coingecko.com/en/api/pricing) for full details                                                                                   |
| **Monthly Credit**  | 10,000 calls                                                                    | >100,000 calls Refer [Pricing page](https://www.coingecko.com/en/api/pricing) for full details                                                                                      |
| **Historical Data** | Past 1 year                                                                     | Basic plan: past 2 years Analyst plan & above: past 10+ years                                                                                                                       |
| **Features**        | TUI CSV Export Price, Markets, Category, Trending  *More features coming soon!* | TUI CSV Export Price, Markets, Category, Trending **WebSocket Streaming** (🔒 Analyst plan & above) **Top Gainers & Losers** (🔒 Analyst plan & above) *More features coming soon!* |