¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Is it highly recommended to include "watchdog" function in every program?


 

Hi all, can anyone please kindly advise is that highly recommended to include "watchdog" function in every program?
I need some advice on whether I should include watchdog in my program.

I recently wrote a program to automatically buy and sell a certain securities based on their price (i.e. buy when price > y and sell when price < z)
The program run around the clock.

I'm new to Python and as I browse through topic history in this group I saw that many people talking about using "watchdog".
I tried to do some research on it but so far I only know it can print some alerts if there is any connection issue (I'm sure it's much more than that).

When I was trading manually with TWS, the connectivity issue that I realized are:
1) daily mandatory restart of TWS (I have set a specific time for this and I make sure I'm in front of the computer on that time to relogin so it's ok with it)
2) internet connectivity issue (sometimes it will pop up a window saying "attempting to reconnect" probably due to internet issue, usually after a few minutes the tws will be running again, as I observed the api is still connected with tws even it has connectivity issue in between, so it seems should be no issue for my program to keep running in this case?)

My program is not aimed for downloading historical data, just for sending orders if certain price criteria is met.

In my case, is the watchdog function necessary for me?
Usually what is the reason for people using watchdog in ib api?

Thanks so much for your advice in advance!

Join [email protected] to automatically receive all group messages.