binance-bot icon indicating copy to clipboard operation
binance-bot copied to clipboard

Index error

Open zmfb039 opened this issue 7 years ago • 4 comments

I can get the bot to run, i enter my symbol and get this error. Any ideas?

File "C:/Users/Alan/.spyder-py3/binance-bot-master/binance_bot.py", line 78, in most_recent = klines.pop()

IndexError: pop from empty list

zmfb039 avatar May 06 '18 01:05 zmfb039

What did you input as the symbol?

Kalaborative avatar May 06 '18 05:05 Kalaborative

Hi thanks very much for replying. I tried

Welcome! type 'STOP' to stop Enter a symbol.

ETHBTC

then pressed enter and got

Traceback (most recent call last): File "C:\Users......etc etc master\binance_bot.py", line 78, in most_recent = klines.pop() IndexError: pop from empty list

zmfb039 avatar May 06 '18 06:05 zmfb039

Welcome! type 'STOP' to stop Enter a symbol. BNBBTC Traceback (most recent call last): File "binance_bot.py", line 78, in most_recent = klines.pop() IndexError: pop from empty list

Any help fixing this please

Running windows 7 x64 with python 3.6.0

ghost avatar Jun 10 '19 17:06 ghost

Change this line:

klines = client.get_historical_klines(sym, Client.KLINE_INTERVAL_1MINUTE, "1 min ago")

to this:

klines = client.get_historical_klines(sym, Client.KLINE_INTERVAL_1MINUTE, "1 min ago UTC")

k1ng69 avatar Jul 27 '19 17:07 k1ng69