I used Gin as http framework because it's much easier. and used slog for structured log.
sudo docker compose up --wait -dmake db-migrate-upgit clone https://github.com/milad-rasouli/price.gitcp env.example .envmake runmake cronhttp://localhost:8080/swagger/index.html
also available in github registry.
docker pull ghcr.io/milad-rasouli/price:latestcurl -X GET "http://localhost:8080/prices/latest?symbol=btc" \
-H "Accept: application/json"curl -X GET "http://localhost:8080/prices/history?symbol=btc" \
-H "Accept: application/json"curl -X GET "http://localhost:8080/prices/history?symbol=btc&interval=1m" \
-H "Accept: application/json"curl -X GET "http://localhost:8080/prices/history?symbol=btc&interval=1m&from=$FROM&to=$TO" \
-H "Accept: application/json"