For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

unexpected behaviour of notify_store / notify_data when IB's reconnect = -1

  • Hello,

    I am experiencing connectivity issues when I use reconnect=-1 for IBStore.


    1- Run IB gateway
    2- Run code below
    3- Let bt run for a while to start getting LIVE data
    4- Quit IB gateway
    5- Let bt run for a while.
    6- Re-run IB gateway

    What happens:

    After quitting IB gateway, notify_data triggers too late. In the log below you can see the last timestamp before quitting was 08:30:30 and CONNBROKEN arrives at 08:32:52 ( 08:32:52 is roughly the time I re-run IB gateway). In addition CONNBROKEN shows up only for one (not always the first one, i tested a few times) of the datas.

    After re-running IB gateway, connection is established and DELAYED state is assured only for the data with CONNBROKEN status above. The other datas do not get into DELAYED state, thus miss some historical data.

    Here you can find the code:

    Here are the logs:

Log in to reply