Websocket subscribe ... an interesting solution, unfortunately not each exchange supports this solution...
You probably don't wanna be using an exchange that doesn't even offer a websocket connection tbh. Every single major exchange supports it, so this is a non issue.
Why 48 hours or is it a limit?
This was just an arbitrary example of a bot configuration that I had used. You can let bots run forever if you want, you also have the option to set a time limit if desired.
I do not really understand how it is possible that API query limits are not a problem websocket subscribes has also limitations for example binance 5 messages per sceond
WebSocket connections have a limit of 5 incoming messages per second.
...
A connection that goes beyond the limit will be disconnected; IPs that are repeatedly disconnected may be banned.
There are two reasons this isn't an issue:
1- A trading bot will only have to subscribe to data once. So the bot starts, it sends a subscribe websocket message to the exchange to subscribe to an order b ook feed, and then it no longer has to subscribe again.
2- Limits are just that, a limit. As long as you adhere to the limit you'll be fine. Even if the bot does need to subscribe to more data feeds, the application enforces a short wait between subscribe calls to ensure that it's adhering to each exchange's API limits by not subscribing to too many at once. So if the bot did have to make a number of subscribe calls (say it needs to subscribe to the order book feed, trade feed, and OHLCV feed for a few different trade pairs), it would spread these out by waiting X seconds between subscribe calls. The bot would just wait until all the data is loaded, even if it ends up waiting 20-30 seconds for all data feeds to be established. Once they're established, no more subscribe calls will need to be made.