> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/coingecko.md).

# CoinGecko

Get cryptocurrency market data from CoinGecko's Demo API.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector | Authentication |
| --------- | -------------- |
| CoinGecko | Demo API Key   |

#### CoinGecko

Connect to CoinGecko market data with a Demo API key.

**Set up in CoinGecko**

1. Prepare the CoinGecko account or service that the workflow will access. Grant access to the required resources and operations.
2. **Demo API Key:** Create a CoinGecko Demo API key in the Developer Dashboard.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **CoinGecko**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required | What to enter                                                                                                                                  |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Demo API Key  | Yes      | Create a CoinGecko Demo API key in the Developer Dashboard. [Provider instructions](https://docs.coingecko.com/demo/reference/authentication). |

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **CoinGecko** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Get Coin Price

Get the latest price and optional market details for a coin.

**Inputs**

| Field                     | Type            | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Coin ID                   | string          | Yes      | The exact CoinGecko coin ID from Search Coins, such as `bitcoin`, not a display name such as `Bitcoin`.                                                                                                                                                                                                                                                                                                                                          |
| Quote currency            | select (string) | Yes      | The CoinGecko quote currency code used to express the price, such as `usd`. Options load from the selected connection. Default: usd.                                                                                                                                                                                                                                                                                                             |
| Include market cap        | boolean         | No       | Include the coin's market capitalization in the quote currency. Default: true.                                                                                                                                                                                                                                                                                                                                                                   |
| Include 24-hour volume    | boolean         | No       | Include trading volume from the last 24 hours. Default: true.                                                                                                                                                                                                                                                                                                                                                                                    |
| Include 24-hour change    | boolean         | No       | Include the percentage price change over the last 24 hours. Default: true.                                                                                                                                                                                                                                                                                                                                                                       |
| Include last updated time | boolean         | No       | Include the Unix timestamp for CoinGecko's last price update. Default: true.                                                                                                                                                                                                                                                                                                                                                                     |
| Price precision           | select (string) | No       | Optionally control the number of decimal places. Available values: Full precision, 0 decimal places, 1 decimal place, 2 decimal places, 3 decimal places, 4 decimal places, 5 decimal places, 6 decimal places, 7 decimal places, 8 decimal places, 9 decimal places, 10 decimal places, 11 decimal places, 12 decimal places, 13 decimal places, 14 decimal places, 15 decimal places, 16 decimal places, 17 decimal places, 18 decimal places. |

**Outputs**

| Field      | Type   | Description                                                 |
| ---------- | ------ | ----------------------------------------------------------- |
| Coin price | object | The latest price and requested market details for the coin. |

#### List Coin Markets

List and rank cryptocurrencies with current market data.

**Inputs**

| Field                     | Type            | Required | Description                                                                                                                                                                                                 |
| ------------------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quote currency            | select (string) | Yes      | The CoinGecko quote currency code for prices and market values, such as `usd`. Options load from the selected connection. Default: usd.                                                                     |
| Coin ID                   | string          | No       | An optional exact CoinGecko coin ID from Search Coins, such as `bitcoin`, not a display name such as `Bitcoin`.                                                                                             |
| Sort order                | select (string) | No       | How to rank the returned coins. Available values: Market cap: high to low, Market cap: low to high, Volume: high to low, Volume: low to high, Coin ID: A to Z, Coin ID: Z to A. Default: market\_cap\_desc. |
| Category ID               | select (string) | No       | An optional exact CoinGecko category ID from the category options, such as `layer-1`. Options load from the selected connection.                                                                            |
| Maximum results           | integer         | No       | The maximum number of market records to return. Minimum: 1. Maximum: 250. Default: 100.                                                                                                                     |
| Page                      | integer         | No       | The CoinGecko results page to return. Minimum: 1. Default: 1.                                                                                                                                               |
| Include 7-day sparkline   | boolean         | No       | Include seven days of sparkline price values. Default: false.                                                                                                                                               |
| Extra price-change period | select (string) | No       | Optionally include percentage change for another time period. Available values: 1 hour, 24 hours, 7 days, 14 days, 30 days, 200 days, 1 year.                                                               |

**Outputs**

| Field                        | Type          | Description                                                                       |
| ---------------------------- | ------------- | --------------------------------------------------------------------------------- |
| Coin markets                 | object\_array | Market records matching the selected filters and ranking.                         |
| Quote currency               | string        | The currency used for every price and market value in this result.                |
| Selected price-change period | string        | The requested period for selected\_price\_change\_percentage, or blank when none. |
| Next page                    | integer       | The next provider page when the current page may not be the last.                 |

#### Get Coin Market Chart

Get historical prices, market caps, and trading volumes for a coin.

**Inputs**

| Field                  | Type            | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Coin ID                | string          | Yes      | The exact CoinGecko coin ID from Search Coins, such as `bitcoin`, not a display name such as `Bitcoin`.                                                                                                                                                                                                                                                                                                                                          |
| Quote currency         | select (string) | Yes      | The CoinGecko quote currency code for historical values, such as `usd`. Options load from the selected connection. Default: usd.                                                                                                                                                                                                                                                                                                                 |
| History length in days | integer         | Yes      | How many days of history to retrieve. Minimum: 1. Maximum: 365. Default: 30.                                                                                                                                                                                                                                                                                                                                                                     |
| Data interval          | select (string) | No       | Optionally force hourly or daily points. Available values: Hourly, Daily.                                                                                                                                                                                                                                                                                                                                                                        |
| Value precision        | select (string) | No       | Optionally control the number of decimal places. Available values: Full precision, 0 decimal places, 1 decimal place, 2 decimal places, 3 decimal places, 4 decimal places, 5 decimal places, 6 decimal places, 7 decimal places, 8 decimal places, 9 decimal places, 10 decimal places, 11 decimal places, 12 decimal places, 13 decimal places, 14 decimal places, 15 decimal places, 16 decimal places, 17 decimal places, 18 decimal places. |

**Outputs**

| Field           | Type          | Description                                                    |
| --------------- | ------------- | -------------------------------------------------------------- |
| Coin ID         | string        | The exact CoinGecko coin ID represented by these chart series. |
| Quote currency  | string        | The currency used for every value in the chart series.         |
| Prices          | object\_array | Historical price points for the selected coin.                 |
| Market caps     | object\_array | Historical market-cap points for the selected coin.            |
| Trading volumes | object\_array | Historical trading-volume points for the selected coin.        |

#### Search Coins

Find cryptocurrencies and their stable CoinGecko IDs by name or symbol.

**Inputs**

| Field       | Type   | Required | Description                                 |
| ----------- | ------ | -------- | ------------------------------------------- |
| Search term | string | Yes      | A coin name or ticker symbol to search for. |

**Outputs**

| Field        | Type          | Description                                                        |
| ------------ | ------------- | ------------------------------------------------------------------ |
| Coin matches | object\_array | Coin matches with their stable CoinGecko IDs and market-cap ranks. |

#### Get Trending Coins

Get the coins trending in CoinGecko searches over the last 24 hours.

**Inputs**

No input fields are required in this catalog entry.

**Outputs**

| Field          | Type          | Description                                                                                    |
| -------------- | ------------- | ---------------------------------------------------------------------------------------------- |
| Trending coins | object\_array | Coins trending in CoinGecko searches during the last 24 hours, with their exact CoinGecko IDs. |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/coingecko.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
