A sample microservice written in Scala using Cats, HTTP4S, Doobie that implements an application to compute Crypto/Fiat currency conversion rates.
This project is based upon the work that has been done in:
This project is meant to be implemented using the TypeLevel stack as much as possible.
- Cats for FP type classes
- Http4s to provide a minimal, idiomatic Scala interface for HTTP services
- Circe for JSON serialization
- Doobie to persist data using relational databases like Postgres
- Pure Config to handle app configuration
- FS2 gRPC
- Tagless Final wherever possible
Please read the CoinMarketCap API documentation to understand how to consume their API. You can either define in application.conf your CoinMarketCap API KEY or set it as an environment variable. For Linux systems you can simply export it:
export CMC_API_KEY="<YOUR-KEY-HERE>"
or you can even pass it to the binary (JAR) as a TypeLevel config (Java) parameter as -Dcmc.apikey="<YOUR-KEY-HERE>"
See DOCS
See the Code of Conduct
This project is released under the MIT license. See LICENSE.