This is a simple application that returns data from NBP's API.
- Using Docker
> docker build -t nbp_api .
> docker run -p 7777:7777 nbp_api- Using maven
> ./mvn package
> java -jar .\target\NPB_API-0.0.1-SNAPSHOT.jarAPI is available on port 7777. To test the application you can go to
http://localhost:7777/swagger-ui/index.html and use
UI.
-
GET
/api/exchanges/avg/{code}/{date}- arguments:
codeis the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/dateis the date in format YYYY-MM-DD
- returns:
- average exchange rate of the currency
- arguments:
-
GET
/api/exchanges/minmax/{code}/{n} -
arguments:
codeis the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/nis the number of last quotations of the currency. Value must be lower or equal to 255.
-
returns:
- minimum and maximum value of the exchange rate in the last
nquotations
- minimum and maximum value of the exchange rate in the last
-
GET
/api/exchanges/difference/{code}/{n} -
arguments:
codeis the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/nis the number of last quotations of the currency. Value must be lower or equal to 255.
-
returns:
- the major difference between the buy and ask rate in the last
nquotations
- the major difference between the buy and ask rate in the last