Short: Simple command line currency converter Author: ahoffman.clear.net.nz@gmail.com (Anthony Hoffman) Uploader: ahoffman clear net nz gmail com (Anthony Hoffman) Type: util/rexx Version: 2.0 Replaces: util/rexx/Convert.lha Requires: Amiga compatible system with TCP/IP Stack Architecture: m68k-amigaos Distribution: Aminet ------------------------------------------------------ ARexx script to convert a value of one currency type to another. Run from the Amiga CLI with the currency value to be exchanged followed by the original and destination 3-letter currency codes. Currency conversion data provided by https://www.exchangerate-api.com Conversion detail for the base currency type to all other currencies is automatically cached in T: for 24 hours for faster subsequent conversions. Requires an Amiga compatible system running a TCP/IP stack, e.g. Miami, AmiTCP, Genesis, Roadshow. Created with and tested on A4000T/68060 AmigaOS3.2 and MiamiDX. Both an ARexx script and a Rexecute compiled version of the script for 68k AmigaOS is provided. This 68k executable reportedly causes a GrimReaper on OS4.x. The ARexx script operates correctly on OS4.x and should work on other Amiga-like systems with full ARexx support, though this is untested. Command line usage for Convert: Convert " " e.g. Convert "1 AUD USD" Command line usage for Convert.rexx: rx Convert.rexx e.g. rx Convert.rexx 1 AUD USD The compiled version of Convert requires quotation marks around the arguments, which is something to do with Rexecute. Floating point numbers are accepted. e.g. rx Convert.rexx 1.75 AUD USD or Convert "1.75 AUD USD" 1.75 AUD = 1.0876600 USD See https://www.exchangerate-api.com/docs/supported-currencies for a full list of supported currency codes. ------------------------------------------------------ History: v0.6 2002 Michael Trebilcock Final Aminet release of Convert using xe.com. v0.7 24/4/2010 Anthony Hoffman Re-wrote script to source currency conversion from finance.yahoo.com. v0.8 1/2/2014 Anthony Hoffman The Host: header field is now sent in the server request due to a change on the finance.yahoo.com server which resulted in a return of error 404 unless the Host: header field is sent as specified in RFC2616-sec5. An invalid currency type of UKP is now converted to GBP. v0.9 12/11/2017 Anthony Hoffman The finance.yahoo.com API was discontinued on 6th November 2017, changed script to use the free.currencyconverterapi.com API instead. v1.0 27/2/2019 Anthony Hoffman From February 2019, free.currencyconverterapi.com now requires a free personal key to access the API. v2.0 5/1/2025 Anthony Hoffman As free.currencyconverterapi.com is becoming unreliable [the site maintainer advises that the paid version should be used for reliability], moved currency conversion to exchangerate-api.com which has advantages of not requiring a personal API key and doesn't require HTTPS. Added automatic caching of conversion values per base currency code, cached data automatically refreshes once daily as needed. Improved validation of input arguments.