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