Import CoinMarketCap API Data to Sheets [2022] | API Connector

In this steer, we ’ ll walk through how to pull cryptocurrency data from the CoinMarketCap API immediately into Google Sheets, using the API Connector addition for Sheets. We ’ ll beginning get an API samara from CoinMarketCap, and then set up a request to pull in crypto data to your spreadsheet .

Contents

Before You Begin

Click here to install the API Connector accessory from the Google Marketplace .

Part 1: Get Your CoinMarketCap API Key

  1. If you haven’t already, navigate to https://coinmarketcap.com/api/ and click Get Your API Key Now
    coinmarketcap-img1
  2. Fill out your details and click Create My Account
    coinmarketcap-img2
  3. A moment later you’ll receive an email. Click on the email to verify your account, and you’ll be redirected into your new CoinMarketCap dashboard. Congrats! You now have access to the CoinMarketCap API. Hover over the API Key box in the top left and copy the key to your clipboard.
    coinmarketcap-img3

Part 2: Fetch Data from CoinMarketCap

The easiest way to get started with the CoinMarketCap API is through API Connector ’ s built-in integration.

  1. Select CoinMarketCap from the drop-down list of applications
    coinmarketcap-application
  2. Under Authorization, enter your API key.
    coinmarketcap-authorization
  3. Choose an endpoint. We’ll start with /v1/cryptocurrency/listings/latest, which is the endpoint for fetching the latest market data.
    coinmarketcap-endpoints
  4. In the parameters section, select auxiliary fields to retrieve. For now we can skip the other parameters as they’re optional.
    coinmarketcap-parameters
  5. Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
    coinmarketcap-response

Part 3: Create a Custom Request

alternatively, you can run your own custom requests alternatively of using API Connector ’ s pre-built integration. When you create a customs request, you add your complete URL into the request URL field. You besides need to add a Header, where Key = X-CMC_PRO_API_KEY, and Value = your_api_key

Part 4: Handle Pagination

  1. CoinMarketCap limits the number of records returned in each request. By default, only 100 records will be returned unless you include start and limit parameters. The documentation says you can specify a limit of up to 5000, but in my own tests large limits seemed to produce an error, so I used 1000 in the examples below.
    coinmarketcap-img7
  2. With API Connector you can either run these paginated request URLs manually or loop through them automatically with offset-limit pagination handling (paid feature), like this:
    • Pagination type: offset-limit
    • Offset parameter: start
    • Limit parameter: limit
    • Limit value: 1000
    • Run until: choose when to stop running the request
      coinmarketcap-pagination-offset-limit

Part 5: API Documentation

official API documentation : hypertext transfer protocol : //coinmarketcap.com/api/documentation/v1/

Appendix: CoinMarketCap Template

In this template, everything is configured for you to simply add your API key along with whatever currencies you ’ rhenium interest in and get a dashboard like below :
coinmarketcap-img10 here is the template link .

reference : https://tuvi365.net
Category : QUESTION COIN

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *