Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Credits: 1 per successful call, plus more for large lists (see each endpoint) and 1 per extra convert currency beyond the first. Errors and /v1/key/info cost nothing.
- Identify coins by CoinMarketCap id (1 = BTC, 1027 = ETH) rather than symbol: symbols are not unique. Get ids from coinmarketcap.cryptocurrency.map.
- The v3 listings and quotes endpoints return status.error_code as a string (‘0’) and data and quote as arrays; v1/v2 endpoints return a number and objects.
- Some endpoints and history depth depend on the plan; a 403 means the endpoint is not on the key’s plan.
- Many endpoints also work keyless at /public-api/<path>, at lower rate limits; this entry calls the keyed paths.
Endpoints
Map symbols to CoinMarketCap ids
- Always 1 credit.
List coins by market cap
- 1 credit per 250 coins returned (rounded up), plus 1 per extra convert currency. Updated every 15 seconds.
Get latest coin quotes
- Pass one of id, slug or symbol.
- 1 credit per 250 coins, plus 1 per extra convert currency.
Get historical coin quotes
- Pass id or symbol.
- 1 credit per 100 data points (rounded up), plus 1 per extra convert currency.
- Basic plan: 1 month intraday, 1 year daily.
Get historical coin OHLCV
- Not on the free Basic plan.
- 1 credit per 100 data points (rounded up), plus 1 per extra convert currency.
Get coin metadata
- 1 credit per 250 coins returned (rounded up).
Get global crypto market metrics
Get the crypto Fear and Greed index
Convert a crypto or fiat amount
- Historical conversion needs a paid plan (Startup: 1 month).
Get API key usage
- Costs no credits.