In this tutorial, we'll import OpenSea NFT collection stats to Airtable. OpenSea is a digital marketplace for buying and selling digital items such as crypto collectibles and non-fungible tokens (NFTs).
Using the Data Fetcher app, we'll import various stats from OpenSea such as the 'seven day average price', 'total supply' and 'total volume'. We'll also schedule our OpenSea NFT collection stats to sync with Airtable automatically.
Firstly, create a table in your Airtable base called 'Stats'.
Change the name of the primary field to 'Slug' (or add a new field called 'Slug') then add the slugs of the collection stats you want to import.
To find a slug, search for the collection on OpenSea, then copy the slug from the end of the URL. E.g. 'mutant-ape-yacht-club' is the slug from this URL: https://opensea.io/collection/mutant-ape-yacht-club
Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'. If you already have a Data Fetcher account, sign in using the grey 'Have an account?' button at the bottom left of the box.
Requests in Data Fetcher are how you import data to or send data from your Airtable base. We will create a request to import NFT collection stats from OpenSea into Airtable.
On the home screen of the Data Fetcher app, click 'Create your first request'.
On the create request screen in Data Fetcher, for Application, select 'OpenSea'.
For Endpoint select 'Stats for a collection'.
Enter a Name for your request, e.g. 'Import Collection Stats'. Then click 'Save & Continue'.
For Collection slug, we want to insert a reference to our 'Slug' field in our 'Stats' output table. To do this, click the + button.
Then, on the modal that opens, select 'Stats' for Table, 'Slug' for Field, 'Grid view' for Run for every record in view. Then click 'Confirm'.
Collection slug should now contain a reference to the output table.
Make sure the Output Table & View is set to your 'Stats' table.
Click 'Save & Run'.
The request will run and the Response field mapping modal will open. This is where you set how the available fields from OpenSea should map to the fields in the output table.
For each OpenSea field, you can choose to import or filter it. We are going to import 'Seven day average price', 'Total supply', 'Total volume', 'Floor Price' and 'Num owners' (i.e. Number of owners). For an imported field, you can set whether to map to an existing field or create a new field and also set the field type using the dropdown.
Then click 'Save & Run'.
Data Fetcher will create any new fields in the output table and run the request for each collection to import the stats into Airtable.
At the moment, we have to manually run the request to import the OpenSea collection stats. We can use Data Fetcher's scheduled requests feature to automatically import or update them every 15 minutes/ hour/ day etc.
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 app and click 'I've done this'.
Click 'Add API key' in order to add your Airtable API key. You can find your Airtable API key here.
Enter your Airtable API key and click 'Save'.
Enable Schedule this request.
Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save' The request will now run on the schedule and import the OpenSea NFT collection stats automatically.