[ts-gen] questions on journal tables

Nils Gebhardt mail at ngebhardt.de
Fri May 8 04:43:14 EDT 2009


Bill, 



On Mon, 2009-05-04 at 12:49 -0400, Bill Pippin wrote: 
> 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 submit recieved looks something like this:


15137|77013| 670618555|3| 5|10|247|GBL|FUT|20090608|0.0||DTB|EUR|FGBL
JUN 09|BUY|1|LMT|121.91|0.0|GTC||DU33186|C|0|test_e|8|506342914|false|
false|0||506342914.0/DU33186/100|||||||||0||0|||||||false|false|false|
false||reduce on fill without block|false|false||0|LastPrice|
15137|77013| 670618644|3| 3| 6|247|Submitted|0|1|0|506342914|0|0|8|

then I think I have observed also case one. 
  
What confuses me slightly right now is the fact that I see the the first
two fields spread over several orders - I thought there would something
like a session key field. The third field is some kind of time stamp, if
remember right. If I see the same submit message several times in the
log with different time stamp, then I probably have ticked "send open
order information on connect" somewhere in the tws settings I guess. 

> 
> 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.

it is merely about limit orders with potential fills coming later. 


> 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).
> 

I will try to make more precise observations with a closer look on the Shim.txt file
and post it if it looks of interest. 


regards

Nils





More information about the ts-general mailing list