+
Skip to content

tomiok/fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetcher service

This API returns the Last Traded Price of Bitcoin for the following currency pairs:

  1. BTC/USD
  2. BTC/CHF
  3. BTC/EUR

Requirements

  1. go 1.22
  2. Docker (not mandatory)
  3. Mockgen
  4. Make (built-in for unix like OS)

Make commands

Tests

make tests

Integration Tests

make tests-it

Run

make run

Run dockerized

make run-docker

Run with Go (from the root)

go run cmd/api/main/main.go

Run stand-alone docker

docker build -t fetcher .
docker run fetcher

Test locally

(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'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载