Import Currency Rates Into Excel With Power Query - Part 1
Tags: currencyrates, msexcel, powerquery, forexdata
Published: 2023-05-15 12:04:08

We think that everyone should have access to forex data. Therefore, we created an easy-to-follow guide to let Excel users access the exchange rates. You will discover how to use Power Query to import and change real-time FX rates in Excel. Anyone with a basic understanding of Excel should be able to follow the tutorial since it doesn't require any programming skills.

Please read our guide on the Excel Add-In if you don't care about power queries and would prefer to utilize our Add-in to import Forex and CFD data into Microsoft Excel. A video is also included with the story.

You must sign up for our API and open an Excel spreadsheet before we can begin. Not to worry. It happens quickly.
You may see this tutorial as a video as well:

[You must sign up for our API and open an Excel spreadsheet before we can begin. Not to worry. It happens quickly.
You may see this tutorial as a video as well:

{% embed https://youtu.be/PUUwaHt75rw %}

### Let's start!

### Part I
**Step 1**

Please click Data in the spreadsheet. Then, as displayed below, click From Web (To import data from the web).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ar4z6kr2y9wztgmyquk4.png)

First, log in now. Then go to our documentation page and copy the Live endpoint's URL as displayed below.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbwca621we68qb5qi5al.png)

**Step 2**
After copying the URL, paste it into the Excel box and hit OK.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3z7xo6l5zfgd38yypx0.png)

**Step 3**
Your browser will take you to another box when you click OK. Drill down by selecting List from the context menu (next to the quotes), as seen below.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h10ke6t08zfdubd5y4yu.png)

**Step 4**
When you click, a redirect will appear. Once more, using the right-click menu, select List and select "To Table," as shown in the figure below. There will be a box. Please press OK to close that box.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjl8vau6mhy61ylaqqw8.png)

**Step 5**
Click the box with two arrows to the right of column 1 on the following page. To utilize the original column name as a prefix, uncheck the box and click "OK."

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k10ecbuc0q4dkiiaxeb8.png)

**Step 6**
Live rates will now appear in the boxes; click close and load in the top left corner.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l514c4768bde44e6hxs.png)

That's it! You may now access real-time exchange rates in an Excel spreadsheet. To get the most recent prices, reload this page.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qk0tjantdtmuzw37a4mz.png)

Excel FX rates are nice things, but we're still not there yet because we'll need to adjust when we need new rate sets. Not to worry. We'll demonstrate how simple it is. 

We need to know how to alter the request we make to the API in the future. So, it would be beneficial to break it out in detail before we start.

### Part II
If you recall, in Step 2, we copied and pasted the URL from the documentation page. But only if we comprehend what the URL contains. Our request and the resulting data in the table cannot be changed. In the example below, we're asking for EURUSD, GBPUSD, and UK100:

```
"marketdata.tradermade.com/api/v1/live?
currency=EURUSD,GBPUSD,UK100&api_key=your-api-key"
```

This can be changed by doing the following actions:

```
"marketdata.tradermade.com/api/v1/live?
currency=USDJPY,EURGBP,EURJPY,USDCHF&api_key=your-api-key"
```
The data return will be consistent because USDJPY, EURGBP, EURJPY, and USDCHF have been added.

We know what needs to change now. Let's put it into action first. Click twice on the 'connection' on the right side of the spreadsheet and the 'live connection' under queries, as shown below.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbu1j56jdf6pblbjnx3c.png)

When the Query window appears, select Advanced Editor under View.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nfuhjusig10th4f59s6z.png)

Replace the previous currency string with the new one in the Advanced Editor, then click "Done"- as displayed below.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6nc2oout54uatmtd8ezj.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tu4y0cvgydc1z8us5nh0.png)

If you don't like the columns set up, you may also drag and drop them. Once finished, click the home button. Then select "close" and "save," and the spreadsheet will display the updated rates.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w54qcmnur86nqbj2ntxi.png)

If you observe, columns have been moved, and rates have been changed. That's how easy it is.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/470osmlajfsbm48d2vr0.png)

You can also change requests directly from the spreadsheet, among other dynamic changes. But that is the subject of another lesson in this series. As we all know, learning new ideas may be overwhelming. 

Additionally, historical forex data will be covered in the course that follows. We anticipate that this guide will help encourage non-programmers to use our data. 

Contact us if you have any inquiries. We are also open to recommendations for tutorials.

TraderMade provides reliable and accurate Forex data via its [Forex API](https://tradermade.com/forex). You can sign up for a free API key and start exploring real-time and historical data at your fingertips.


> Also, go through the originally published tutorial on our website: 
> [Import Currency Rates Into Excel With Power Query - Part 1](https://tradermade.com/tutorials/import-currency-rates-into-excel)

> Along with that, please read the following tutorials that help you get live and historical forex data into MS Excel and Google Sheets and plot graphs and charts for better market analysis:
> 1. [Importing Live Forex Data into Excel Using Excel Add-In](https://tradermade.com/tutorials/how-to-import-live-forex-cfd-data-in-excel-using-our-add-in)

> 2. [Tutorial for Plotting Forex Charts in Excel](https://tradermade.com/tutorials/how-to-plot-forex-charts-in-excel)

> 3. [Obtaining Forex & CFD Data into Google Sheets](https://tradermade.com/tutorials/how-to-get-forex-data-in-google-sheets)