Xe is a dead-simple way of converting between currencies. It uses real-time conversion rates from Xe.com
iex(1)> Xe.rates("USD", "EUR")
{:ok, {1.00, 0.891482}}
- Add
xe
to your list of dependencies inmix.exs
:
def deps do
[{:xe, "~> 0.0.1"}]
end
-
Drink your 🍵
-
Enjoy!