Our Crypto API Tutorials:

Binance API | Bitfinex API | Bitmex API | Coinbase API | Coingecko API | Coinmarketcap API | CoinAPI | OpenSea API

You might also like:

  • CoinStats: a portfolio manager for tracking crypto holdings from multiple wallets and exchanges
  • Best Crypto APIs: a comprehensive list of the best APIs for cryptocurrency traders, hodlers, and devs

How to connect the Bitfinex API to Google Sheets

Bitfinex facilitates a graphical trading experience with advanced charting functionality that allows traders to visualize orders, positions and price alerts, tap to modify order properties, and annotate to their trading strategy. We can use the Bitfinex API to import public data from Bitfinex into Google Sheets. In this tutorial, we’ll show you how to connect the Bitfinex REST API to Google Sheets in 4 steps:

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

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

To pull data from the Bitfinex API to Google Sheets, first install and open the Apipheny Google Sheets add-on.

Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more. 

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

2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons or Extensions option in the top menu. In the add-ons menu, you should see Apipheny.

Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

Opening the Apipheny add-on in Google Sheets
Opening the Apipheny add-on in Google Sheets

Step 2.) Choose a Bitfinex endpoint

In this section, we’ll show you how to browse the Bitfinex API documentation to find the endpoint that retrieves the information you need from your account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 3.

First, open the Bitfinex API documentation page: https://docs.bitfinex.com/docs/introduction

The menu on the left contains the Introduction, Rest and Websocket sections:

Bitfinex API documentation page
Bitfinex API documentation page

In the Rest section, you should find the Public Endpoints and Authenticated Endpoints subsections. Keep in mind that our tutorial covers only the Public Endpoints subsection; Authenticated Endpoints do not currently work with Apipheny.

Public Endpoints section
Public Endpoints section

In this subsection, we can find a list of links to the public endpoints’ documentation pages: 

Public endpoints list
Public endpoints list

If we click on any of these links, the relevant documentation page will be displayed, along with the entire list of public endpoints.

An example endpoint is Book, which allows you to keep track of the state of Bitfinex order books, on a price-aggregated basis, with customizable precision. The URL for this endpoint is:

https://api-pub.bitfinex.com/v2/book/Symbol/Precision

If you use this URL, don’t forget to replace Symbol and Precision with real values!

The endpoint’s documentation contains a short description of its purpose, followed by its HTTP method (GET), the cURL command, the path and query parameters it uses and an example response:

Endpoint documentation
Endpoint documentation

All endpoints can be accessed using the following base domain https://api-pub.bitfinex.com/v2/ 

All endpoints should be appended to this base domain.

Step 3.) Enter your Bitfinex 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 or POST) 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 Bitfinex REST API endpoint that you need. Now copy and paste your complete Bitfinex 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 Funding Stats endpoint, which gets a list of the most recent funding data for the given currency: FRR, average period, total amount provided, total amount used. This is what the whole URL looks like:

https://api-pub.bitfinex.com/v2/funding/stats/Symbol/hist

If you use this URL, don’t forget to replace Symbol with a real value! We replaced it with fUSD.

Headers aren’t required. You can leave the Headers section blank in Apipheny.

  Bitfinex API request entered into Apipheny
Bitfinex API request entered into Apipheny

Step 4.) Run the Bitfinex API request in your Google Sheet

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

 Bitfinex data imported into Google Sheets
Bitfinex data imported into Google Sheets

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

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


API Tutorials



Related Posts