I've used this repo for 3 years now with varying success. My use case involves needing to run my model and possibly make trades every hour, with a sleeping period inbetween, at a high level:
const mainLoop = ({ ib, }) => {
ib.connect();
runModel(ib); // evaluate algorithm and possibly place trades
ib.disconnect();
};
I've always had the problem that sometimes the IB client would fail to reconnect at the next hour, and even calling ib.disconnect() and ib.connect() again in a trycatch would not resolve it. It's as if the client has died and only completely restarting my script and the Docker container for IB Gateway would fix it. This used to be an ok solution until IB started forcing the 2FA requirement. Now it's terrible as I'm trading futures and often asleep or not by my phone which means I experience downtime until I'm at my phone again to re-authenticate.
Has anyone else had intermittent connection issues? How did you resolve them? Is there a less buggy and more up to date Node IB API I should use instead?
I've used this repo for 3 years now with varying success. My use case involves needing to run my model and possibly make trades every hour, with a sleeping period inbetween, at a high level:
inside mainLoop:
I've always had the problem that sometimes the IB client would fail to reconnect at the next hour, and even calling
ib.disconnect()
andib.connect()
again in atry
catch
would not resolve it. It's as if the client has died and only completely restarting my script and the Docker container for IB Gateway would fix it. This used to be an ok solution until IB started forcing the 2FA requirement. Now it's terrible as I'm trading futures and often asleep or not by my phone which means I experience downtime until I'm at my phone again to re-authenticate.Has anyone else had intermittent connection issues? How did you resolve them? Is there a less buggy and more up to date Node IB API I should use instead?