noecamacho / currency-converter-shell

Tired of entering websites to get currency conversion? use your terminal and seize the day :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreign exchange rates API with currency conversion

Available Codes

Code Origin Currency
USD US dollar
JPY Japanese yen
BGN Bulgarian lev
CZK Czech koruna
DKK Danish krone
GBP Pound sterling
HUF Hungarian forint
PLN Polish zloty
RON Romanian leu
SEK Swedish krona
CHF Swiss franc
ISK Icelandic krona
NOK Norwegian krone
HRK Croatian kuna
RUB Russian rouble
TRY Turkish lira
AUD Australian dollar
BRL Brazilian real
CAD Canadian dollar
CNY Chinese yuan renminbi
HKD Hong Kong dollar
IDR Indonesian rupiah
ILS Israeli shekel
INR Indian rupee
KRW South Korean won
MXN Mexican peso
MYR Malaysian ringgit
NZD New Zealand dollar
PHP Philippine peso
SGD Singapore dollar
THB Thai baht
ZAR South African rand
EUR European euro

Installation

Alternatives to run this code:

  • You can download this project and execute the file as bash convert.sh
  • Make it executable with chmod +x convert.sh and run it as ./convert.sh
  • Edit your bash config file: vim ~/.bashrc and create a function at the bottom to the file with your desired function name, refresh the file with source .bashrc.

Usage

# convert $1500 American dollars to Mexican pesos
$ ./convert 1500 USD MXN

# OUTPUT:
 πŸ’΅ 1 USD = πŸ’²19.225282167 MXN
 πŸ’± 1500 USD = πŸ’²28837.923250500 MXN
# convert $2334 Euros to Canadian dollars
$ ./convert 2334 EUR CAD
# OUTPUT:
 πŸ’΅ 1 EUR = πŸ’²1.4661 CAD
 πŸ’± 2334 EUR = πŸ’²3421.8774 CAD

Source of data

Exchange rates API is a free service for current and historical foreign exchange rates published by the European Central Bank

Euro foreign exchange reference rates The reference rates are usually updated around 16:00 CET on every working day, except on TARGET closing days. They are based on a regular daily concertation procedure between central banks across Europe, which normally takes place at 14:15 CET.

About

Tired of entering websites to get currency conversion? use your terminal and seize the day :)


Languages

Language:Shell 100.0%