Importing public web API to Excel (no coding required) | Codementor (2024)

In the world of Forex and Cryptocurrency Trading, Data Scraping or Web Scraping is often needed so the data you needed is always in your hands. Good thing Microsoft Excel has tools to help you extract data from web sources with or without coding.
In this example, I’m going to show you how you can extract data from a public web API to excel without coding VBA. First, we need a public web API, because cryptocurrencies popular these days, we’re going to use a cryptocurrency API as an example.
https://min-api.cryptocompare.com/data/histominute?fsym=BTC&tsym=USD&limit=288&aggregate=5

To import this on excel go to Data>Get Data>From other Sources> From Web or simply Data>From Web.
Importing public web API to Excel (no coding required) | Codementor (1)

Paste the API URL on the prompt then click OK.
Importing public web API to Excel (no coding required) | Codementor (2)

Then select Into Table on the Convert tab.
Importing public web API to Excel (no coding required) | Codementor (3)

Select the Value of Data then right click>Drill Down.
Importing public web API to Excel (no coding required) | Codementor (4)

On the resulting prompt choose Transform>To Table on the menu then click OK.
Importing public web API to Excel (no coding required) | Codementor (5)

On the top of the column, click the button with left and right arrow, uncheck use Original name as prefix then click OK. Then finally, Click Close & Load on the Home menu.
Importing public web API to Excel (no coding required) | Codementor (6)

And there you go; you’ve successfully imported the JSON data from a public web API.
Importing public web API to Excel (no coding required) | Codementor (7)
You can click Refresh on the Query or Data Tab to get the latest data.

Though, for this Web API the time we retrieved is in a Unix timestamp. The next that we’re going to do is add a custom column and convert that to time and date format in Excel.

A quick Google Search would give us the formula =((([time] /60)/60)/24)+DATE(1970,1,1).
Importing public web API to Excel (no coding required) | Codementor (8)

To edit our query, go to Query>Edit or Data>Get Data> Launch Query Editor…
Importing public web API to Excel (no coding required) | Codementor (9)

On the query editor select Add Column>Custom Column then put out formula.
Importing public web API to Excel (no coding required) | Codementor (10)

The query editor uses a different language call Power Query formula so will replace our formula with its equivalent.
Importing public web API to Excel (no coding required) | Codementor (11)

Now we have a new column. Let’s convert the column to Date/Time format. To do that, select custom column and on the transform tab and select date/time on the Data Type drop down.
Importing public web API to Excel (no coding required) | Codementor (12)

Now we’ll replace the original time column. Move the custom column to the Beginning and remove the time column.
Importing public web API to Excel (no coding required) | Codementor (13)

Then rename the custom column to time and go to Home>Close & Load.
Importing public web API to Excel (no coding required) | Codementor (14)

Now our time column is in Date/Time instead of Unix timestamp.
Importing public web API to Excel (no coding required) | Codementor (15)

Now that the data is in Microsoft Excel you can now do you analysis and graphs to give you an edge to your Forex or Cryptocurrency trading.

See here for a demo video. Part1. Part2.

Importing public web API to Excel (no coding required) | Codementor (2024)
Top Articles
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 6037

Rating: 4.8 / 5 (68 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.