This API returns the Last Traded Price of Bitcoin for the following currency pairs:
- BTC/USD
- BTC/CHF
- BTC/EUR
- go 1.22
- Docker (not mandatory)
- Mockgen
- Make (built-in for unix like OS)
make tests
make tests-it
make run
make run-docker
go run cmd/api/main/main.go
docker build -t fetcher .
docker run fetcher
(you can send any number of pairs) (could be capitalized or not, is the same, but the format is with slash i.e: BTC/USD)
curl --location 'localhost:9000/api/v1/ltp?pairs=BTC%2FUSD%2CBTC%2FEUR%2CBTC%2FCHF'
or with one pair
curl --location 'localhost:9000/api/v1/ltp?pairs=btc%2Fusd'