The request returns the current BTC course to UAH using Binance API service.
No parameters
200: Returns actual exchange rate BTC to UAH
400: Invalid status value
The request checks if there is no e-mail address in the current file database and, if it is not present, adds it. Additionally, sends a letter notifying that user will be receiving messages about exchange rates.
email
string: email address that is going to be added to file database
200: E-mail address is added
409: Such an e-mail address already exists
The request sends current exchange rate (BTC to UAH) to subscribed e-mail addresses using goroutines. Additionally, returns an e-mail addresses array if during sending a letter to them any error occurred.
No parameters
200: E-mails are sent
- Locally
git clone https://github.com/nazarsavorona/btc-rate-check-service.git
cd .\btc-rate-check-service\
docker build -t btc-rate-check-service .
docker run -p 8081:8081 btc-rate-check-service
Now you can reach an API using http://localhost:8081/api
or http://127.0.0.1:8081/api
and its web
version http://localhost:8081
.
- Deployed version
temporarily unavailable