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:
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.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
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.
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/
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
If you use this URL, don’t forget to replace your_api_key with your actual API key.
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:
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:
Related article: how to get technical analysis indicator data into Google Sheets
Crypto API Tutorials: