Import Binance API Data to Airtable

Mar 23, 2021Andy Cloke

In this guide, we'll learn how to import cryptocurrency prices from Binance to Airtable. Binance is a free source of crypto market data, e.g. coin prices, recent trades, exchange information and more. We will connect to Binance using the Data Fetcher extension and create a crypto tracker in Airtable.

Create Coins Table

Create a table in your base called 'Coins'. Change the name of the primary field to 'Symbol'. Binance uses crypto trading pairs for symbols, e.g. 'ETHBTC'. You can find out more about crypto trading pairs here. In your coins table, add the trading pairs you want data as records.

Screenshot 2021-12-29 at 13.11.21.png

Install Data Fetcher

Install Data Fetcher from the Airtable marketplace. After the extension launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'.

Group 1Data Fetcher Sign Up .png

Import Binance Data to Airtable

On the home screen of the Data Fetcher extension, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base. We will create a request to import prices from Binance.

click-create-your-first-request.png

On the create request screen in Data Fetcher, for Application, select 'Binance' to use the Binance Airtable integration.

binance-application-selected.png

Enter a Name for your request, e.g. 'Import Coin Prices'.

For Endpoint, select 'Latest price for a symbol or symbols'. This determines what data we want to import from Binance to Airtable.

Click 'Save & Continue'.

binance-save-continue.png

We want to use the values in the 'Symbol' field in our table when importing from Binance. Under Symbol, click the + button to insert a reference to the table.

binance-symbol-add-icon.png

A modal will open where we can create the table reference. For Field, select 'Symbol'.

Group 1(29).png

Click 'Confirm'.

Group 1(30).png

The Symbol now has a reference to our table.

Screenshot 2021-12-29 at 13.20.41.png

Select the Output Table & View you want to import Binance data into.

Screenshot 2021-12-28 at 14.50.05.png

Click 'Save & Run'.

binance-save-run.png

The request will run and the Response field mapping modal will open. This is where you set which fields to import from Binance and how they should map to your output table. For each Binance 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.

Filter out the 'Symbol' field.

Group 1(32).png

Change the field type of the 'Price' field to currency using the dropdown.

Group 1(33).png

Click 'Save & Run'.

Group 1(34).png

Data Fetcher will create the 'Price' field, then import the price from Binance for every symbol in the 'Coins' table.

binance-imported-prices-data.png

Build an Airtable Crypto Tracker

Now we can use our table of coin prices to build an Airtable crypto tracker. This will track the value of our crypto portfolio based on the amount we hold and the latest prices.

Create a second table in your base called 'Portfolio'. Add a field called 'Symbol' that is linked to the first table (the table you imported Binance prices into). Then add a field called 'Price' that is a lookup of the 'Price' field in the first table.

Screenshot 2021-12-29 at 13.42.17.png

Add a field called 'Exchange' with type 'Single select' with options for the coin exchanges you use, e.g. 'Binance', 'Coinbase' etc.

Screenshot 2021-12-29 at 13.42.50.png

Add a field called 'Balance' with type 'Number'. This is how many of the coin you have in that exchange. Add a formula field called 'Value' with the formula {Price}*Balance and select 'Currency' formatting.

Screenshot 2021-12-29 at 13.43.25.png

We now have a built an Airtable crypto tracker that updates when time we run the request. You can see the total value of your portfolio in the Airtable summary bar.

Group 1(35).png

Automatic Binance Airtable integration

At the moment, we have to manually run the Binance Airtable integration and import the prices from Binance. We can use Data Fetcher's scheduled requests feature to automatically update them every 15 minutes/ hour/ day etc.

In Data Fetcher, scroll to Schedule and click 'Upgrade'.

Group 1(23).png

A new tab will open where you can select a plan and enter your payment details to upgrade.

data fetcher upgrade pricing plans.png

Return to the Data Fetcher extension and click 'I've done this'.

Schedule Data Fetcher

Under Schedule click '+ Authorize'.

Schedule Data Fetcher

A new window will open where you can authorize the Airtable bases you want Data Fetcher to be able to access.

It's recommended to select 'All current and future bases in all current and future workspaces' meaning you'll avoid the need to unauthorize bases in the future.

Click 'Grant access'.

schedule-authorize-bases.jpg

In Data Fetcher, you'll now see Schedule this request is toggled to on.

Schedule this request

Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save' The Binance Airtable integration will now run on the schedule and import prices from Binance automatically.

Group 11(2).png

Related Posts

How to Connect to the Coinbase API in Airtable with No-Code

How to Connect to the Coinbase API in Airtable with No-Code

Oct 11, 2022

Rosie Threlfall

CoinbaseCryptocurrency
How to Create an Airtable Crypto Tracker

How to Create an Airtable Crypto Tracker

Apr 12, 2022

Rosie Threlfall

Cryptocurrency
Import Historical Crypto Market Data in Airtable

Import Historical Crypto Market Data in Airtable

Feb 17, 2022

Andy Cloke

CoinGeckoCryptocurrency