Fetch xe.com exchange rates from your terminal. Any currency pair, any date. Shell-scriptable.
| Flag | Description | Default |
|---|---|---|
-f, --from-ccy |
Source currency (ISO-4217 code) | RUB |
-t, --to-ccy |
Target currency (ISO-4217 code) | USD |
-d, --date |
Date for the rate (YYYY-MM-DD) | — |
-a, --amount |
Amount to convert | — |
-m, --math |
Calculate amount from expression, then convert | — |
-s, --strip-extra |
Output rate only — perfect for piping to bc |
off |
-R, --show-rate |
Always display the exchange rate | off |
-v, --version |
Print version and exit | — |
Short forms are also supported for quick use:
xe.com <DATE> — uses default currency pair
xe.com <FROM> <TO> <DATE> — explicit pair
xe.com <FROM> <TO> <DATE> <AMOUNT> — with conversion
Set default currency pair via environment variables so you don't have to type them every time.
Add these to your .bashrc or .zshrc:
Built with Go. Clone and build: