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
Owner
  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
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
raucao added the enhancementbugkredits-1 labels 2026-03-07 06:18:19 +00:00
raucao added 1 commit 2026-03-07 06:18:20 +00:00
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
Author
Owner

Tested/running on bitcoin-2.

Tested/running on `bitcoin-2`.
raucao merged commit a23c7d536a into master 2026-03-07 06:21:52 +00:00
raucao deleted branch feature/btc_price_tracker 2026-03-07 06:21:52 +00:00
Sign in to join this conversation.