Crypto API tutorials and more:


How to get data from the FTX API into Google Sheets

FTX is a popular cryptocurrency exchange. We can use the FTX API to import data from FTX into Google Sheets. In this tutorial, we’ll show you how to connect the FTX REST API to Google Sheets in 4 steps:

  1. Install the Apipheny add-on
  2. Choose a FTX endpoint
  3. Enter your FTX API request into Apipheny
  4. Run the FTX API request in your Google Sheet

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Choose an FTX endpoint

An endpoint is an API URL that returns the specific data you want from FTX. In this section we’ll show you how to browse the FTX API documentation to find the URL that returns the specific data you need. If you’d like to see specific examples of URLs you can use, just skip to the next section.

To browse endpoint URLs and query requirements, go the FTX API documentation page here: https://docs.ftx.com/?python#rest-api

All FTX endpoint URLs are created by appending an endpoint-specific path to the root URL:

https://ftx.com/api/

In this tutorial, we will discuss two types of endpoints available from the FTX API:

  1. Endpoints that do not require authentication (Public endpoints)
  2. Endpoints that do require authentication (Signed endpoints)

This tutorial covers how to use the public endpoints that do not require authentication. Example categories from the FTX API documentation that have public endpoints which require no API key are Markets (https://docs.ftx.com/?python#markets)  and Futures (https://docs.ftx.com/?python#futures).

Signed FTX API endpoints that require HMAC SHA256 will not currently work with Apipheny, but endpoints that do not require HMAC SHA256 will work. Some FTX API endpoints require HMAC SHA256 and others don’t. The reason signed endpoints don’t currently work with our app is because they require an additional parameter called signature, a keyed HMAC SHA256 signature with your secretKey as the key, and a concatenation of all the query’s parameters as the value passed to the HMAC operation. Signed endpoints also require a timeStamp parameter, populated with the request’s millisecond timestamp. You can tell if an endpoint is signed or not because when you look at the documentation for that endpoint, it will say Requires authentication next to its name, as seen in the screenshot below:

Requires authentication section
Requires authentication section

Once you’ve looked through the FTX API documentation and chosen a public endpoint you want to use, you can go ahead and enter the URL into Apipheny and run your request. In the next section, we’ll cover making a request in more detail, along with some example requests.

Step 3.) Enter your FTX API request into Apipheny

Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET, POST, PUT, etc.) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 2, we explained how you can find the FTX REST API endpoint that you need. Now copy and paste your complete FTX API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

For this example, we are using the Get markets endpoint, which displays a list of markets. This is what the whole URL looks like:

https://ftx.com/api/markets

And here’s what the URL looks like in Apipheny:

FTX API request entered into Apipheny
FTX API request entered into Apipheny

More Public Endpoint Examples

The List all futures endpoint which returns all futures on FTX. The URL for this endpoint is:

https://ftx.com/api/futures
The List all futures endpoint
The List all futures endpoint

The Get funding rates endpoint which returns all funding rates. The URL for this endpoint is:

https://ftx.com/api/funding_rates
Get funding rates endpoint
Get funding rates endpoint

Step 4.) Run the FTX API request

Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the FTX API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

FTX data imported into Google Sheets
FTX data imported into Google Sheets

That’s it! You’ve successfully connected your FTX account to Google Sheets using the FTX API, Google Sheets API, and the Apipheny add-on.

After making a successful request to the FTX API, try querying a different FTX API endpoint, or try using one of the more advanced features in the Apipheny add-on.


Crypto API tutorials and more:



Crypto API tutorials and more:


API Tutorials



API Knowledge

What is an API?

What is an API URL?

What are parameters?

What is an endpoint?

What is an API key/token?

What is basic authentication?

What are headers?

What is a GET request?

What is a POST request?


Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool

Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website