diff --git a/dabo/fetch-ohlcv-candles-indicators.sh b/dabo/fetch-ohlcv-candles-indicators.sh index e65eb02..79cf7f4 100755 --- a/dabo/fetch-ohlcv-candles-indicators.sh +++ b/dabo/fetch-ohlcv-candles-indicators.sh @@ -32,16 +32,21 @@ do . ../../dabo-bot.conf . ../../dabo-bot.override.conf # notify failed downloads - [ "$interval" = "1d" ] && cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads" + if [ "$interval" = "1h" ] + then + cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads" + mkdir -p REPORTED_FAILED + mv FAILED_*/* REPORTED_FAILED/ 2>/dev/null + fi # Timestamp export f_timestamp=$(g_date_print) # get candles and indicators get_ohlcv-candles $interval + [[ $interval != 1w ]] && get_marketdata_all $interval [ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 ))) #[[ $interval = 4h ]] && sleeptime=?? if [ "$interval" = "1d" ] then - get_marketdata_fear_and_greed_alternativeme sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:01") - $(date +%s) +2 )) fi [ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:01") - $(date +%s) +2 ))