CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.22k stars 304 forks source link

problem on start. #124

Open modemfish opened 2 years ago

modemfish commented 2 years ago

C:\0000\binann>main.py 2021-12-21 10:16:20,636 INFO: Getting the list of supported currencies from gate io 2021-12-21 10:16:23,886 INFO: List of gate io currencies saved to currencies.json. Waiting 5 minutes before refreshing list... 2021-12-21 10:16:23,901 INFO: new-coin-bot online 2021-12-21 10:16:23,901 INFO: working... 2021-12-21 10:16:24,917 INFO: Kucoin announcements enabled, look for new Kucoin coins... Traceback (most recent call last): File "C:\0000\binann\main.py", line 468, in main() File "C:\0000\binann\main.py", line 427, in main latest_coin = get_last_coin() File "C:\0000\binann\new_listings_scraper.py", line 104, in get_last_coin if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \ IndexError: list index out of range

modemfish commented 2 years ago

i got round it i think by:

found_coin = re.findall('(([^)]+)', latest_announcement) uppers = None

**if len(found_coin) <1:
        uppers = None
else:**        
# returns nothing if it's an old coin or it's not an actual coin listing
    if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \
            found_coin[0] in previously_found_coins:

    # if the latest Binance announcement is not a new coin listing, or the listing has already been returned, check kucoin
        if config['TRADE_OPTIONS']['KUCOIN_ANNOUNCEMENTS'] and 'Gets Listed' in kucoin_announcement\
        and kucoin_coin[0] != globals.latest_listing and kucoin_coin[0] not in previously_found_coins:
            if len(kucoin_coin) == 1:
                uppers = kucoin_coin[0]
                previously_found_coins.add(uppers)
                logger.info('New Kucoin coin detected: ' + uppers)
            if len(kucoin_coin) != 1:
                uppers = None

    else:
        if len(found_coin) == 1:
            uppers = found_coin[0]
            previously_found_coins.add(uppers)
            logger.info('New coin detected: ' + uppers)
        if len(found_coin) != 1:
            uppers = None
    print(f'{uppers=}')

return uppers
ghostnetrn commented 2 years ago

2021-12-21 12:58:35,748 INFO: started working... Traceback (most recent call last): File "main.py", line 466, in main() File "main.py", line 425, in main latest_coin = get_last_coin() File "gateio/src/new_listings_scraper.py", line 104, in get_last_coin if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \ IndexError: list index out of range

lovehedy24 commented 2 years ago

Same problem as ghostnetrn IndexError: list index out of range

geelenbert commented 2 years ago

Same problem here

Leo-AO-99 commented 2 years ago

if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \ found_coin[0] in previously_found_coins: to if 'Binance Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \ found_coin[0] in previously_found_coins:

Leo-AO-99 commented 2 years ago

'Will List' in binance latest annoucement title('Binance Futures Will List....'),but no index in found_coin,so use the 'Binance Will List' to match the title

FJCon commented 2 years ago

Hi, I need help to solve this problem:

2022-06-17 15:39:14,346 INFO: Getting the list of supported currencies from gate io 2022-06-17 15:39:17,596 INFO: List of gate io currencies saved to currencies.json. Waiting 5 minutes before refreshing list... 2022-06-17 15:39:17,596 INFO: new-coin-bot online Traceback (most recent call last): File "C:\Users\Kaioken04\Desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\main.py", line 5, in main() File "c:\users\kaioken04\desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\src\gateio_new_coins_announcements_bot\main.py", line 469, in main latest_coin = get_last_coin() File "c:\users\kaioken04\desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\src\gateio_new_coins_announcements_bot\new_listings_scraper.py", line 130, in get_last_coin or found_coin[0] == globals.latest_listing IndexError: list index out of range

C:\Users\Kaioken04\Desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master>