Crypto Tutorials: Binance | Bitfinex | Bitmex | BscScan | Cardano | Coinbase | Coingecko | Coinmarketcap | CoinAPI | Coinranking | Etherscan | | Glassnode | Huobi | LiveCoinWatch | Kraken | Kucoin | Magic Eden | Messari | Nomics | OpenSea | PancakeSwap | Rarible | Rarify | Solanart


    How to import data from CryptoCompare into Google Sheets

    CryptoCompare is a crypto data website. We can use the CryptoCompare API to import data from CryptoCompare into Google Sheets. In this tutorial, we’ll show you how to connect the CryptoCompare REST API to Google Sheets in 5 steps:

    1. Install the Apipheny add-on
    2. Obtain an API key
    3. Choose a CryptoCompare API endpoint
    4. Enter your CryptoCompare API request into Apipheny
    5. Run the CryptoCompare API request in your Google Sheet

    Step 1.) Install and open the Apipheny add-on for Google Sheets

    Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.

    1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install

    2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

    In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

    open apipheny

    Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

    Step 2.) Obtain an API key

    After logging into your CryptoCompare account, click the Create an API Key button:

    CryptoCompare dashboard
    CryptoCompare dashboard

    In the popup window, complete a name for your key, check the FullRead/Write All Data checkbox and click the Add button:

    Create new API key popup
    Create new API key popup

    In the One last step… popup window, choose a reason for using this API and click the Save button:

    One last step... section
    One last step… section

    Your API key will be generated:

    API key section
    API key section

    Copy your API key to a safe location, because you’ll need it later!

    Step 3.) Choose a CryptoCompare API endpoint

    In this section, we’ll show you how to browse the CryptoCompare API documentation to find the endpoint that retrieves the data you need from CryptoCompare. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.

    First, open the CryptoCompare API documentation page: https://min-api.cryptocompare.com/documentation

    The menu on the left contains a list of categorized endpoints:

    CryptoCompare API documentation page
    CryptoCompare API documentation page

    If we click the Historical category, a list of its endpoints will be displayed on the screen:

    The Historical category
    The Historical category

    An example endpoint is Minute Pair OHLCV, which returns open, high, low, close, volume from and volume to, from each minute’s historical data:

    https://min-api.cryptocompare.com/data/v2/histominute?fsym=BTC&tsym=GBP&limit=10&api_key=API_KEY

    If you use this URL, make sure to replace API_KEY with your own API key, that you previously obtained in Step 2.

    The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET), the URI, the URL parameters and example responses:

    Minute Pair OHLCV endpoint documentation page
    Minute Pair OHLCV endpoint documentation page

    All API calls to the CryptoCompare API should be made to this base URL: https://min-api.cryptocompare.com/data/v2/

    Step 4.) Enter your CryptoCompare API request into Apipheny

    Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

    Method: At the top of the Apipheny sidebar, select the HTTP method (GET, POST, PUT, etc) required by your API endpoint. For this example, we are using the GET method.

    API URL: In Step 3, we explained how you can find the CryptoCompare REST API endpoint that you need. Now copy and paste your complete CryptoCompare API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

    For this example, we are using the Single Symbol Price endpoint, which returns the current price of any cryptocurrency in any other currencies that you need. This is what the whole URL looks like:

    https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=BTC,USD,EUR&api_key=YOUR_KEY

    If you use this URL, make sure to replace YOUR_KEY with the API key you previously obtained in Step 2.

    Here’s what our CryptoCompare API request looks like in Apipheny:

    CryptoCompare API request entered into Apipheny
    CryptoCompare API request entered into Apipheny

    Step 5.) Run the CryptoCompare API request in your Google Sheet

    Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the CryptoCompare API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

    CryptoCompare data imported into Google Sheets
    CryptoCompare data imported into Google Sheets

    After successfully calling the CryptoCompare API, try calling a different endpoint, or try one of Apipheny’s other features to enhance your API calls.