Command-line tool for converting currencies using Open Exchange Rates.
npm install -g curcon
Export your Open Exchange Rates App ID in your startup file (~/.bashrc
, ~/.bash_profile
, etc).
export OPEN_EXCHANGE_RATES_APP_ID=...
Remember to source your startup file (
source ~/.bashrc
) or restart your terminal.
Convert 100 Canadian dollars to Japanese Yen:
# curcon amount from to round-to
curcon 100 cad jpy 2
amount: Number
The amount to convert. Defaults to 1.from: String
Any valid currency code such as CAD. Defaults to CAD.to: String
Any valid currency code such as JPY. Defaults to JPY.round-to: Number
The number of decimal places to round to. Defaults to 2.
MIT