python ccxt
This commit is contained in:
parent
c46175c24b
commit
f204f2f2ac
@ -124,7 +124,7 @@ do
|
||||
check_for_sell
|
||||
|
||||
# Get current balances
|
||||
[ ${FULL_LOOP} = 1 ] && get_ccxt_balances || continue
|
||||
get_ccxt_balances
|
||||
[ ${FULL_LOOP} = 1 ] && get_balances || continue
|
||||
|
||||
# Buy something?
|
||||
|
@ -18,10 +18,10 @@ function f_ccxt {
|
||||
g_python 'import sys' || return 1
|
||||
g_python 'sys.path.append("/ccxt/python")' || return 1
|
||||
g_python 'import ccxt' || return 1
|
||||
sleep 0.5
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user