Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leeeqo/currency-exchange
REST API for describing currencies and exchange rates
https://github.com/leeeqo/currency-exchange
Last synced: about 1 month ago
JSON representation
REST API for describing currencies and exchange rates
- Host: GitHub
- URL: https://github.com/leeeqo/currency-exchange
- Owner: leeeqo
- Created: 2024-11-01T12:46:22.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-01T20:39:20.000Z (3 months ago)
- Last Synced: 2024-11-01T21:20:14.602Z (3 months ago)
- Language: Java
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Exchange Rate Project
REST API for describing currencies and exchange rates.
Tech Task: https://zhukovsd.github.io/java-backend-learning-course/projects/currency-exchange/
### Stack:
- Jakarta Servlets
- JDBC
- Jackson
- PostgreSQL### Endpoints:
#### GET `/currencies`
Getting all the currencies.
#### GET `/currency/USD`
Getting currency specified by code.
#### POST `/currencies`
Adding new currency into DB. Request body:
```
{
"name": "Euro",
"code": "EUR",
"sign": "€"
}
```#### GET `/exchangeRates`
Getting all the exchange rates.
#### GET `/exchangeRate/USDEUR`
Getting exchange rate specified by currency codes.
#### POST `/exchangeRates`
Adding new exchange rate to DB. Request body:
```
{
"baseCurrencyCode": "USD"
"targetCurrencyCode": "EUR"
"rate": "0.99"
}
```#### PUT `/exchangeRate/USDEUR`
Updating existing exchange rate. Request body:
```
{
"rate": 1.34
}
```#### GET `/exchange?from=BASE_CURRENCY_CODE&to=TARGET_CURRENCY_CODE&amount=$AMOUNT`
Calculating of the transfer of a certain amount of funds from one currency to another specified by codes.