REST API Tutorials

How To Use the CoinMarketCap API in 3 Easy Steps [Tutorial]

What is CoinMarketCap?

CoinMarketCap.com is a website used for tracking the capitalization of various cryptocurrencies.

This cryptocurrency site allows you to compare cryptocurrencies and trading prices.

Related: Best Cryptocurrency APIs

 


Related: CoinMarketCap API Alternatives

For each cryptocurrency, you can view its:

  • Market cap
  • Price
  • Volume (24 hours)
  • Circulating Supply
  • Change (over last 24 hours)
  • and Price Graph

CoinMarketCap API & Endpoints

The CoinMarketCap API is a cryptocurrency trading API that provides access to market cap rankings, charts, and more.

The top endpoints include:

  • getCryptoCurrenciesList – returns a list of all available cryptocurrencies
  • getCryptoCurrency – returns information for a specific cryptocurrency
  • getGlobalData – returns global data of all cryptocurrencies

 


How much does it cost to use the CoinMarketCap API?

The CoinMarketCap is a free-to-use cryptocurrency API on RapidAPI when you register for an account (also free!) on RapidAPI.com.

How to use the CoinMarketCap API

So how do you use the API?

Follow the steps below to get started:

1. Navigate to the CoinMarketCap API page on RapidAPI

First, head on over to RapidAPI.com and search for the CoinMarketCap API.

2. Sign up or Login

To begin testing the CoinMarketCap API endpoints, you’ll need a RapidAPI account.

Log in or sign up for an account on the website.

Don’t worry, it’s free!

3. Select a programming language

Now that you’re logged in, let’s test the getCryptoCurrenciesList API endpoint.

Before you click “Test Endpoint”, select your preferred programming language.

The CoinMarketCap API is available in the following programming languages:

  • NodeJS
  • PHP
  • Python
  • Ruby
  • Objective-C
  • Java (Android)
  • C# (.NET)
  • cURL

 


Here are some code snippet examples:

CoinMarketCap API Python Example

Python Request Snippet Example

response = unirest.post("https://CoinMarketCapzakutynskyV1.p.rapidapi.com/getCryptocurrenciesList",
  headers={
    "X-RapidAPI-Key": "{Your RapidAPI Key}",
    "Content-Type": "application/x-www-form-urlencoded"
  }
)

CoinMarketCap API PHP Example

PHP Request Snippet Example

$response = UnirestRequest::post("https://CoinMarketCapzakutynskyV1.p.rapidapi.com/getCryptocurrenciesList",
  array(
    "X-RapidAPI-Key" => "{Your RapidAPI Key}",
    "Content-Type" => "application/x-www-form-urlencoded"
  )
);

CoinMarketCap API NodeJS / JavaScript Example

NodeJS Request Snippet Example

unirest.post("https://CoinMarketCapzakutynskyV1.p.rapidapi.com/getCryptocurrenciesList")
.header("X-RapidAPI-Key", "{Your RapidAPI Key}")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});

To learn more about consuming APIs and installing SDKs, click here.

 


Once you’ve selected a language, click “Test Endpoint”…

… and voila!

You should see something like this:

Now you’re ready to begin integrating the CoinMarketCap API into your crypto application or website.

Click the button below to get started:

How do you plan on using this API? Have any other questions? Let us know in the comments below!

Cryptocurrency APIs Comparison

APIWallet IntegrationTransaction SupportSpecial CapabilitiesPrice
Digital Currency Tickers API by BraveNewCoinNoNoYesFree
Crypto Market Intraday Reference Rates API by BraveNewCoinNoNoYesFree
CoinAPINoNoYesFree
ICOs API by ZloadrNoNoYesVarying Plans
Due Diligence API by ZloadrNoNoYesVarying Plans
Global Bitcoin Price Index – GBX API by BitcoinAverageNoNoYesFree
CoinbaseYesYesYesFree
CoinMarketCapNoNoYesFree
NexchangeYesYesYesExchange Fees
GetBalanceYesNoNoFree
BitcoinAverageNoNoYesVarying Plans
BitcointyNoNoYesFree
Bitcoin ATMsNoNoYesVarying Plans
5/5 - (9 votes)

View Comments

  • I think that a great alternative to CCM, is Crypto APIs. It has a lot more exchanges integrated, plus blockchain endpoints.

    They use REST API, WebHook Notifications & WebSockets. Crypto APIs supports BTC, ETH, LTC, BCH & is working on EOS and XRP. They have trades, quotes and collecting data to 100+ Crypto Exchanges.

  • I'm trying to use their API in Excel/Google Sheets to get price change from BTC for all other coins, so how much has ETH, LTC etc. changed in 24h or 7d to BTC. Does anyone know how to do this? I'm sure the data is there in the listing/latest data but needs a formula?

  • Does anyone know how to get the "current balance" shown under portfolio using an api call? Couldn't find any doc entry for that.

Share
Published by

Recent Posts

Power Up Your Enterprise Hub: New March Release Boosts Admin Capabilities and Streamlines Integrations

We're thrilled to announce the latest update to the Rapid Enterprise API Hub (version 2024.3)!…

2 weeks ago

Unveiling User Intent: How Search Term Insights Can Empower Your Enterprise API Hub

Are you curious about what your API consumers are searching for? Is your Hub effectively…

3 weeks ago

Rapid Enterprise API Hub Levels Up Custom Branding, Monetization, and Management in February Release

The RapidAPI team is excited to announce the February 2024 update (version 2024.2) for the…

1 month ago

Supercharge Your Enterprise Hub with January’s Release: Search Insights, Login Flexibility, and More!

This January's release brings exciting features and improvements designed to empower you and your developers.…

3 months ago

Enhanced Functionality and Improved User Experience with the Rapid API Enterprise Hub November 2023 Release

Rapid API is committed to providing its users with the best possible experience, and the…

5 months ago

The Power of Supporting Multiple API Gateways in an API Marketplace Platform

In today's fast-paced digital world, APIs (Application Programming Interfaces) have become the backbone of modern…

6 months ago