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.21k stars 302 forks source link

Bot bought API3 at highest price after get listing announcement: detected after 25 seconds #154

Open Dentrax opened 2 years ago

Dentrax commented 2 years ago

Describe the bug I have been trying this bot awhile and just noticed a case that bot bought API3 at highest price 4.982 and sold with -1.534 profit.

The Binance API says it released at Fri Jan 21 2022 06:28:04 GMT+0000 but bot noticed this at 06:28:29 (Telegram mesage timestamp).

{
      "id": 80650,
      "code": "43b644d339394646bf65bf5c1e70d031",
      "title": "Binance Will List API3 (API3)",
      "type": 1,
      "releaseDate": 1642746484252
},

Actual behavior

Telegram message logs:

06:28:29: New announcement detected: API3

06:28:33: New announcement detected: API3

06:28:34: starting buy placeorder with : announcementcoin='API3' | globals.pairing='USDT' | volume=33.0 | amount=6.623845845042151 x price='4.982' | side = buy | status='cancelled'

06:28:34: Order on API3 closed

06:30:42: sold API3 with -1.534 profit | -3.031% PNL

Expected behavior

I'm not sure how we should tackle this problem but how about:

Screenshots

Screen Shot 2022-01-21 at 09 44 44

https://www.tradingview.com/x/lLso7vnj/

Logs -

Additional context

My config:

---
  TRADE_OPTIONS:
    KUCOIN_ANNOUNCEMENTS: True
    QUANTITY: 50
    PAIRING: USDT
    TEST: True
    SL: -3
    TP: 2
    ENABLE_TSL: True
    TSL: -4
    TTP: 2
  LOGGING:
    LOG_LEVEL: DEBUG
    LOG_FILE: bot.log
    LOG_TO_CONSOLE: True
  TELEGRAM:
    ENABLED: True
    NOTIFICATIONS:
      STARTUP: True # welcome message
      COIN_ANNOUNCEMENT: True # detected new announcement
      COIN_NOT_SUPPORTED: True # coin is not on gate.io
      BUY_START: True # when entering position
      BUY_ORDER_CREATED: True # when buy order is created
      BUY_FILLED: True # when the buy order got filled
      SELL_START: True # when starting to sell      
      SELL_FILLED: True # when sold
nitad54448 commented 2 years ago

I had the same experience several times, my opinion is here https://github.com/CyberPunkMetalHead/gateio-crypto-trading-bot-binance-announcements-new-coins/issues/109