canonical: https://jentic.com/apis/coingecko.com/coingecko

# CoinGecko Demo API

CoinGecko provides one of the most widely used cryptocurrency data APIs, aggregating prices, market metrics, exchanges, derivatives, NFT collections, and on-chain token data across thousands of assets. The Demo tier exposes 41 REST endpoints covering simple price lookups, coin metadata and history, OHLC candles, exchange data, search, trending coins, and global market metrics. It is a de facto reference dataset for crypto dashboards, portfolio trackers, and research tools.

## For AI agents

Look up crypto prices, market data, OHLC candles, exchanges, NFTs, and derivatives across thousands of assets and trading pairs aggregated by CoinGecko.

## Scope

Does not handle order placement, wallet management, or on-chain transactions - use for crypto, NFT, and derivatives market data only.

## Capabilities

- Get simple current prices for one or many coins quoted in any supported currency
- Look up token prices by smart contract address on a specific blockchain platform
- Retrieve OHLC candles, market chart series, and per-day historical snapshots for any coin
- Browse exchanges, exchange tickers, and per-exchange volume data
- Search the catalogue of coins, exchanges, and NFTs by free-text query
- Pull trending coins and global crypto market metrics in a single call
- Look up NFT collection metadata and floor prices

## Use cases

### Crypto Portfolio Tracker

Power a portfolio tracker with live and historical pricing across thousands of coins and tokens. CoinGecko's simple price endpoint quotes any coin in any supported fiat or stablecoin in a single call, while market chart endpoints provide history for valuation and performance reporting. Integration usually takes a single afternoon for the read path.

Example prompt: Call GET /simple/price with ids=bitcoin,ethereum,solana and vs_currencies=usd and return the rates

### Token Lookup by Contract Address

Surface live pricing and metadata for any ERC-20 or compatible token using its on-chain contract address. CoinGecko maps contract addresses to canonical coin ids and returns price, market cap, and volume. Useful for DeFi dashboards, wallet apps, and on-chain analytics tools.

Example prompt: Call GET /simple/token_price/ethereum with the contract address and vs_currencies=usd and return the price

### Crypto Research and Trends

Power research dashboards and newsletters with trending coins, global market metrics, and detailed coin pages. The trending, global, and coins/{id} endpoints supply the narrative inputs (top movers, total market cap, dominance) plus per-coin developer, community, and link metadata.

Example prompt: Call GET /search/trending and return the top seven trending coin names with their CoinGecko ids

### AI Crypto Research Agent via Jentic

Build an agent that answers crypto research questions by composing CoinGecko queries through Jentic. The agent expresses an intent in natural language; Jentic resolves the right endpoint and executes the call with stored credentials. Cost-effective for assistants that need broad coin coverage without per-exchange integration.

Example prompt: Through Jentic, fetch the current price and 24h change for the top three trending coins and summarise them in a brief paragraph

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /simple/price | Get current prices for one or many coins |
| GET | /simple/token_price/{id} | Get token price by contract address on a chain |
| GET | /coins/markets | List coin market data with pagination |
| GET | /coins/{id}/market_chart | Retrieve historical market chart data |
| GET | /coins/{id}/ohlc | Get OHLC candles for a coin |
| GET | /search/trending | List trending coins right now |

## Key resources

- **Simple Price** — Lightweight current price lookups for one or many coins
- **Coins** — Coin metadata, history, OHLC candles, market charts, and tickers
- **Exchanges** — Exchange listings, tickers, and per-exchange volume data
- **Search and Trending** — Search across coins, exchanges, and NFTs; list trending assets
- **Derivatives** — Derivatives exchange and contract data
- **NFTs** — NFT collection metadata and pricing
- **Global** — Aggregated global market metrics

## Why Jentic

- **Setup:** Wiring CoinGecko by hand means managing its x-cg-demo-api-key or x-cg-pro-api-key header auth and handling rate limits and pagination across dozens of coin, NFT, and derivatives endpoints yourself. Through Jentic you install once, import CoinGecko from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** CoinGecko serves read-only market data, so you scope by choosing the operations the agent may call: limit it to what it needs, such as fetching simple prices or trending searches, and heavier calls like full market chart pulls are not included unless you add them.
- **Credential handling:** Your CoinGecko API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get current crypto prices' or 'find trending coins', and Jentic returns the matching CoinGecko operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **CoinMarketCap API** — Closest competitor with broad rankings and market cap coverage
- **CoinCap API** — Lighter-weight free crypto pricing with a smaller endpoint surface
- **CoinAPI Market Data REST API** — Per-exchange OHLCV, trades, and order book data

## FAQ

### What authentication does the CoinGecko API use?

The Demo and Pro tiers accept an API key either in the x-cg-demo-api-key header (or x-cg-pro-api-key for paid tiers) or as a query parameter. Through Jentic the key is stored in the encrypted vault and the agent receives a scoped execution token rather than the raw key.

### Can I look up a token price by its contract address?

Yes. GET /simple/token_price/{id} accepts a platform id (for example ethereum) and one or more contract_addresses, returning the current price in any supported quote currencies. Use /simple/supported_vs_currencies to list valid quote currencies.

### What are the rate limits for the CoinGecko Demo API?

The Demo tier permits roughly 30 calls per minute and a monthly call cap, while Pro tiers raise both limits substantially. Exact thresholds depend on the active plan attached to your API key - the OpenAPI spec does not declare them per endpoint.

### How do I retrieve historical OHLC candles for a coin through Jentic?

Install the SDK with pip install jentic, search Jentic for get crypto ohlc candles, load the schema for GET /coins/{id}/ohlc, and execute with the coin id (e.g. bitcoin), vs_currency, and days parameter.

### Does CoinGecko expose NFT and derivatives data in the same API?

Yes. The same v3 base URL exposes NFT collection metadata under /nfts and derivatives data under /derivatives, alongside coin and exchange endpoints - no separate auth or base URL is required.

### Can I search for a coin by name or ticker?

Yes. GET /search accepts a free-text query and returns matching coins, exchanges, and NFT collections. For ranked lists, GET /search/trending returns the most-searched coins on CoinGecko in the last 24 hours.

### Can I limit what my agent is allowed to do with the CoinGecko API?

Yes. Because you run Jentic One yourself, you decide which CoinGecko operations your agent may call, and CoinGecko only serves read-only market data so there is no risk of writes or transactions. You can allow lightweight calls like GET /simple/price for current prices and GET /search/trending for trending coins while withholding heavier operations such as GET /coins/{id}/market_chart until you choose to add them. Your CoinGecko API key stays with your own instance and is injected only for the operations you permit.
