optimations and fixes
This commit is contained in:
parent
d71f344777
commit
c3e0060347
@ -64,7 +64,7 @@ function get_marketdata_coinmarketcap {
|
|||||||
|
|
||||||
local f_id
|
local f_id
|
||||||
# get id -> If multiple take the one with the largest marketcap
|
# 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
|
[[ $f_item = EURC ]] && f_id=20641
|
||||||
if [ -z "$f_id" ]
|
if [ -z "$f_id" ]
|
||||||
then
|
then
|
||||||
@ -91,7 +91,6 @@ function get_marketdata_coinmarketcap {
|
|||||||
# cleanup
|
# cleanup
|
||||||
rm -f "$f_targetcsvtmp" "${f_targetcsvtmp}".err ${f_targetjsontmp} "${f_targetjsontmp}".err
|
rm -f "$f_targetcsvtmp" "${f_targetcsvtmp}".err ${f_targetjsontmp} "${f_targetjsontmp}".err
|
||||||
|
|
||||||
|
|
||||||
if [ "$f_timeframe" = "1d" ] || [ "$f_timeframe" = "7d" ]
|
if [ "$f_timeframe" = "1d" ] || [ "$f_timeframe" = "7d" ]
|
||||||
then
|
then
|
||||||
# Download data from coinmarketcap
|
# Download data from coinmarketcap
|
||||||
|
@ -166,7 +166,7 @@ function webpage {
|
|||||||
f_sold=$(egrep "$f_exchange,.+,$f_asset" ALL_TRANSACTIONS_OVERVIEW.csv | tail -n1 | cut -d, -f22)
|
f_sold=$(egrep "$f_exchange,.+,$f_asset" ALL_TRANSACTIONS_OVERVIEW.csv | tail -n1 | cut -d, -f22)
|
||||||
if ! [ "$f_amount" = 0 ]
|
if ! [ "$f_amount" = 0 ]
|
||||||
then
|
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
|
f_currency_amount=$f_currency_converter_result
|
||||||
g_calc "$f_currency_amount+($f_sold)"
|
g_calc "$f_currency_amount+($f_sold)"
|
||||||
#f_currency_amount=$g_calc_result
|
#f_currency_amount=$g_calc_result
|
||||||
|
Loading…
Reference in New Issue
Block a user