> 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 for Microsoft Excel (Official)

> The CoinGecko Official Excel Add-in brings the world's most comprehensive crypto data directly into your spreadsheet workflow — live prices, historical data, NFT floor prices, on-chain token prices, and market cap rankings, all refreshable with a single click.

![Coin Gecko For Excel 1 – 1366 X 768 2](https://mintcdn.com/coingecko/wbgsV6iJoz8KuwY_/images/CoinGecko-for-Excel-1-%E2%80%93-1366-x-768-2.png?fit=max\&auto=format\&n=wbgsV6iJoz8KuwY_\&q=85\&s=bdd122e79021e2a91eb946bed4123fd1)

> **Check**
>
> Your privacy is our priority. The add-in only communicates with the CoinGecko API using your saved API key. No personal data is sent to any third party.
>
> If you have any questions or feedback, please share with us [**here**](https://forms.gle/Ndm7qRC3QVE4YYhB7).

---

## 1. Quick Start

#### Install the Add-in

Search for '**CoinGecko**' and Install directly from the Excel Add-ins store, or visit the [Microsoft Marketplace](https://marketplace.microsoft.com/en-us/product/office/WA200010662).

![Screenshot 2026 04 29 At 12 22 33 PM 1](https://mintcdn.com/coingecko/2PxBJfCoivqbzO0q/images/Screenshot-2026-04-29-at-12.22.33-PM-1.png?fit=max\&auto=format\&n=2PxBJfCoivqbzO0q\&q=85\&s=e80e0a99dfddefbc0fdb5d9d4812002c)

#### Open the Taskpane

Go to **Home → CoinGecko** in the Excel ribbon to open the taskpane sidebar.

#### Set Your API Key

Enter your [CoinGecko API key](https://www.coingecko.com/en/api/pricing), then click **Save Settings**. A green status dot confirms a valid connection.

![Screenshot 2026 04 29 At 12 26 44 PM](https://mintcdn.com/coingecko/2PxBJfCoivqbzO0q/images/Screenshot-2026-04-29-at-12.26.44-PM.png?fit=max\&auto=format\&n=2PxBJfCoivqbzO0q\&q=85\&s=b0d8775e4a911874d5ac52f22e010641)

---

## 2. Formulas

All formulas use the `CG` namespace. Enter them in any cell like a standard Excel formula.

> **Tip**
>
> **Pro Tip:**
>
> * Use the **Coin ID** (e.g., `bitcoin`, `ethereum`) rather than the ticker symbol for the most reliable results.
> * You can find the coin API ID in the URL on CoinGecko, i.e. [coingecko.com/en/coins/bitcoin](https://www.coingecko.com/en/coins/bitcoin)
> * You can also get the full list via this [endpoint](/api-reference/api-reference/coins/list/get-new) or [Google Sheet](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0).

---

### `=CG.PRICE(id)`

Returns the **current USD price** of a coin.

| Parameter | Type   | Description                                                                                                                                                                        |
| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`      | string | CoinGecko coin ID (e.g. `"bitcoin"`, `"ethereum"`) View full [**Coin IDs**](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0). |

**Returns:** Number — current price in USD

```text theme={null}
=CG.PRICE("bitcoin")        → 95000
=CG.PRICE("ethereum")       → 3400
=CG.PRICE("solana")         → 180
```

---

### `=CG.HISTORY(id, date)`

Returns the **historical USD price** of a coin on a specific date.

| Parameter | Type   | Description                                                                                                                                                                        |
| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`      | string | CoinGecko coin ID (e.g. `"bitcoin"`, `"ethereum"`) View full [**Coin IDs**](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0). |
| `date`    | string | Date in `YYYY-MM-DD` format                                                                                                                                                        |

**Returns:** Number — USD price on that date

```text theme={null}
=CG.HISTORY("bitcoin", "2023-12-31")     → 16541.77
=CG.HISTORY("ethereum", "2021-12-31")    → 3682.45
```

> **Note**
>
> Date must be in `YYYY-MM-DD` format. Example: February 1, 2023 = `"2023-02-01"`

---

### `=CG.NFT(id)`

Returns the **current floor price (USD)** of an NFT collection.

| Parameter | Type   | Description                                                                                                                                                                                                |
| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`      | string | CoinGecko NFT collection ID (e.g. `"bored-ape-yacht-club"`) View full [**NFT IDs**](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=207968092#gid=207968092). |

**Returns:** Number — floor price in USD

```text theme={null}
=CG.NFT("bored-ape-yacht-club")    → 24500
=CG.NFT("cryptopunks")             → 68000
=CG.NFT("pudgy-penguins")          → 8200
```

---

### `=CG.ONCHAIN(network, address)`

Returns the **current USD price of an on-chain token** by its network and contract address.

| Parameter | Type   | Description                                                                                                                                                                                                |
| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `network` | string | Network ID (e.g. `"eth"`, `"bsc"`, `"solana"`) Get full [**Onchain network IDs**](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=1120233236#gid=1120233236). |
| `address` | string | Token contract address                                                                                                                                                                                     |

**Returns:** Number — token price in USD

```text theme={null}
=CG.ONCHAIN("eth", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48")
=CG.ONCHAIN("bsc", "0x55d398326f99059ff775485246999027b3197955")
```

**Common network IDs:**

| Network         | ID         |
| :-------------- | :--------- |
| Ethereum        | `eth`      |
| BNB Smart Chain | `bsc`      |
| Solana          | `solana`   |
| Arbitrum        | `arbitrum` |
| Base            | `base`     |

---

### `=CG.TOP(limit, [category])`

Returns a **ranked table of top coins by market cap**.

![Screenshot 2026 04 24 At 4 31 50 PM](https://mintcdn.com/coingecko/wbgsV6iJoz8KuwY_/images/Screenshot-2026-04-24-at-4.31.50-PM.png?fit=max\&auto=format\&n=wbgsV6iJoz8KuwY_\&q=85\&s=23bb05c5c46bd764eb00eaa339bf6fd0)

| Parameter  | Type                | Description                             |
| :--------- | :------------------ | :-------------------------------------- |
| `limit`    | number              | Number of coins to return (1-10000)     |
| `category` | string *(optional)* | CoinGecko category ID to filter results |

```text theme={null}
=CG.TOP(10)                            → Top 10 coins by market cap
=CG.TOP(100)                           → Top 100 coins by market cap
=CG.TOP(50, "decentralized-exchange")  → Top 50 DEX tokens
=CG.TOP(20, "layer-1")                 → Top 20 Layer-1 coins
```

> **Note**
>
> Enter `=CG.TOP(...)` in a **single cell** and let the results spill automatically into adjacent rows and columns. Do not pre-select a range.

> **Tip**
>
> **Tip:**
>
> * Find category IDs by browsing the [CoinGecko categories page](https://www.coingecko.com/en/categories) and copying the ID from the URL.
> * You can also get the full list via this [endpoint](/api-reference/api-reference/coins/categories/get-list) or [Google Sheet](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=214581757#gid=214581757).

---

## 3. Taskpane Actions

#### Refresh All Data 🔄

Clears the in-memory cache and forces all `=CG.*` formulas in the workbook to recalculate with fresh data from the API.

#### Save 💾

Saves your API key and plan selection. Automatically validates the key against the API and clears the cache.

![Coin Gecko For Excel 2 – 1366 X 768 1](https://mintcdn.com/coingecko/wbgsV6iJoz8KuwY_/images/CoinGecko-for-Excel-2-%E2%80%93-1366-x-768-1.png?fit=max\&auto=format\&n=wbgsV6iJoz8KuwY_\&q=85\&s=7430e0306ee9c7a535b382659c227d7e)

---

## 4. Troubleshooting & FAQ

**Why is my formula showing #NAME??**

* Ensure the add-in is installed and loaded. The `CG` namespace is only available when the add-in is active.

**How do I find a Coin ID or NFT ID?**

* You can get the full list of supported CoinGecko API IDs [**here**](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0), or visit [**CoinGecko.com**](https://www.coingecko.com) - the Coin ID can also be found in the "API ID" section on the right sidebar of the coin or NFT's page.

**Why am I seeing Error: Invalid API Key?**

* Open the taskpane, re-enter your API key, and click **Save**.

**Why am I seeing Error: Rate Limit — wait and retry?**

* You have exceeded the API rate limit. Wait a moment, then click **Refresh All Data** in the taskpane.

**Why does =CG.HISTORY return no data?**

* Confirm the date is in `YYYY-MM-DD` format and that the coin existed on that date.

**Why does =CG.TOP only show one cell?**

* Make sure the cells below and to the right are empty so the array can spill. Excel requires free space for spill ranges.

**What is your privacy policy?**

* Please view the full details of our privacy policy [**here**](https://docs.coingecko.com/docs/excel/privacy-policy).

**How do I share feedback?**

* Please share feedback with us [**here**](https://forms.gle/Ndm7qRC3QVE4YYhB7).