Backend code of a simple web app for currency exchange. The base currency is CNY.
Exchange rates are all retrived from ECB via Fixer.io.
GET /
returns all the currencies that can be exchanged into CNY.GET /$currency/$amount
returns the equivalent amount in CNY exchanged from the given currency. For exampleGET /JPY/100
.
git clone https://github.com/beta/exchange-php.git exchange
cd exchange
composer install
Open-sourced under the MIT License.