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.jar
API 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:
code
is the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/date
is the date in format YYYY-MM-DD
- returns:
- average exchange rate of the currency
- arguments:
-
GET
/api/exchanges/minmax/{code}/{n}
-
arguments:
code
is the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/n
is 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
n
quotations
- minimum and maximum value of the exchange rate in the last
-
GET
/api/exchanges/difference/{code}/{n}
-
arguments:
code
is the code of currency which you can find at https://nbp.pl/en/statistic-and-financial-reporting/rates/table-a/n
is 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
n
quotations
- the major difference between the buy and ask rate in the last