wookieJ / currency-account-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

currency-account-service

Build

https://currency-account-service.herokuapp.com/api/v1/accounts/1

Example service with in-memory users accounts with PLN balance. API endpoint returns account by user's id with USD balance converted by external exchange rate service. Authentication and authorization is handle on another layer.

PLN to USD Conversion

Service uses NBP API to get exchange rate. To ensure more stability and efficiency, following features are implemented:

  • Retries when NBP return 5xx status code.
  • Cache on getting exchange rate, because NBP refresh data every new day.

Swagger

Check API docs in swagger: https://currency-account-service.herokuapp.com/swagger

Account response fields are described here (schema section): https://currency-account-service.herokuapp.com/swagger#account-controller/getAccount

To do

Things to implement in the future:

  • Circuit-breaker pattern (instead of retries)
  • Better requests debug logs format

About


Languages

Language:Kotlin 100.0%