Improve BTC price tracking script #624

Merged
raucao merged 1 commits from feature/btc_price_tracker into master 2026-03-07 06:21:52 +00:00

1 Commits

Author SHA1 Message Date
d492cd18cc Improve BTC price tracking script
1. Robust API helper: Add make_request with retry logic for both
   GET (price data) and PUT (upload) requests
2. Arithmetic precision: Switch to awk for floating-point average
   calculation
3. Correct error handling: Updated get_price_data to return status
   codes and the main script to exit on failure
4. Safer JSON: Use jq to construct valid JSON payloads
5. Safety Flags: Add set -e/-o to fail fast on any command errors
2026-03-06 23:20:12 +04:00