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 }