ccxt check for swap or spot by LEVERAGE
This commit is contained in:
parent
bddb49f63c
commit
9d86a49616
@ -17,6 +17,8 @@ function f_ccxt {
|
||||
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': 'swap',},})" || return 1
|
||||
f_ccxt_initialized=true
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user