Skip to content

Django project to display currency value of a given date

Notifications You must be signed in to change notification settings

pietromezzadri/exchange_rate

Repository files navigation

Github Workflow “”Heroku App

Currency Exchange Rate

Table of Contents

About

A simple project to display the rate of BRL, EUR and JPY within a week, using USD as the base currency. It also has API calls for daily per date rates. Rates are queried from VAT Comply.

Screenshot

API

Allows get requests using params for queries.

daily_exchange_rate

GET APP_URL/api/daily_exchange_rate/

returns json with rates for the current date.

[
  {
    "_id": 4,
    "base_currency": "USD",
    "brl_rate": "5.10113907771449500000",
    "eur_rate": "0.91861106007716330000",
    "jpy_rate": "132.66580929634392000000",
    "rate_date": "2023-03-30",
    "created_at": "2023-03-30T15:51:13.993534Z"
  }
]

exchange_rate

GET APP_URL/api/exchange_rate/?date='%Y-%m-%d'

returns json with rates for the current date.

GET APP_URL/api/exchange_rate/?date=2023-03-30

output:

[
  {
    "_id": 4,
    "base_currency": "USD",
    "brl_rate": "5.10113907771449500000",
    "eur_rate": "0.91861106007716330000",
    "jpy_rate": "132.66580929634392000000",
    "rate_date": "2023-03-30",
    "created_at": "2023-03-30T15:51:13.993534Z"
  }
]

Developed with:

Django

Pico.css

Highcharts

Vat Comply