EODhistoricaldata.com provides historical data on stocks, ETFs, mutual funds, bonds, indices, crypto, and forex pairs from more than 60 exchanges and 120,000 tickers around the world.

In this tutorial, you will learn how to connect the EOD Historical Data API to Google Sheets in 5 steps:

  1. Install the Apipheny Add-on
  2. Obtain an Access Token
  3. Choose an EOD Historical Data endpoint
  4. Enter Your EOD Historical Data API request into Apipheny
  5. Run the EOD Historical Data API request in Your Google Sheet

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

To pull data from the EOD Historical Data 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, save API requests, schedule API requests, and more. Click here for more info about Apipheny.

1. Install Apipheny by opening the following link in on desktop and then clicking the Install button on the page: https://gsuite.google.com/marketplace/app/apipheny/966163326746

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.

Then just click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

Step 2.) Obtain an Access Token

After logging into your EOD Historical Data account, you should see the API token displayed on your screen:

Copy your token to a safe location, because you’ll need it in the next steps.

Step 3.) Choose an EOD Historical Data Endpoint

In this section, we’ll show you how to browse the EOD Historical Data API documentation to find the API URL which retrieves the information you need from your account. If you already know your URL, or if you want to use the same example URL as us, just skip to Step 4.

First, open the EOD Historical Data API documentation page: https://eodhistoricaldata.com/financial-apis/

The main section of the page contains a list of categories, each with its own endpoints:

An example endpoint is Stock Price Data API (End-Of-Day Historical Data), which gets historical stock price data. The URL for this endpoint is:

https://eodhistoricaldata.com/api/eod/MCD.US?api_token={your_api_key}

If you use this URL, don’t forget to replace {your_api_key} with your actual API key.

The endpoint’s documentation contains a table of contents, a short description of the endpoint’s purpose, the endpoint URI, a list of the accepted parameters and additional sections with details about supported dates and date formats:

All API calls to Historical Data should be made with this base URL:

https://eodhistoricaldata.com/api/

Step 4.) Enter Your EOD Historical Data 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 3, we explained how you can find the EOD Historical Data REST API endpoint that you need. Now copy and paste your complete EOD Historical Data 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 Fundamental Data: Stocks, ETFs, Mutual Funds, Indices endpoint, which gets the fundamental data feed. This is what the whole URL looks like:

https://eodhistoricaldata.com/api/fundamentals/AAPL.US?api_token={your_api_key}

Don’t forget to replace {your_api_key} with your actual API key, if you’re following the same example.

Headers are not required for this API request, you can leave that section blank in Apipheny.

Here’s what our API request looks like entered into Apipheny:

Step 5.) Run the EOD Historical Data API Request in Your Google Sheet

The last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the EOD Historical API data to be imported into your Google Sheet.

Here’s what our request looked like when completed:

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

After making a successful request to the EOD Historical Data API, try querying a different EOD Historical API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as:

  • Save and schedule your EOD Historical Data API request
  • Make a POST request to the EOD Historical Data API (if available)
  • Use the custom =APIPHENY() function to call the EOD Historical Data API request inside your spreadsheet
  • Create an API request by referencing the value of a cell in your EOD Historical Data API URL with three curly braces eg. {{{Sheet1!A1}}}

Related articles:

Related Posts