diff --git a/dabo/functions/get_marketdata_coinmarketcap.sh b/dabo/functions/get_marketdata_coinmarketcap.sh index 9067e1b..5fde11f 100644 --- a/dabo/functions/get_marketdata_coinmarketcap.sh +++ b/dabo/functions/get_marketdata_coinmarketcap.sh @@ -64,7 +64,7 @@ function get_marketdata_coinmarketcap { local f_id # get id -> If multiple take the one with the largest marketcap - f_id=$(egrep "^${f_item},[1-9]" COINMARKETCAPIDS | sort -n -t, -k4 | tail -n1 | cut -d, -f2) + f_id=$(egrep "^${f_item},[1-9]" COINMARKETCAPIDS COINMARKETCAPIDS.tmp | sort -n -t, -k4 | tail -n1 | cut -d, -f2) [[ $f_item = EURC ]] && f_id=20641 if [ -z "$f_id" ] then @@ -91,7 +91,6 @@ function get_marketdata_coinmarketcap { # cleanup rm -f "$f_targetcsvtmp" "${f_targetcsvtmp}".err ${f_targetjsontmp} "${f_targetjsontmp}".err - if [ "$f_timeframe" = "1d" ] || [ "$f_timeframe" = "7d" ] then # Download data from coinmarketcap diff --git a/dabo/functions/webpage.sh b/dabo/functions/webpage.sh index 0b9ce23..ae2e091 100644 --- a/dabo/functions/webpage.sh +++ b/dabo/functions/webpage.sh @@ -166,7 +166,7 @@ function webpage { f_sold=$(egrep "$f_exchange,.+,$f_asset" ALL_TRANSACTIONS_OVERVIEW.csv | tail -n1 | cut -d, -f22) if ! [ "$f_amount" = 0 ] then - currency_converter $f_amount $f_asset $TRANSFER_CURRENCY || continue + currency_converter "$f_amount" "$f_asset" "$TRANSFER_CURRENCY" || continue f_currency_amount=$f_currency_converter_result g_calc "$f_currency_amount+($f_sold)" #f_currency_amount=$g_calc_result