From c1fefc31622f4a95b9f22f1e9838ff4a40c92306 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 9 Jan 2024 11:51:44 +0100 Subject: [PATCH] put current price in var f_get_marketdata_price for watch_assets --- dabo/functions/get_marketdata.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dabo/functions/get_marketdata.sh b/dabo/functions/get_marketdata.sh index 119715e..933f608 100644 --- a/dabo/functions/get_marketdata.sh +++ b/dabo/functions/get_marketdata.sh @@ -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 }