https://github.com/mwarkentin/moneychanger
Moneychanger is a small service which tracks the exchange rates for currencies over time.
https://github.com/mwarkentin/moneychanger
Last synced: about 1 year ago
JSON representation
Moneychanger is a small service which tracks the exchange rates for currencies over time.
- Host: GitHub
- URL: https://github.com/mwarkentin/moneychanger
- Owner: mwarkentin
- Created: 2012-08-26T12:33:20.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2016-02-05T21:27:01.000Z (over 10 years ago)
- Last Synced: 2025-02-05T23:57:16.598Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Moneychanger
============
Moneychanger is a small service which tracks the exchange rates for currencies
over time.
Requirements
------------
* Redis
Routes
------
### / GET
Returns a list of currencies which are tracked.
```
{
"currencies": [
"jpy",
"cad",
"aud"
]
}
```
### /\/ GET
Returns a list of dates which have exchange rates for the currency code. Returns `404` if not found.
```
{
"currency": "cad",
"dates": [
"2012-01-01",
"2012-01-02"
]
}
```
### /\/\/ GET
Returns the exchange rate for a specific currency code and date. Returns `404` if not found.
```
{
"date": "2012-01-01",
"currency": "cad",
"base_currency": "usd",
"rate": "1.23"
}
```
### /\/\/ PUT
Sets the exchange rate for a specific currency code and date. Returns the rate that was set.
```
>>> url = 'http://127.0.0.1:5000/jpy/2012-01-03/'
>>> r = requests.put(url, data={'rate': 200})
>>> r.text
u'{"date": "2012-01-03", "currency": "jpy", "base_currency": "usd", "rate": "200"}'
```