Giter VIP home page Giter VIP logo

Comments (5)

RatFou avatar RatFou commented on June 22, 2024

Many thanks!

from gateio-crypto-trading-bot-binance-announcements-new-coins.

gutster95 avatar gutster95 commented on June 22, 2024

Can I just implement your solution into the current bot? Bit of a python noob here

from gateio-crypto-trading-bot-binance-announcements-new-coins.

rrm1991 avatar rrm1991 commented on June 22, 2024

The last option I posted, to get only the first coin and ignore the rest on a multi coin announcement is safe to implement. You can just copy this code and replace the original get_last_coin() method.

The other one needs a bit of tweaking, which I am testing right now. Until we get another multi-coin announcement I will not be 100% sure it works.

from gateio-crypto-trading-bot-binance-announcements-new-coins.

Beard81 avatar Beard81 commented on June 22, 2024

This is my code from the new_listings_scraper. How would i edit it to be the equivalent of what rrm1991 mentioned above to only get the first coin of a multi-coin listing? I'm a rookie, so I couldn't interpret what rrm1991 said to do and apply it to my code. Any help would be appreciated, thanks.

def get_last_coin():
"""
Returns new Symbol when appropriate
"""
# scan Binance Announcement
latest_announcement = get_announcement()

# enable Kucoin Announcements if True in config
if config['TRADE_OPTIONS']['KUCOIN_ANNOUNCEMENTS']:
    logger.info('Kucoin announcements enabled, look for new Kucoin coins...')
    kucoin_announcement = get_kucoin_announcement()
    kucoin_coin = re.findall('\(([^)]+)', kucoin_announcement)

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

# 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

return uppers

from gateio-crypto-trading-bot-binance-announcements-new-coins.

Linus045 avatar Linus045 commented on June 22, 2024

I've created a new Draft PR to tackle this issue.
The first step would be to just grab the first coin similar to @rrm1991's implementation.

See here: #150

In the future we might implement a solution that would monitor and buy/sell all mentioned coins simultaneously.
But there are some problems with that as well which we do need to discuss then.

from gateio-crypto-trading-bot-binance-announcements-new-coins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.