Code Monkey home page Code Monkey logo

Comments (8)

dasbts avatar dasbts commented on June 1, 2024

I would suggest having a check for the "Action" timer which shows last ticker update, and if that is more than 15 minutes back, then try to re-establish the connection, maybe by removing and adding the symbol card again, or use the same functionality as is available for when one removes the symbol card (as this seem to remove the websocket), then if it was not successful, wait like 30-60 seconds and retry reconnecting to the symbol card websocket.

from binance-trading-bot.

dasbts avatar dasbts commented on June 1, 2024

I think I have figured it out and implemented a solution that automatically reconnects to a symbol if it is not updated within for example one minute. Confirmed with console log and an example that had not had activity for 15 minutes.

However, it only worked for those symbols that are on the GUI at the moment. I need to figure out how to do the same in some backend file as right now I put it in CoinWrapperAction.js.

Super excited for this as it would give a lot of better uptime and trade opportunities, missed sell PnL yesterday because the ticker stopped, so I'm still holding the position.

However, it is also seemingly triggering many times for each symbol, so sometimes it doesn't get time to reconnect as it seem to take some time for that process, and it thus retriggers the reconnect before finishing up. Investigating.

from binance-trading-bot.

dasbts avatar dasbts commented on June 1, 2024

95% sure I have a working solution now, last night's try was only on the front end side, now having it work from the app instead of in the public. Will look into Tradingview with same approach ASAP as I've seen same behaviour (although very rare, it usually autoreconnects already) there.

@chrisleekr @rando128 @uhliksk hope it's ok to ping you like this. I've worked on some PR before, and there was then a master and develop branch. Here I see both branches with fixes, and pushes into the master if I understand it correctly, as well as PR's on your profiles. How do you want me to propose this change? Will do some more testing first however.

This is a very important fix as the current version of the bot is randomly stopping working for random symbols.

from binance-trading-bot.

dasbts avatar dasbts commented on June 1, 2024

Ok, so I got it to do the actual restarting. Had to comment out the code for dust transfers in tickers.js tho, otherwise it kept adding GUI symbol cards of BTC equivalents. However, I think it also needs to be cleared in the cache or something, as sometimes I think redlock is holding it up, so the previous values are still kept after restart of the socket. Got a lot to do with work the rest of this week, but will look into the cache, or if the problem is in some other part of the code, hopefully during this weekend.

The dust transactions part, it feels like this was making the out of memory issue somehow, as I believe it had tickers running in the background for a lot of symbols BTC equivalent, even if it required a PubSub restart of the symbol for the BTC equivalent to actually appear in the GUI.

However, it seems like it works for most parts, just that some are locked up after restart, this as a full network disconnect multiple times resulted in new data coming in, something which previously was impossible (at least for me).

from binance-trading-bot.

dasbts avatar dasbts commented on June 1, 2024

I managed to clear the cache for the symbol and retried with disconnect of internet followed by a wait of 10 minutes.

I set all the way of 10 minutes away as it seems sometimes the data does not reload due to the exchange (which the tooltip says), or it just has a delay (at least according to the GUI) for like 1-2 minutes sometimes before updating. Waited about 10 minutes and started seeing the symbols restarting one by one, then all back to 100% normal.

I also added a retry mechanism to TradingView as that sometimes seem to just stop working with no retry involved, so will make sure that works as expected before pushing a PR. But please see my previous question where I @ your profile name.

EDIT: Managed to add axios-retry to keep retrying forever. Will push a PR ASAP.

from binance-trading-bot.

D4rkT1m0 avatar D4rkT1m0 commented on June 1, 2024

hello, what's up now?

from binance-trading-bot.

D4rkT1m0 avatar D4rkT1m0 commented on June 1, 2024

hello everyone, do you got some news?

from binance-trading-bot.

VandrisV avatar VandrisV commented on June 1, 2024

i have similar problem. i try searching where its problem

from binance-trading-bot.

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.