put current price in var f_get_marketdata_price for watch_assets

This commit is contained in:
olli 2024-01-09 11:51:44 +01:00
parent a2dc3b718a
commit c1fefc3162

View File

@ -6,6 +6,7 @@ function get_marketdata {
if find asset-histories/${f_name}.history.csv -mmin -${INTERVAL_MIN} | grep -q "asset-histories/${f_name}.history.csv"
then
g_echo_note "asset-histories/${f_name}.history.csv already downloaded in the last ${INTERVAL_MIN} minutes"
f_get_marketdata_price=$(cat MARKET_DATA_CMD_OUT-${f_name})
return 0
fi
@ -50,6 +51,7 @@ $(tail -n 10 MARKET_DATA_CMD_OUT-${f_name}.tmp.err | cat -t)"
echo 0 >MARKET_DATA_CMD_OUT-${f_name}
fi
fi
echo "${f_timestamp},$(cat MARKET_DATA_CMD_OUT-${f_name})" >>asset-histories/${f_name}.history.csv
f_get_marketdata_price=$(cat MARKET_DATA_CMD_OUT-${f_name})
echo "${f_timestamp},${f_get_marketdata_price}" >>asset-histories/${f_name}.history.csv
}