# CoinGecko Crypto Price & Data **CoinGecko Crypto Price & Data** is an independently documented x402 Atlas bridge at https://coingecko.use.x402atlas.com. This document describes only this bridge; it does not aggregate routes, schemas, or content from any other bridge. ## How payment works Paid operations use the [x402 payment protocol](https://x402.org) and settle in USDC. Atlas supports deployments on Base, Polygon, and Arbitrum, plus configured Solana networks. This bridge currently advertises Arbitrum One (`eip155:42161`), Base (`eip155:8453`), Polygon (`eip155:137`), Solana mainnet (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). 1. Send the HTTP request without a payment signature. 2. Read the `402 Payment Required` response. Its `accepts` entries are the authoritative network, asset, amount, and recipient options for that call. 3. Select an option, sign it with an x402-compatible wallet or SDK, and repeat the request with the `PAYMENT-SIGNATURE` header. The successful response is returned after verification and settlement. TypeScript clients can automate the challenge, signing, and retry flow with [`x402-fetch`](https://www.npmjs.com/package/x402-fetch) or [`x402-axios`](https://www.npmjs.com/package/x402-axios). Fund a dedicated wallet only with the working USDC balance it needs and keep that key separate from treasury accounts. ## Pricing Atlas route prices start at $0.005 per successful call. This bridge's fallback price is $0.005; operations below state their exact configured price in `x-x402` and `x-payment-info`. The live `402` challenge remains authoritative. ## Worked payment example Request one documented operation without a signature to inspect its live terms: ```bash curl -i 'https://coingecko.use.x402atlas.com/coin?id=bitcoin' # HTTP/1.1 402 Payment Required # Read accepts[].network, asset, amount, and payTo from this response. ``` Sign one accepted option and repeat the identical request with the `PAYMENT-SIGNATURE` header. Do not invent or cache payment terms; read them from the current challenge. ## Use this API - Interactive reference: https://coingecko.use.x402atlas.com/docs - OpenAPI 3.1 specification: https://coingecko.use.x402atlas.com/openapi.json - Agent-readable route corpus: https://coingecko.use.x402atlas.com/llms.txt - Endpoint index: https://coingecko.use.x402atlas.com/index.json Use the operation schemas and examples below to construct requests. Copy the server URL, path, method, parameters, and request body from the operation you want to call. Path and query examples are concrete and can be used directly. ## Atlas response metadata Successful JSON responses include an additive top-level `_atlas` block, kept separate from the bridge's data fields. `_atlas.docs` links this bridge's `/llms.txt` corpus. `_atlas.related` suggests adjacent APIs, each with a callable `url`, its own `docs` link, and a short `summary`. Suppress this block by sending `X-Atlas-Meta: none` or by adding `?_atlas=0` to the request. ## Errors and compatibility Validation failures use HTTP `400`. Paid operations may return `402` before dispatch. Upstream and internal failures use the documented `5xx` responses. Clients should rely on documented fields and tolerate additive response fields, including `_atlas` unless they explicitly opt out. ## Protocol reference - x402 protocol and SDKs: https://x402.org ## CoinGecko Crypto Price & Data Docs: https://coingecko.use.x402atlas.com/docs · OpenAPI: https://coingecko.use.x402atlas.com/openapi.json ### GET /coin Crypto coin metadata and market data by CoinGecko id — name, symbol, market-cap rank, price, homepage and categories for any token. Full metadata and a current market snapshot for one coin by its CoinGecko id slug (`id=bitcoin`). Returns name, symbol, market-cap rank, homepage, categories, and a slimmed `market_data` block (price, market cap) — trimmed from CoinGecko's ~200-field payload down to the ~15 fields agents actually use. Use this to resolve a coin's identity/metadata, or to map a ticker symbol to the id slug the other routes expect. **Price:** $0.005 per call. Parameters: - `id` (required, string) — CoinGecko coin id slug, lowercase letters/digits/hyphens, e.g. bitcoin; example: `"bitcoin"` Example: ```sh curl 'https://coingecko.use.x402atlas.com/coin?id=bitcoin' ``` Response example: ```json { "categories": [ "Cryptocurrency" ], "homepage": "https://www.bitcoin.org", "id": "bitcoin", "image": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png", "market_cap_rank": 1, "market_data": { "current_price_usd": 67000, "market_cap_usd": 1300000000000 }, "name": "Bitcoin", "queried_at": "2026-06-08T12:00:00Z", "symbol": "btc" } ``` ### GET /history Historical crypto price on a specific date — price, market cap and 24h volume snapshot for any coin by CoinGecko id, in USD or more. Price, market cap, and 24h volume for one coin on a specific calendar date. Pass `id` (coin-id slug) and `date` in **DD-MM-YYYY** format (day-first, not ISO — a common mistake). Optional `vs_currency` (default usd). Returns a single-day snapshot; for a continuous series use `/ohlc`. Only the trailing ~365 days are available on the public tier — pick a recent date. **Price:** $0.005 per call. Parameters: - `date` (required, string) — Snapshot date in DD-MM-YYYY format (day-first, not ISO). Only the trailing ~365 days are available; older dates are rejected; pattern: `"^[0-9]{2}-[0-9]{2}-[0-9]{4}$"`; example: `"30-06-2026"` - `id` (required, string) — CoinGecko coin id slug; example: `"bitcoin"` - `vs_currency` (optional, string) — Target currency code (default: usd); default: `"usd"`; example: `"usd"` Example: ```sh curl 'https://coingecko.use.x402atlas.com/history?date=30-06-2026&id=bitcoin&vs_currency=usd' ``` Response example: ```json { "date": "30-12-2020", "id": "bitcoin", "market_cap": 538856000000, "price": 28966, "queried_at": "2026-06-08T12:00:00Z", "total_volume": 26649000000, "vs_currency": "usd" } ``` ### GET /markets Top crypto coins ranked by market cap — paginated market data (price, market-cap rank, symbol) in any currency, CoinGecko-sourced. A page of coins ranked by market cap, in the currency you choose (`vs_currency`, default usd). Control paging with `per_page` (1–250, default 50) and `page` (≥1). Each row carries price, market-cap rank, symbol, and name. Use this to list or rank the top coins; for a single coin use `/price` or `/coin`. This is the heaviest payload here — request only the page size you need. **Price:** $0.005 per call. Parameters: - `page` (optional, integer) — Page number, 1-1000 (default: 1); default: `1`, minimum: `1`, maximum: `1000`; example: `1` - `per_page` (optional, integer) — Rows per page, 1-250 (default: 50); default: `50`, minimum: `1`, maximum: `250`; example: `10` - `vs_currency` (optional, string) — Target currency code (default: usd); default: `"usd"`; example: `"usd"` Example: ```sh curl 'https://coingecko.use.x402atlas.com/markets?page=1&per_page=10&vs_currency=usd' ``` Response example: ```json { "markets": [ { "current_price": 67000, "id": "bitcoin", "market_cap_rank": 1, "name": "Bitcoin", "symbol": "btc" } ], "page": 1, "per_page": 10, "queried_at": "2026-06-08T12:00:00Z", "vs_currency": "usd" } ``` ### GET /ohlc OHLC candlestick data for crypto — daily open/high/low/close candles over 1-365 days for any coin by CoinGecko id, chart-ready. Daily OHLC candles (open/high/low/close) for one coin over a trailing window. Pass `id` and `days` — one of 1, 7, 14, 30, 90, 180, 365 (other values are rejected). Optional `vs_currency` (default usd). Returns chart-ready `candles` with ISO timestamps, normalized from CoinGecko's positional arrays into named fields. Use for charting or technical signals; for a single historical day use `/history`. **Price:** $0.005 per call. Parameters: - `days` (required, integer) — Window size in days: one of 1, 7, 14, 30, 90, 180, 365; allowed: [1,7,14,30,90,180,365]; example: `30` - `id` (required, string) — CoinGecko coin id slug; example: `"bitcoin"` - `vs_currency` (optional, string) — Target currency code (default: usd); default: `"usd"`; example: `"usd"` Example: ```sh curl 'https://coingecko.use.x402atlas.com/ohlc?days=30&id=bitcoin&vs_currency=usd' ``` Response example: ```json { "candles": [ { "close": 27050, "high": 27100, "low": 26900, "open": 27000, "time": "2026-05-08T00:00:00Z" } ], "days": 30, "id": "bitcoin", "queried_at": "2026-06-08T12:00:00Z", "vs_currency": "usd" } ``` ### GET /price Crypto token price in USD, EUR and more — real-time spot prices for one or many coins by CoinGecko id (bitcoin, ethereum, solana). Real-time spot price for one or many coins in one or many currencies. Pass `ids` as CoinGecko coin-id slugs (e.g. `bitcoin,ethereum`) and `vs_currencies` as currency codes (e.g. `usd,eur`) — both accept comma-separated lists. Returns a flat `quotes` array (one row per id×currency) plus a `queried_at` UTC stamp. Coin ids are slugs, not ticker symbols; resolve a symbol to its id with `/coin` if unsure. For historical or chart data use `/history` or `/ohlc`. **Price:** $0.005 per call. Parameters: - `ids` (required, string) — Comma-separated CoinGecko coin-id slugs, lowercase, up to 50 ids (e.g. bitcoin,ethereum); example: `"bitcoin,ethereum"` - `vs_currencies` (required, string) — Comma-separated target currency codes, up to 50, alphanumeric (e.g. usd,eur,btc); example: `"usd,eur"` Example: ```sh curl 'https://coingecko.use.x402atlas.com/price?ids=bitcoin%2Cethereum&vs_currencies=usd%2Ceur' ``` Response example: ```json { "queried_at": "2026-06-08T12:00:00Z", "quotes": [ { "id": "bitcoin", "price": 67000, "vs_currency": "usd" }, { "id": "ethereum", "price": 3500, "vs_currency": "usd" } ] } ``` ### GET /trending Trending crypto coins in the last 24h — the most-searched tokens on CoinGecko right now with name, symbol and market-cap rank. The coins most searched on CoinGecko in the last 24h — a momentum/popularity signal, not a price feed. Takes no parameters. Returns a `coins` array with id, name, symbol, and market-cap rank. Pair the returned ids with `/price` or `/coin` to enrich. **Price:** $0.005 per call. Example: ```sh curl 'https://coingecko.use.x402atlas.com/trending' ``` Response example: ```json { "coins": [ { "id": "pepe", "market_cap_rank": 42, "name": "Pepe", "price_btc": 1e-7, "score": 0, "symbol": "PEPE" } ], "queried_at": "2026-06-08T12:00:00Z" } ```