BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

Error list index out of range #584

Closed JCBauza closed 6 years ago

JCBauza commented 6 years ago
Welcome to Lending Bot on BITFINEX
2017-11-22 15:09:38 Error list index out of range
Traceback (most recent call last):
  File "lendingbot.py", line 94, in <module>
    Lending.lend_all()
  File "/poloniexlendingbot/modules/Lending.py", line 249, in lend_all
    lend_all()
  File "/poloniexlendingbot/modules/Lending.py", line 249, in lend_all
    lend_all()
  File "/poloniexlendingbot/modules/Lending.py", line 247, in lend_all
    usable_currencies += lend_cur(cur, total_lent, lending_balances, ticker)
  File "/poloniexlendingbot/modules/Lending.py", line 418, in lend_cur
    orders = construct_orders(active_cur, active_bal, active_cur_total_balance, ticker)  # Build all potential orders
  File "/poloniexlendingbot/modules/Lending.py", line 319, in construct_orders
    top_rate, bottom_rate = get_gap_mode_rates(cur, cur_active_bal, cur_total_balance, ticker)
  File "/poloniexlendingbot/modules/Lending.py", line 373, in get_gap_mode_rates
    top_rate = get_gap_rate(cur, top_depth, order_book, cur_total_balance, True)
  File "/poloniexlendingbot/modules/Lending.py", line 306, in get_gap_rate
    return Decimal(order_book['rates'][i])
IndexError: list index out of range

v312
 Unhandled error, please open a Github issue so we can fix it!
ninjavz commented 6 years ago

I have something very similar:

Dec 01 12:04:34 tyr.---.com python[933]: orders = construct_orders(active_cur, active_bal, active_cur_total_balance, ticker)  # Build all potential orders
Dec 01 12:04:34 tyr.---.com python[933]: File "/home/---/Crypto/poloniexlendingbot/modules/Lending.py", line 319, in construct_orders
Dec 01 12:04:34 tyr.---.com python[933]: top_rate, bottom_rate = get_gap_mode_rates(cur, cur_active_bal, cur_total_balance, ticker)
Dec 01 12:04:34 tyr.---.com python[933]: File "/home/---/Crypto/poloniexlendingbot/modules/Lending.py", line 373, in get_gap_mode_rates
Dec 01 12:04:34 tyr.---.com python[933]: top_rate = get_gap_rate(cur, top_depth, order_book, cur_total_balance, True)
Dec 01 12:04:34 tyr.---.com python[933]: File "/home/---/Crypto/poloniexlendingbot/modules/Lending.py", line 306, in get_gap_rate
Dec 01 12:04:34 tyr.---.com python[933]: return Decimal(order_book['rates'][i])
Dec 01 12:04:34 tyr.---.com python[933]: IndexError: list index out of range
Dec 01 12:04:34 tyr.---.com python[933]: v312
Dec 01 12:04:34 tyr.---.com python[933]: Unhandled error, please open a Github issue so we can fix it!
ninjavz commented 6 years ago

Can it be out of memory?

laxdog commented 6 years ago

Usually happens when there's an exception connecting to the exchange and we don't get any data.

Needs looked at

Evanito commented 6 years ago

Duplicate of #566