Compare commits

...

2 Commits

Author SHA1 Message Date
07ef55bcd2 fixes 2024-07-30 14:23:00 +02:00
5be7a95869 testnet 2024-07-30 14:22:54 +02:00
2 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,11 @@ function f_ccxt {
local f_exchange_type="swap" local f_exchange_type="swap"
[ -z "$LEVERAGE" ] && f_exchange_type="spot" [ -z "$LEVERAGE" ] && f_exchange_type="spot"
g_python "${STOCK_EXCHANGE} = ccxt.${STOCK_EXCHANGE}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','enableRateLimit': True,'options': {'defaultType': '${f_exchange_type}',},})" || return 1 g_python "${STOCK_EXCHANGE} = ccxt.${STOCK_EXCHANGE}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','enableRateLimit': True,'options': {'defaultType': '${f_exchange_type}',},})" || return 1
if [[ $TESTNET = true ]]
then
g_echo_note "ATTENTION: RUNNING IN TESTNET/SIMULATION/MOCK MODE OF EXCHANGE ${STOCK_EXCHANGE}!!!"
g_python "exchange.set_sandbox_mode(True)" || return 1
fi
g_python "${STOCK_EXCHANGE}markets=${STOCK_EXCHANGE}.load_markets()" || return 1 g_python "${STOCK_EXCHANGE}markets=${STOCK_EXCHANGE}.load_markets()" || return 1
f_ccxt_initialized="${f_ccxt_initialized}${STOCK_EXCHANGE}," f_ccxt_initialized="${f_ccxt_initialized}${STOCK_EXCHANGE},"
fi fi

View File

@ -35,7 +35,7 @@ function get_ohlcv-candles {
do do
# fetch only single symbols (for debugging) # fetch only single symbols (for debugging)
#[ "$f_symbol" = "BTC/USDT:USDT" ] || continue #[ "$f_symbol" = "BTC/USDT:USDT" ] || continue
echo "=== Fetching/Refreshing $f_symbol ===" g_echo_note "Fetching/Refreshing $f_symbol $f_timeframe"
for f_timeframe in $f_timeframes for f_timeframe in $f_timeframes
do do
f_asset="${f_symbol//:*}" f_asset="${f_symbol//:*}"