Forum Discussion
Beginner - exchange rate API
- 5 years ago
DennisSchlein
We are all always learning;
if you just open Advanced editor then you can replace your code with mine - remember to add in the key.
Get Data --> From Web -- Click on AdvancedAnother option to get data for multiple dates would be to use the timeseries mentioned in the documentation but this looks like it is dependent on the subscription you have.
Regarding getting data for different dates, as mentioned by amitchandak Chris Webbs cross join blog will help.
Hey, I know this is an older thread but it still comes up in search so just wanted to share what worked for me.
I've used both AllRatesToday (allratestoday.com) and Exchange Rate API (exchange-rateapi.com) — both have free tiers, 160+ currencies, and mid-market rates from Reuters. No credit card
needed.
Here's the Power Query I use:
let
Source = Json.Document(
Web.Contents(
"https://exchange-rateapi.com/api/v1/rates",
[
Headers = [Authorization = "Bearer YOUR_API_KEY"],
Query = [source = "USD", target = "EUR,GBP,JPY"]
]
)
),
ToTable = Table.FromList(Source, Splitter.SplitByNothing()),
Expanded = Table.ExpandRecordColumn(ToTable, "Column1", {"source", "target", "rate", "time"})
in
Expanded
AllRatesToday also has a similar endpoint if you want to try both and see which fits your workflow better:
let
Source = Json.Document(
Web.Contents(
"https://api.allratestoday.com/v1/latest",
[Query = [base = "USD", symbols = "EUR,GBP,JPY"]]
)
)
in
Source
Quick tip: use the Query option in Web.Contents instead of string concatenation — avoids the ? / & issues and works better with Power BI's privacy settings.