In this tutorial, you'll learn how to import historical crypto market data in Airtable. For a particular cryptocurrency, we'll import daily price, market cap and total supply (volume) over time. To do this, we will connect to CoinGecko, which provides crypto market data, using Data Fetcher. You do not need to know how to code to follow this tutorial, but we're assuming you're familiar with Airtable.
First, we're going to create a table with a record for each date you want data for.
Create a table in your Airtable base called 'Market History'.
Create a field in this table called 'Date' with the type 'Date'. We want this field to contain sequential dates, one day apart. In the first record, select the earliest date you want market data for. In the next record, select the day after that. Then, highlight both cells, drag down the fill handle, and Airtable will fill the other records with sequential dates.
Take a look at this Airtable support article for more information. You can also automate this using Airtable Automations, e.g. if you want a dynamic date range.
Add Data Fetcher to your base from the Airtable marketplace. This is a free extension that lets us import data from any cryptocurrency API like CoinGecko, Binance or CoinMarketCap.
After you have added Data Fetcher to your base, you will need to create a free Data Fetcher account. Enter a password and click 'Sign up for free' or click 'Continue with Google'. Signing up for an account keeps your details secure. It's separate from your Airtable account.
We will create a request to import historical crypto market data from CoinGecko. Requests in Data Fetcher are how you import data to/ from your Airtable base.
On the home screen of the Data Fetcher extension, click 'Create your first request'.
On the create request screen in Data Fetcher, for Application, select 'CoinGecko'.
The Endpoint determines what data we want to import from CoinGecko to Airtable. Select 'Get historical data at a given date for a coin'.
Enter a Name for your request, e.g. 'Import Historical Data'.
Click 'Save & Continue'.
For Coin, select the cryptocurrency you want to get historical data for, e.g. 'Bitcoin'.
For Date, we want to insert a reference to our 'Date' field. This means Data Fetcher will use the values from our Airtable 'Date' field and import the market data for each. Click the + button on the right-hand side.
On the modal, select 'Market History' for Table, 'Date' for Field and 'Grid view' for Run for every record in view. Then click 'Confirm'.
Date will now contain a reference to the 'Date' field in your table.
Select the Output Table & View you want to import CoinGecko data into.
Click 'Save & Run'.
Next, you need to configure how the available fields from CoinGecko are mapped to the fields in your output table. When you run the request for the first time, the Response field mapping modal will open, where you can do this.
For each CoinGecko field, you can either import or filter it. For an imported field, you can set whether to map them to an existing field or create a new field. For new fields, you can set the field type.
Click 'Filter all' to remove all the fields.
We will now import all the relevant fields. In the 'Find field' input, enter 'USD'.
Click 'Save & Run' in the bottom right.
Data Fetcher will create the new fields in the output table, then run the request again and import the historical crypto data to Airtable.
At the moment, we have to manually run the request and import the historical data from CoinGecko. We can use Data Fetcher's scheduled requests feature to do this automatically.
This is a paid feature, so you need to upgrade. In Data Fetcher, scroll to Schedule and click 'Upgrade'.
A new tab will open where you can select a plan and enter your payment details to upgrade.
Return to the Data Fetcher extension and click 'I've done this'.
Under Schedule click '+ Authorize'.
A new window will open where you'll need to authorize the Airtable bases for Data Fetcher to access.
We recommended selecting 'All current and future bases in all current and future workspaces' to avoid having to authorize bases in future requests.
Click 'Grant access'.
In Data Fetcher, Schedule this request is now switched on.
Select how often you want the request to run, e.g. 'Every hour'. Click 'Save'.
The request will now run on the schedule and import historical crypto market data from CoinGecko automatically. This will work even if you are not logged into Airtable or Data Fetcher.
Oct 11, 2022•