Skip to content

ssabuda/eurate

Repository files navigation

Django CI

Eurate

Euro exchange rate

This application allows you to download the Euro exchange rates. Is downloaded from the European Central Bank. It allows you to download data from the entire history, or for the last 90 days. The data can be downloaded as a CSV file in the administration panel. The data is also available via API.

Installation

I recommend using docker-compose, it is the fastest way to start the application:

App is running on http://localhost:8000/

next follow the instructions. Now you can access into admin panel

Import currency exchange rates

  • import data from the last 90 days:
    ./manage.py run_ecb_import
  • import data from the entire history:
    ./manage.py run_ecb_import --historic

Download currency exchange rates as CSV file

example data:

ID,created,modified,currency,date,rate
2161,2020-12-19 10:14,2020-12-19 10:14,AUD,2020-12-18,1.6107
2147,2020-12-19 10:14,2020-12-19 10:14,BGN,2020-12-18,1.9558
2162,2020-12-19 10:14,2020-12-19 10:14,BRL,2020-12-18,6.2668
2163,2020-12-19 10:14,2020-12-19 10:14,CAD,2020-12-18,1.5638
2155,2020-12-19 10:14,2020-12-19 10:14,CHF,2020-12-18,1.0845

API

Two API endpoints are available:

example data:

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "currency": "USD",
      "date": "2020-12-18",
      "rate": "1.2259"
    }
  ]
}

Filters

Two filters for date and currency are available i.e:

http://localhost:8000/api/v1/rates/?currency=USD&date=2020-12-03