A simple NTD foreign exchange rates API
QCurrency is a API for getting almost realtime NTD (New Taiwan Dollar, NT$, ISO-4217 currency code TWD) foreign exchange rates that published by Bank of Taiwan. And also fetched from Google Search result.
GET API_ENDPOINT/latestThen you will get the exchange rates response JSON object. See APIs for more infromation and excample.
API endpoint: https://qcurrency-exchange-rates.appspot.com/api. You can also use this repository to build your own API server.
GET /latest- update: string, update time in ISO 8601 format.
- source: string, name of soure.
- rates: dictionary, currency name string in ISO 4217 to as key, and exchange rate in float as value.
{
"update": "2018-03-09T16:15:00+08:00",
"source": "Bank of Taiwan",
"rates": {
"THB": 0.9586,
"ZAR": 2.5,
"GBP": 40.73,
"NZD": 21.42,
"CHF": 30.92,
"CNY": 4.647,
"JPY": 0.2765,
"USD": 29.34,
"SGD": 22.32,
"HKD": 3.766,
"SEK": 3.6,
"CAD": 22.86,
"AUD": 22.97,
"EUR": 36.27
}
}GET /sourcesTo be implemented.
GET /SOURCE_NAME/latestTo be implemented.
Basically, it's a Google App Engine instance that fetchs data and parses it from Bank of Taiwan every few minutes.
Install Google Cloud SDK, so that you can start use gcloud commands.
After installation, install app engine component.
$ gcloud components install app-engine-python
If you already have gcloud, you can also update it.
$ gcloud components update
Dou to Google App Engine Python Standard Enviroment use python2.7 as its python version. If the default python command in your computer (e.g. Using homebrew python on a Mac) is Python 3, please modify enviroment variable or $PATH to make pathon2.7 as default one to make sure it will use python2.7 to execute scroipt like dev_appserver.py.
You can also check Makefile for some useful command to help you developing.
$ dev_appserver.py app.yaml
Then it will start a local app engine server for developing and testing.
$ python2.7 -m pytest tests/
$ gcloud app depoly --project=APP_ENGINE_PROJECT_NAME
$ gcloud app depoly cron.yaml --project=APP_ENGINE_PROJECT_NAME
See LICENSE.md.
- PayPal
- ETH
0x459E11281660e6D5192C746775c5d0EBC6287696