Exchange Rates API

Exchange rates API is a free service for current and historical foreign exchange rates published by the European Central Bank.

Live Demo on Azure

https://exchange-rate.azurewebsites.net/.

Usage

POST /api/currency/exchangeRate

with the filter parameters:

{
  "dates": Array[String],
  "baseCurrency": String,
  "targetCurrency": String
}

Available Scripts

It is used to install all dependencies for a project.
It is necessary to run before staring the app.

dotnet restore

In the API project directory, you can run:

dotnet run

Runs the app in the development mode.
Open https://localhost:5001 to view it in the browser.

How to run the test?

dotnet test

How to publish?

dotnet publish -c Release -r win-x64 -o ./output --self-contained

Containerize the app

How to build a Docker image that contains the .NET Core application with running the tests.

docker image build -t sambose/exchange-rate-api .

and run it by:

docker run -d -p 8080:80 --name my-api sambose/exchange-rate-api

Architecture and Libraries

dotnet core 3.0, Clean architecture, CQRS, FluentValidation, Swagger, xUnit, WireMock.Net, docker