# CoinGecko Crypto Market Data (`mranderson323/coingecko-crypto-market-data`) Actor

Fetches live and historical cryptocurrency data from CoinGecko. Top coins, trending, portfolio prices, market overview. No API key needed. Perfect for scheduling.

- **URL**: https://apify.com/mranderson323/coingecko-crypto-market-data.md
- **Developed by:** [Jeff](https://apify.com/mranderson323) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## CoinGecko Crypto Market Data

Fetch live and historical cryptocurrency data from [CoinGecko](https://coingecko.com) — the most comprehensive free crypto data API. No API key required. Runs reliably on a schedule for price monitoring, portfolio tracking, and market alerts.

### What it does

- **Top coins** — live prices, market caps, 24h/7d % changes, volume, supply, ATH for the top N coins by market cap
- **Trending** — the 7 coins trending on CoinGecko in the last 24 hours, with full market data
- **Specific coins** — exact coin IDs you choose (bitcoin, ethereum, solana, etc.)
- **Market overview** — global totals: total market cap, 24h volume, BTC/ETH dominance %, active coins
- **Price history** — daily OHLCV (open/high/low/close) for any coin, up to 365 days back
- **Social stats** — GitHub stars/forks, Twitter followers, Reddit subscribers (optional)

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `top_coins` | `top_coins`, `trending`, `specific_coins`, or `market_overview` |
| `coinIds` | array | `["bitcoin","ethereum","solana"]` | Coin IDs for `specific_coins` mode |
| `topN` | integer | `100` | How many top coins to return (max 250) |
| `currency` | string | `usd` | Quote currency: `usd`, `eur`, `gbp`, `btc`, `eth`, etc. |
| `includeHistory` | boolean | `false` | Fetch daily OHLCV price history |
| `historyDays` | integer | `30` | Days of history per coin (1–365) |
| `includeSocialStats` | boolean | `false` | Add GitHub, Twitter, Reddit stats per coin |

### Output

Each coin record:

```json
{
  "id": "bitcoin",
  "recordType": "coin",
  "symbol": "BTC",
  "name": "Bitcoin",
  "rank": 1,
  "price": 67420.15,
  "priceChange24h": 1205.80,
  "priceChangePct24h": 1.82,
  "priceChangePct7d": -3.41,
  "marketCap": 1328456789012,
  "volume24h": 24567890123,
  "circulatingSupply": 19700000,
  "totalSupply": 21000000,
  "ath": 73738.0,
  "athDate": "2024-03-14T07:10:36.635Z",
  "athChangePct": -8.59,
  "currency": "usd",
  "fetchedAt": "2026-06-19T10:00:00.000Z"
}
```

History record (when `includeHistory: true`):

```json
{
  "id": "bitcoin-1718755200000",
  "recordType": "history_point",
  "coinId": "bitcoin",
  "symbol": "BTC",
  "timestamp": "2026-06-19T00:00:00.000Z",
  "open": 66800.0,
  "high": 67900.0,
  "low": 66200.0,
  "close": 67420.0,
  "currency": "usd"
}
```

### Pricing

- **$0.002 per coin** (live data record)
- **$0.001 per history point** (when `includeHistory: true`)

| Run | Cost |
|---|---|
| Top 100 coins, live prices | $0.20 |
| Top 100 coins + 30 days history | $3.20 |
| Trending 7 coins | $0.014 |
| Market overview | $0.002 |

### Use cases

- **Portfolio tracker** — schedule hourly to keep a spreadsheet or dashboard current
- **Price alert system** — run every 15 minutes, pipe into n8n/Make to trigger alerts when a coin crosses a threshold
- **AI trading signal feed** — feed into an LLM agent for market commentary or trading decisions
- **DeFi dashboard** — display live top 50 prices on a custom UI
- **Research & analytics** — download 1-year OHLCV history for backtesting strategies
- **Market sentiment** — track trending coins daily to spot emerging narratives early

### Scheduling tip

Set up a scheduled run in Apify Console → Schedules. Common patterns:

- Every 15 minutes: `*/15 * * * *` (trending + specific watchlist)
- Daily at 09:00 UTC: `0 9 * * *` (top 100 + history)
- First of each month: `0 0 1 * *` (full market snapshot)

### Why CoinGecko?

CoinGecko's free API has been stable and publicly accessible since 2014. It covers 13,000+ coins across 900+ exchanges, updated every ~60 seconds. No API key required for the free tier (used by this actor). All data is sourced directly from the official CoinGecko API — no scraping, no brittle selectors, no proxies needed.

# Actor input Schema

## `mode` (type: `string`):

What data to fetch. top\_coins = top N by market cap. trending = coins trending in last 24h. specific\_coins = exact coin IDs you provide. market\_overview = global market summary only.

## `coinIds` (type: `array`):

CoinGecko coin IDs to fetch. E.g. \["bitcoin", "ethereum", "solana", "cardano"]. Only used when mode=specific\_coins.

## `topN` (type: `integer`):

How many top coins by market cap to return. Max 250.

## `currency` (type: `string`):

Currency for prices and market caps. E.g. usd, eur, gbp, jpy, btc, eth.

## `includeHistory` (type: `boolean`):

If true, fetches daily OHLCV history for each coin. Set historyDays to control range.

## `historyDays` (type: `integer`):

Number of days of price history to fetch per coin (when includeHistory is true). Max 365.

## `includeSocialStats` (type: `boolean`):

Adds GitHub stars, forks, Twitter followers, Reddit subscribers for each coin. Adds one API call per coin.

## Actor input object example

```json
{
  "mode": "top_coins",
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "topN": 100,
  "currency": "usd",
  "includeHistory": false,
  "historyDays": 30,
  "includeSocialStats": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("mranderson323/coingecko-crypto-market-data").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("mranderson323/coingecko-crypto-market-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call mranderson323/coingecko-crypto-market-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mranderson323/coingecko-crypto-market-data",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/g9Hvw9DIa6jVii0La/builds/syvmt5tXcDARIT9CC/openapi.json
