This API provides requested data from http://api.nbp.pl/. Before returning data to user. Application does some manipulation with fetched data. Then provides user by the given instructions.
In order to install this app please click "Code" button and copy link. Then open any IDE which supports Java. Choose clone and put the given link. project folder will be initialzed. Then open "com.dynatrace\com.dynatrace\src\main\java\com\dynatrace" folder and run Application.java file. Before running it make sure that JDK installed on given machine. After successful running you will see this nformatin on the terminal, see below:
Above java file will run local server on Tomcat, and by default it runs on port:8080. Base url of this api is "/api/exchange". With port number it is "http://localhost:8080/api/exchange".
Below on the schema you can see all methods and endpoints with exampels. -{code} is code of currency in international format; -{number} is number of quataion das. For example ../GBP/last/3 means getting GBP currency rates fro last 3 working days
Applcation checks correctness of path, currency code, date, table and number of quotations. Below on the table you can see incorrect input and error messages. It checks date provided, its format, also check if it is weekend day or future day. On the next two methods it checks quotation number, it expects 0<N<256 integer number.
-
Get average max and min rates of GBP for last 30 days http://localhost:8080/api/exchange/a/gbp/last/30
-
Get average rate of CZK for 21 April 2023. http://localhost:8080/api/exchange/a/gbp/2023-04-21
-
Get major difference in selling and buying prices of AUD for last 2 weeks http://localhost:8080/api/exchange/c/AUD/last/14