> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CoinGecko for Google Sheets

> Pull live prices, historical data, NFT floors, and onchain data into Google Sheets with the =COINGECKO() function

<Frame>
  <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-hero.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=a5502c7388329a905f20a678f23c108c" width="1230" height="800" data-path="assets/images/gsheets-hero.png" />
</Frame>

<Note>
  This official add-on follows the principle of least privilege — it only accesses the sheet you currently have open. It does **not** request access to Google Drive or other spreadsheets.
</Note>

## Quick Start

<Steps>
  <Step title="Install">
    Visit [CoinGecko for Sheets](https://workspace.google.com/marketplace/app/coingecko_for_sheets_live_crypto_prices/429190203358) on Google Workspace Marketplace and click **Install**.
  </Step>

  <Step title="Authorize">
    Check **Select all** to grant the required permissions.

    <Frame>
      <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-authorize.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=567a62d6995971aafadfcedbafebbde4" style={{ maxWidth: '400px' }} width="2044" height="1820" data-path="assets/images/gsheets-authorize.png" />
    </Frame>

    The add-on needs these permissions to communicate with the CoinGecko API and write data to your sheet. CoinGecko does **NOT** have access to your email or personal data.
  </Step>

  <Step title="Set API key">
    Go to **Extensions** > **CoinGecko** > **Settings & API Key**.

    <Frame>
      <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-extensions-menu.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=608e42f11721ef285a46920f5b89826b" width="2654" height="1306" data-path="assets/images/gsheets-extensions-menu.png" />
    </Frame>

    Enter your [CoinGecko API key](https://www.coingecko.com/en/api/pricing), select your plan (Demo or Pro), and click **Save Settings**.
  </Step>
</Steps>

## Using `=COINGECKO()`

A single "Smart Routing" function that auto-detects whether you're querying a ticker, coin ID, onchain token, or NFT.

### Latest Price

| Syntax                          | Description                                                                                                                                                                         | Example                            |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `=COINGECKO("SYMBOL")`          | **Price by ticker symbol.**<br /><br />If multiple coins share the symbol, the largest by market cap is returned.<br /><br />Falls back to GeckoTerminal if not found on CoinGecko. | `=COINGECKO("BTC")`                |
| `=COINGECKO("name:NAME")`       | **Price by coin name.**<br /><br />Prioritizes CoinGecko-listed tokens.                                                                                                             | `=COINGECKO("name:Ethereum")`      |
| `=COINGECKO("id:COIN_ID")`      | **Price by [coin ID](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0).**<br /><br />Most reliable — avoids ticker conflicts.   | `=COINGECKO("id:solana")`          |
| `=COINGECKO("NETWORK:ADDRESS")` | **Onchain DEX price by [network ID](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=1120233236#gid=1120233236) and token address.**    | `=COINGECKO("base:0x...")`         |
| `=COINGECKO("nft:NFT_ID")`      | **NFT floor price by [NFT ID](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=207968092#gid=207968092).**                              | `=COINGECKO("nft:pudgy-penguins")` |

<Tip>
  Use the **Coin ID** (e.g. `id:bitcoin-cash` instead of `BCH`) for the most reliable results — symbols can be shared by multiple tokens.
</Tip>

### Historical Price

| Syntax                                   | Description                                                                                                                                                                                  | Example                                  |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `=COINGECKO("id:COIN_ID", "YYYY-MM-DD")` | **Historical price at a specific date** (daily 00:00 UTC).<br /><br />View [coin IDs](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0). | `=COINGECKO("id:bitcoin", "2025-12-31")` |

### Top Market Cap Rankings

<Frame>
  <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-top-mcap.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=4d079235907ddb2d855a3d91e34ac1c6" width="1230" height="800" data-path="assets/images/gsheets-top-mcap.png" />
</Frame>

Get up to 1,000 tokens with a single formula:

| Syntax                            | Description                                                                                                                                                          | Example                           |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `=COINGECKO("top:N")`             | **Top N coins by market cap.**                                                                                                                                       | `=COINGECKO("top:100")`           |
| `=COINGECKO("top:N:CATEGORY_ID")` | **Top N coins by market cap in a [category](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=214581757#gid=214581757).** | `=COINGECKO("top:10:meme-token")` |

<Frame caption="Output Example">
  <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-top-mcap-output.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=5d8b5f9ec9510ad8ad86e0666324690a" width="2862" height="1006" data-path="assets/images/gsheets-top-mcap-output.png" />
</Frame>

***

## Other Features

<Frame>
  <img src="https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/gsheets-sidebar.png?fit=max&auto=format&n=i9l2MT4etZGYjSx8&q=85&s=223ebb3e620d8c0890ffb6d440b656e4" width="1230" height="800" data-path="assets/images/gsheets-sidebar.png" />
</Frame>

### Bulk Refresh

Google Sheets caches formulas for 1–2 hours. To force-update all `=COINGECKO` formulas:<br />
Open the CoinGecko Sidebar and click **Refresh All Data**.

### Error Debugging

Go to **Extensions** > **CoinGecko** > **View Error Logs**:<br />
Opens a log sheet with exact API error responses (e.g. `429: Rate Limit Exceeded`, `403: Invalid API Key`).

***

## FAQ

<Accordion title="Why is my formula showing #NAME?">
  Ensure the add-on is installed and "CoinGecko" appears under the Extensions menu. If it's missing, refresh your browser.
</Accordion>

<Accordion title="How do I find a Coin ID or NFT ID?">
  Use the [full ID list](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0), or find the "API ID" on the coin's [CoinGecko](https://www.coingecko.com) or [GeckoTerminal](https://www.geckoterminal.com) page.
</Accordion>

<Accordion title="Is my API key safe?">
  Yes. Your key is stored using Google's PropertiesService — encrypted and unique to your Google account. CoinGecko does not see or store your key.
</Accordion>

<Accordion title="Why does it need all these permissions?">
  * **View and manage spreadsheets** — to populate cells with data and create error log sheets.
  * **Connect to an external service** — to fetch prices from the CoinGecko API.
  * **Run when you are not present** — to keep formulas active without the sidebar open.
  * **Display third-party web content** — to render the sidebar UI.

  We recommend checking **Select all** during authorization. Unchecking any permission may cause errors.
</Accordion>

<Accordion title="What is the privacy policy?">
  View the full [privacy policy](/docs/google-sheet-privacy-policy).
</Accordion>

***

<Card title="Share Feedback" icon="comment" href="https://forms.gle/Ndm7qRC3QVE4YYhB7">
  Have questions or feedback? Let us know.
</Card>
