How to Import Crypto Prices in Google Sheets (Guide)
In this guide, learn how to:
- Connect Google Sheets to Mobula API with an API Connector
- How to import crypto market data on Google Sheets?
- Get the historical net worth of any wallet on Google Sheets.
- Retrieve historical crypto price for any asset on Google Sheets.
- Fetch crypto metadata on Google Sheets.
• Request a new blockchain
• Request a new endpoint
• Need something else
How to Use an API Connector to Pull Data into Google Sheets
To use an API connector to pull data into Google Sheets, follow these 4 steps:
- Install an API Connector add-on from Google's Marketplace.
- Run the extension from your Google Sheet.
- Enter your API key in the Headers connector.
- Execute and run the query.
In this guide, we'll walk through how to use the API Connector by Mixed Analytics. Following the first step, let’s install the add-on from Google’s Marketplace.
Once the add-on has been successfully installed, create a new Google Sheet. In the top navigation bar, select Extensions and click ‘Open’.
A panel will slide out from the right. Click on the ‘Create’ tab and you’ll find a few fields that will configure your API request. The commonly used ones in this guide will be:
- Request URL
- Output settings > Destination sheet and cell
- Output options
- Naming the request
Your spreadsheet is now fully set up and ready to import some crypto price data!
Need a custom solution for your project? We take care of it
Mobula is dedicated to meeting your needs swiftly and ensuring the blockchain data or the endpoint you require is available within 24 hours.
How to import crypto market data on Google Sheets?
First, visit https://docs.mobula.io/introduction to get an overview of all the endpoints available. For this example, we will focus on Get Market Data (batch).
To perform a simple test, you don't need to generate an API key, but you'll soon be limited in the number of requests you can make. In this example, we'll use an API key generated free of charge here.
Step 1
Fill in the fields according to the assets whose market data you wish to retrieve: price, liquidity, volume, market cap, volume change, ath, atl etc...
In our example, we'll fetch market data for Bitcoin, Ethereum, Cardano, and XRP.
Step 2
Copy the URL from the window on the right: https://api.mobula.io/api/1/market/multi-data assets=Bitcoin%2CEthereum%2CCardano%2CXRP
Step 3
Paste the URL in the API Connector in the URL Request field and add in Headers the key: Authorization and in Value your API Key.
Step 3
Choose the Destination sheet and the cell where to add the first value. For better readability, you can use grid for the report style and check Unwind data and Force columns. Once set, you can run the request.
Display the data
Now you've reached the end of this tutorial, you should have a result similar to the one below.
How to import the historical net worth of any wallet on Google Sheets?
First, visit https://docs.mobula.io/introduction to get an overview of all the endpoints available. For this example, we will focus on Get Historical Net Worth.
To perform a simple test, you don't need to generate an API key, but you'll soon be limited in the number of requests you can make. In this example, we'll use an API key generated free of charge here.
Step 1
Fill in the fields according to the wallet you wish to retrieve the historical net worth. In our example, we'll fetch the historical net worth of this wallet: 0x77A89C51f106D6cD547542a3A83FE73cB4459135
Step 2
Copy the URL from the window on the right: https://api.mobula.io/api/1/wallet/history?wallet=0x77A89C51f106D6cD547542a3A83FE73cB4459135
Step 3
Paste the URL in the API Connector in the URL Request field and add in Headers the key: Authorization and in Value your API Key.
Step 3
Choose the Destination sheet and the cell where to add the first value. For better readability, you can use the grid for the report style and check the Unwind data and Force columns.
Display the data
Now you've reached the end of this tutorial, you should have a result similar to the one below.
How to retrieve the historical price for any asset on Google Sheets?
First, visit https://docs.mobula.io/introduction to get an overview of all the endpoints available. For this example, we will focus on Get Historical Market Data.
To perform a simple test, you don't need to generate an API key, but you'll soon be limited in the number of requests you can make. In this example, we'll use an API key generated free of charge here.
Step 1
Fill in the fields according to the asset you wish to retrieve the historical price data. In our example, we'll fetch the historical price of the Ethereum.
Step 2
Copy the URL from the window on the right: https://api.mobula.io/api/1/market/history?asset=Ethereum
Step 3
Paste the URL in the API Connector in the URL Request field and add in Headers the key: Authorization and in Value your API Key.
Step 3
Choose the Destination sheet and the cell where to add the first value. For better readability, you can use grid for the report style and check Unwind data and Force columns. Once set, you can run the request.
Display the data
Now you've reached the end of this tutorial, you should have a result similar to the one below.
How to fetch crypto metadata data on Google Sheets?
First, visit https://docs.mobula.io/introduction to get an overview of all the endpoints available. For this example, we will focus on Get Metadata.
To perform a simple test, you don't need to generate an API key, but you'll soon be limited in the number of requests you can make. In this example, we'll use an API key generated free of charge here.
Step 1
Fill in the fields according to the asset you wish to retrieve the metadata. In our example, we'll fetch the historical price of the Dogecoin.
Step 2
Copy the URL from the window on the right: https://api.mobula.io/api/1/metadata?asset=Dogecoin
Step 3
Paste the URL in the API Connector in the URL Request field and add in Headers the key: Authorization and in Value your API Key.
Step 3
Choose the Destination sheet and the cell where to add the first value. For better readability, you can use grid for the report style and check Unwind data and Force columns. Once set, you can run the request.
Display the data
Now you've reached the end of this tutorial, you should have a result similar to the one below.
Refreshing the Data: Manually & Automatically
There are two ways to refresh the data pull with this API Connector – manually and automatically.
Manual Refresh
This simply means triggering the refresh manually when you want to refresh the sheet. Click on Extensions > API Connector > Refresh All Now in the Google Sheets top navigation bar.
Automatic Refresh
The second way is to automatically refresh the data by creating a trigger schedule via the API Connector. Click on the Schedule tab in the add-on panel, and you’ll see various customizable trigger settings. This provides the flexibility in running data refreshes for specific API requests at specific intervals (every hour, 3 hours, 6 hours, 12 hours, daily, weekly, monthly).
You may also consider using a mix of both methods to reduce the number of API calls, like manually refreshing coin lists or historical crypto prices, where real-time data is not as crucial, and automatically refreshing coin price data for trending categories.
Troubleshooting: Google Sheets API Rate Limits
An error you may encounter is error code 403 or the data not refreshing, where you have exceeded the API rate limit without using an API Key. Don't worry. You just have to create your free API Key to unlock your 300,000 free credits with no rate limit.
• Request a new blockchain
• Request a new endpoint
• Need something else