What you get#
Onekey exposes CoinGecko as 13 endpoints behind one API key: 6 endpoints return one record (data is an object) and 7 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for CoinGecko also works for the rest of the finance & markets category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
categories | Coin categories with aggregate market cap and 24h volume. | - | 5 | stable |
coin | Coin profile with live market data (price, market cap, supply, ATH). | id* | 1 | stable |
defi_global | Global DeFi market summary (market cap, dominance, top coin). | - | 1 | stable |
exchange | One exchange: trust score, 24h BTC volume, country, links. | id* | 1 | stable |
exchange_rates | BTC-denominated exchange rates for fiat, crypto and commodities. | - | 1 | stable |
exchanges | Crypto exchanges ranked by trust score. | per_page, page | 5 | stable |
global | Global crypto market: total market cap, volume, BTC/ETH dominance. | - | 1 | stable |
history | Coin snapshot (price, market cap, volume) on a past date (public API: last 365 days only). | id*, date* | 1 | stable |
market_chart | Price time series (price points) for a coin over N days. | id*, vs_currency, days | 5 | stable |
markets | Top coins by market cap with prices, volume and 24h change. | vs_currency, per_page, page | 5 | beta |
ohlc | OHLC candles for a coin (days: 1,7,14,30,90,180,365). | id*, vs_currency, days | 5 | stable |
search | Search coins by name or symbol. | q* | 5 | stable |
trending | Trending coins on CoinGecko in the last 24h. | - | 5 | stable |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls coingecko.coin (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/coingecko/coin?id=bitcoin" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from CoinGecko, with the same names as on every other platform. The count is how many of its 13 mapped endpoints return the field; a field the source lacks is null, never missing. 28 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
entity.name | string | 9 |
entity.id | string | 7 |
media.thumbnailUrl | URL | 7 |
entity.date | ISO 8601 date | 6 |
market.price | number | 5 |
market.symbol | string | 5 |
market.volume24h | number | 5 |
market.change24hPct | number | 4 |
market.marketCap | number | 4 |
market.marketCapRank | integer | 4 |
entity.category | string | 3 |
entity.url | URL | 3 |
entity.description | string | 2 |
entity.createdAt | ISO 8601 date | 1 |
market.close | number | 1 |
market.high | number | 1 |
market.low | number | 1 |
market.open | number | 1 |
The full schema is in Unified schema.
Pricing#
CoinGecko calls cost 1 to 5 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.