Marketstack, formerly known as WorldTradingData, is a provider of global stock and indices data. Marketstack returns real time data for stocks and indexes globally. Their endpoints are extremely easy to use and their database can return up to 500 different stocks or indexes into your Google Sheets using the directions below.
In this tutorial I’ll show you how to import Marketstack API into Google Sheets using the Apipheny add-on:
Apipheny is an API integrator for Google Sheets. You can use Apipheny to connect to unlimited API data sources, make unlimited API requests to any endpoint, and more. Click here to learn more about Apipheny.
1.) Install Apipheny by opening the following link 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 Add-Ons in the menu at the top.
When the menu opens, you should see Apipheny.
Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheet.
The next thing you need to do is sign up for an account at Marketstack.
Click here to register for Marketstack. The basic plan is free.
After you create an account, you’ll need to verify your email by clicking the link in the email that was sent to you.
After you verify your account and sign in, you’ll see your Marketstack API key on your dashboard:
Now keep this window open or copy and paste your key somewhere safe because you’re going to need it in a second.
Note: this process might have changed a little bit, but should be very similar.
Now that we have our API key, we need to construct our marketstack API URL.
Click here to read the Marketstack API documentation to learn how to structure your API request.
Here is an example API URL for Marketstack:
In this example API URL, you can see that the stock that we are requesting data for is AAPL.
You can enter any one or more companies in place of AAPL to get data from, just separate them by comma
Also, where it says “YOUR_ACCESS_KEY” is where you will place your API token that you got in your dashboard.
Your next step is to enter your API URL into the Apipheny app.
If you want to use a demo URL, you can use this one:
Just copy and paste your whole API URL into the Apipheny add-on, like this:
Once you have your API URL entered into the Apipheny app, just click Run and you’re done! Your stock and forex data from the Marketstack API will automatically import into your Google Sheet.