Skip to content

A solution to the first backend task from ENYE 2021. More details in README

Notifications You must be signed in to change notification settings

steph-crown/currency-rates-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currency-rates-api

Link: https://currency-ratesapi.herokuapp.com/

currency-rates-api is a free service for current and historical foreign exchange rates published by the European Central Bank. Also makes use of the Exchange Rates API

Usage

Get the latest currency rates in the following format/schema:

{
    "results": {
        "base": "",
        "date": "",
        "rates": {
        }
    }
}

GET /api/rates?base=CZK&currency=EUR,GBP,USD

  • base: the home currency rates to be quoted against (i.e. CZK)

  • currency: the specific exchange rates based on a comma-separated symbols parameter (i.e. EUR,GBP,USD).

Upon a successful API response, transform the fetched payload into an object containing the following keys:

  • results: JSON object containing the results from the API

  • base: the requested home rate from the request URL query strings

  • date: the current date

  • rates: An Object containing the requested currency in the request URL query strings

A successful response for the above request should return the following schema (of course with a more up-to-date values)

{
    "results": {
        "base": "CZK",
        "date": "2020-11-17",
        "rates": {
            "EUR": 0.0377244605,
            "GBP": 0.033795458,
            "USD": 0.044824204
        }
    } 
}

About

A solution to the first backend task from ENYE 2021. More details in README

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published