This project is a simple runnable local server that exposes endpoints to query data from the Narodowy Bank Polski's public APIs and return relevant information. It provides the following operations:
-
Get average exchange rate for a given date and currency code.
-
Get maximum and minimum average exchange rate for a given currency code and number of last quotations.
-
Get the major difference between the buy and ask rate for a given currency code and number of last quotations.
Desktop.2023.04.26.-.23.24.57.03.mp4
- Java 17
- Spring 3.0.6
- Angular 15.2.7
- Clone the repository:
git clone https://github.com/Krystian030/nbp-api
- Run the following command to build and start the application using docker-compose
docker compose up --build
The following endpoints are available:
-
Get the list of currency codes for a given table:
- Endpoint: http://localhost:8080/api/exchange-rate/{table}/codes
- Method: GET
-
Get the average exchange rate for a specific currency and date:
- Endpoint: http://localhost:8080/api/exchange-rate/{currencyCode}/{date}
- Method: GET
-
Get the maximum and minimum average exchange rate for a specific currency and number of last quotations:
-
Get the major difference between the buy and ask rate for a specific currency and number of last quotations:
The Swagger UI is available for this application at http://localhost:8080/swagger-ui/index.html.