# UnitfulForex.jl — foreign exchange rates as Unitful.jl units

**URL:** <https://discourse.julialang.org/t/unitfulforex-jl-foreign-exchange-rates-as-unitful-jl-units/56572>\
**Category:** Finance and Economics\
**Tags:** announcement, unitful\
**Created:** [March 5, 2021, 4:07pm UTC](https://discourse.julialang.org/t/unitfulforex-jl-foreign-exchange-rates-as-unitful-jl-units/56572 "2021-03-05T16:07:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidpatil](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sidpatil](https://discourse.julialang.org/u/sidpatil)\
**Post date:** [March 5, 2021, 4:07pm UTC](https://discourse.julialang.org/t/unitfulforex-jl-foreign-exchange-rates-as-unitful-jl-units/56572/1 "2021-03-05T16:07:52Z")

</div>

[https://github.com/spatil47/UnitfulForex.jl](https://github.com/spatil47/UnitfulForex.jl)

This is a tiny script which automatically creates Unitful.jl units from foreign exchange rates published at [http://exchangeratesapi.io/](http://exchangeratesapi.io/).

I’m still quite new to Julia. I’d like to turn this script into an actual package, with more options for exchange rate data sources, historical rate selection, etc. A while back, I discovered the UnitfulCurrency.jl package, and much more recently discovered the JuliaFinance package—it might be worth it to rewrite the script/package around these packages.

Anyway, I hope someone finds this useful.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [March 5, 2021, 6:05pm UTC](https://discourse.julialang.org/t/unitfulforex-jl-foreign-exchange-rates-as-unitful-jl-units/56572/2 "2021-03-05T18:05:24Z")

</div>

I made a small package for calculations with currency amounts and exchange rates which goes into a similar direction - maybe this is helpful for you:

[https://github.com/lungben/CurrencyAmounts.jl](https://github.com/lungben/CurrencyAmounts.jl)
