How To Pull Market Data From FTX To Google Sheets

Pull market data from FTX to Google Sheets
Reading Time: 4 minutes

FTX is a cryptocurrency exchange with more than a million users. It has market data on cryptocurrencies as well as fiat currencies and stock data. Using its API we can data such as spot market, futures market, data on market volatility, and prediction markets data.

You can easily import all these data into Google Sheets in a heartbeat by using an extension Amigo Data and then get the data updated every heartbeat–which you can then get it delivered to your email inbox. The data are automatically updated–they flow into Google Sheets and then to your inbox seamlessly. Amigo makes manual retrieval of data antiquated.

So here we’ll learn how to pull market data from FTX to Google Sheets using Amigo Data. Below are the steps to import FTX data into Google Sheets:

  1. Install the Amigo Data extension
  2. Get the endpoint URL of the data
  3. Import the data to Google Sheets

How to pull market data from FTX to Google Sheets

Install the Amigo Data extension for Google Sheets

Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace.

Amigo Data in Google Marketplace

Click here to install.

Alternatively, you can get it from Google Sheets.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

Get the endpoint URL of the data to import

Market and futures data from FTX can be accessed without authentication, ie, they do not require API key. While private data such as account wallet information, and orders information require an API key. (Check this link for details on how to generate a key.)

For the purpose of this tutorial, we’ll import data that require no authentication: market data and futures data.

Go to docs.ftx.com. On the documentation page is a list of all APIs with their endpoints.

List of available APIs

Click on any of the categories to uncover the available endpoint, eg, Markets. Then click on the endpoint (say, Get all markets) to get the request URL or fill in the parameters.

Selecting the endpoint for all markets data

The generic endpoint can be found under the title of the endpoint. The custom one on the right. Click the Try It! button to run the request.

Running the request

The result along with the data to be expected will be displayed immediately below.

Response result of the request

Note the request URL and the header. They’ll be used to pull the data to Google Sheets.

The endpoint and header for the markets data

For the example considered here, the endpoint URL and the header are:

Header = accept: application/json

Import the data into Google Sheets

Now to back to Google Sheets and launch Amigo Data by clicking Extensions→Amigo Data→Connect.

Connect to Amigo Data from Google Sheets

Then select Custom API from the list of sources.

Select Custom API as the source to connect

Paste the endpoint URL in the API URL field.

Paste the endpoint in the API URL field

Then expand the Details tab and enter the header.

Entering the header values

Click the PREVIEW button. Flatten and expand the nested datasets and delete the columns that are not required.. Then click IMPORT.

Preview of the dataa

The data will be imported into Google Sheets in a short while. Below is the snippet of the data imported with the endpoint for all markets

Snippet of the imported data

Other types of data can be retrieved following the same procedure. Some endpoints however require inputting query parameters. Let us consider another example.

Select Get historical prices under Markets categories to retrieve historical spot prices or expired futures.

Endpoint for historical prices

In the PATH PARAMS field, specify the name and type of the market. Eg. AMZN/USD for Amazon spot prices. To get futures data, use -1230 following the ticker symbol (eg. AAPL-1230); and for perpetual futures, the format is AAPL-PERP. We can get market names from the all markets endpoint.

Specify the  QUERY PARARMSresolution (the interval) and the the start_time and end_time (in Unix timestamp).

The parameters for the historical prices endpoint

Then click the Try It! button to test the query. If all parameters are specified correctly, the result will be returned under RESPONSE.

Copy the endpoint URL and paste it in Amigo Data and enter the header to retrieve the data.

Once the data have been imported into Google Sheets from FTX, they can be updated automatically at regular intervals–hourly, daily, weekly or on custom days–should you so wish, and get these data sent to your inbox. Click here to learn how set a refresh schedule and set up alerts in Amigo Data.

Visit our blog for to find out about the kinds of data that you can import to Google Sheets and how you can track stock and other financial data from Google Sheets.

Some related articles you may be interested in:

Import Crunchbase Data To Google Sheets

Automate data imports from Bloomberg to Google Sheets

Import Data From Binance To Google Sheets

Leave a Reply

Discover more from Amigo: No-code Data Integrations to Google Sheets

Subscribe now to keep reading and get access to the full archive.

Continue reading