This API provides endpoints to manage currencies, including saving currency rates, deleting rates by date, and retrieving currency rates by date and currency.
-
Set your own postgres credentials
-
You can run postgres image docker compose up
-
Build the project using
mvn clean install -D maven.test.skip=true
-
Run using
mvn spring-boot:run
-
The web application is accessible via
localhost:8080
-
Constant token:
my-constant-secret-token
-
Username: user
-
Password: password
Get the authentication token.
Saves currency rates for a specific date.
Name | Type | Description |
---|---|---|
date | String | The date in the format dd-MM-yyyy |
Returns a response with a status code 200 and a message indicating that the currency rates were saved successfully.
Deletes currency rates for a specific date.
Name | Type | Description |
---|---|---|
date | String | The date in the format dd-MM-yyyy |
Returns a response with a status code 200 indicating that the currency rates were deleted successfully.
Name | Type | Description |
---|---|---|
date | String | The date in the format dd-MM-yyyy |
from | String | The currency code to retrieve rates for (optional) |
Returns a response with a status code 200 and a JSON object containing the currency rates for the requested date and currency.
Name | Type | Description |
---|---|---|
from | String | The currency code to retrieve rates for |
Returns a response with a status code 200 and a JSON object containing the dates and currency rates for the requested currency.E