Dymanic price problem

Bug info: I have a problem with the bot; it opens trades at the same price or a similar price, even at higher prices than the last trade. I noticed this happened when it closed the PEPE trade and then opened a new one, but it not only opened a trade with PEPE but also with NEAR. In other words, it opened both currencies that I had open, and the trades are exactly at the same time. NEAR hadn’t even closed the previous trade but opened another one.

And this situation repeats in DEMO with some cryptocurrencies. When it closes a trade for one coin, it opens a new one for the coin that reached profit, and at the same time, it opens a new trade for another coin, regardless of whether it reached profit or dropped below the indicated percentage for opening a new trade. I will leave the IDs of the bots that are causing the error.

https://app.gainium.io/bot/67070f13287a7cb91cde6754?a=1391&aid=share-bot&share=ef222e20-da6f-496a-b816-58a5a3130a50

  • [Optional] Steps to reproduce →
  • Expected result →

Price stream reconnected, bot fallback to get prices directly from exchange. In this case prices served from redis if exists. Kucoin prices stuck in redis without TTL parameter so they were outdated. I updated caching. Fixed.

1 Like