Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dentrax opened this issue Jan 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Dentrax
Copy link

Dentrax commented Jan 21, 2022

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:

  • Check if difference between releaseDate and time.now greater or equal than %d {seconds, minutes}
  • Check if price got %%d pump (during the starting buy stage) compared to %d {seconds, minutes} ago
  • The following above conditions should work in or mode

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
@Dentrax Dentrax added the bug Something isn't working label Jan 21, 2022
@nitad54448
Copy link

I had the same experience several times, my opinion is here
#109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants