Do you manually import data from Bloomberg every day to track stocks & financial metrics? Want to automate the entire process by setting it up one time and getting updated data everyday? Read on.
We’ll use Amigo Data, a Google Sheets extension to help fetch and update data directly from Bloomberg API without needing any code.
Steps to import Bloomberg data to Google Sheets
- Install the Amigo Data add-on
- Get the Bloomberg API key
- Choose the data endpoint
- Import data to Google Sheets
How to import Bloomberg data to Google Sheets
Here’s the step-by-step guide to import Bloomberg data to Google Sheets.
Step 1: Install the Amigo Data add-on in Google Sheets
We need a tool with which to import Bloomberg data to Google Sheets. For this, we’ll use Amigo Data, a simple but versatile Google Sheets extension that’s easy to use, rich in features, and gives you the ability to pull data from several different sources.
You can get it from the Google Workspace Marketplace here.
Alternatively, you can open a Google Sheets document, then go to Extensions→Add-ons→Get add-ons. And search for Amigo Data and install it.
Once the installation is complete, we can move on to the next step: getting the API key.
Step 2: Generate a key
In order to access the Bloomberg database, we’ll need a key called the API key. It is a code used to identify and authenticate access.
Since Bloomberg doesn’t have any official API, we will use a third-party Rapid API – an API marketplace
Follow the steps below to get an API key from RapidAPI.
Sign up for RapidAPI
Once you’re logged in, go to the Bloomberg API documentation page in RapidAPI
Choose a subscription plan from the Pricing menu. Choose the Basic option.
You will receive a message of successfully subscribing to the API service. Click on the API documentation option
Scroll down a bit and you will find your API key
Step 3: Choose an endpoint
For this tutorial, we will import the data about market movers in Dow Jones Industrial Average. So, expand the market menu option and select the market/get-movers option.
The header parameter consists of the API key and API host. In the required parameters we have to input the name of the index according to the symbols used by Bloomberg.
In the id block under the required parameters section, nky:ind is a symbol for Nikkei Index. In this tutorial, our objective is to import market mover for Dow Jones Industrial Average. Therefore, we will enter indu:ind as the id string in the required parameters where indu is the symbol used by Bloomberg for Dow Jones.
On the right side under code snippets, select shell-> cURL from the dropdown menu
Copy the URL excluding the apostrophes and also note down the headers. This is the endpoint URL for the data to import to Google Sheets.
Step 4: Import Bloomberg data to Google Sheets
Go back to Google Sheets and launch the Amigo Data extension.
Select Custom API from the list of sources
Paste the endpoint in the API URI bar
Then expand the Details tab and enter the following as headers:
Name: X-RapidAPI-Host, Value: bb-finance.p.rapidapi.com
Name: X-RapidAPI-Key, Value: your_key
Replace your_key with your RapidAPI key.
Then click the PREVIEW button
Flatten the data points and then click IMPORT.
A snippet of the imported data.
You can likewise import other types of data from Bloomberg. Following are some other examples.
Financials of stock
Under the stock section, select stock/get-financials. In the required parameter section, type in the Bloomberg symbol of the stock and country code separated by a colon. You can go through the Nasdaq stock screener to find the symbol of the desired stocks.
For example, the ticker symbol for Apple is
aapl:us (aapl is for Apple and us for the United States)
tcs:in (tcs is for TCS stock and in for India)
Copy the URL link from the code snippet by changing the code language to Shell -> cURL and also note down the headers to add them in the details section of the Amigo Data. The steps are quite similar to the ones we discussed above.
Statistics of stock
Under the stock section, select stock/get-financials. Type in the Bloomberg symbol of the stock and country code separated by a colon inside the textbox against the id parameter.
Under the news section, select news/list. In the required section, we can specify the type of news we are interested in. We can choose from a wide range of types of news mentioned in the documentation
You can go through the documentation page, you can explore more endpoints, and try them out.
After importing the data, you can also set a refresh schedule so that the data are updated automatically at regular intervals. To learn how to set a refresh schedule, follow this link.
There are several other types of data that you can import into Google Sheets using Amigo Data such as Marketstack data, Coinmarketcap data, Nasdaq data, and many more.
Some related articles you may be interested in: