[ts-gen] questions on journal tables

Bill Pippin pippin at owlriver.net
Mon May 4 12:49:00 EDT 2009


Nils,

About your 1st order journal question:

> ... sometimes I [experience] difficulties to catch all messages. 

> I observered incomplete updates especially of the table OrderStatus; for
> example  'Submitted' of an record missing, then 'Filled' coming in.  

> All other tables appearently were not affected, cancel via CreateEvent
> always possible and OrderReport appearently complete as also
> ActiveOrder. 

At this point, I'm not sure if this reflects a problem in the shim or
not.  Next time you see this, please check the log file, and determine
which of the following two cases occurs:

    * a submit message was received by the shim from the IB tws, and the
      shim failed to write it to the journal; or

    * no submit message was received by the shim, and naturally enough,
      the shim did not create one to post either.

If the first case applies, then I believe you've found a bug, and I hope
you'll work with us to help track it down.  I don't know right off what
would cause this problem.

If the second case applies, then I believe we are seeing a natural and
perhaps purposeful race in the IB tws api protocol; out of date order
status messages are deleted instead of being transmitted, so that if
an order fills quickly enough, no submit message occurs.  There is
nothing the shim can or should do about this case.

I believe I've noticed the second case myself, so please keep your eyes
open for reoccurrences of your problem, and if it does, please let us
know whether an IB tws api order status message with the Submitted state
was received by the shim or not (1st and 2nd cases above, respectively).

Thanks,

Bill


More information about the ts-general mailing list