From 4b0f37165b29883347a9b2b9f7f27781445302a3 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sat, 7 May 2022 10:40:55 -0600 Subject: [PATCH] Fixed logging --- get-prices | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-prices b/get-prices index 986879b..a2ce1ea 100755 --- a/get-prices +++ b/get-prices @@ -35,7 +35,7 @@ fi for asset in ${!assets[@]}; do echo "Checking $asset..." url="https://api.polygon.io/v2/aggs/ticker/${assets[${asset}]}/prev?apiKey=${POLYGON_API_KEY}" - echo " URL: $url" + #echo " URL: $url" res=$(curl --silent "$url") # Check the result @@ -51,7 +51,7 @@ for asset in ${!assets[@]}; do price=$(echo $res | jq '.results[0].vw') echo " Price: $price" line="P $(date -I --date=yesterday) $asset" - grep "$line" "$PRICES_FILE" \ + grep "$line" "$PRICES_FILE" >/dev/null \ || echo "$line \$$price" >> "$PRICES_FILE" sleep 10 # Optional, check API limits fi