diff --git a/dabo/functions/ccxt.sh b/dabo/functions/ccxt.sh index 076efc4..2e6ba04 100644 --- a/dabo/functions/ccxt.sh +++ b/dabo/functions/ccxt.sh @@ -21,12 +21,9 @@ function f_ccxt { local f_exchange_type="swap" [ -z "$LEVERAGE" ] && f_exchange_type="spot" g_python "exchange = ccxt.${STOCK_EXCHANGE,,}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','options': {'defaultType': '${f_exchange_type}',},})" || return 1 - sleep 5 f_ccxt_initialized=true fi - - g_python_waitforoutput=1 g_python "$@" || return 1 unset f_ccxt_result f_ccxt_result=${g_python_result[*]} diff --git a/dabo/functions/get_assets.sh b/dabo/functions/get_assets.sh index 45bb9b4..d44d8a0 100644 --- a/dabo/functions/get_assets.sh +++ b/dabo/functions/get_assets.sh @@ -16,8 +16,12 @@ function get_assets { bitpanda-api-call GET "public/v1/market-ticker" || return 1 #cat ${g_tmp}/API_CMD_OUT | jq -r '.[] | select(.state=="ACTIVE") | .instrument_code + "," + .last_price' | sed 's/_//' | grep "${CURRENCY}," | egrep -v "${TRANSFER_CURRENCY},|,0[\.][0]*$" >${f_filename}_OUT.tmp cat ${g_tmp}/API_CMD_OUT | jq -r '.[] | .instrument_code + "," + .last_price' | sed 's/_//' | grep "${CURRENCY}," | egrep -v "${TRANSFER_CURRENCY},|,0[\.][0]*$" >${f_filename}_OUT.tmp - else + elif [ ${STOCK_EXCHANGE} = "NONE" ] + then f_no_exchange=1 + else + #f_ccxt "print(exchange.fetch_tickers())" && echo $f_ccxt_result >CCXT_TICKERS + return 0 fi cat ${g_tmp}/API_CMD_OUT >PRICETICKER