[ts-gen] Risk Triplets [Was: New OCA group use case

R P Herrold herrold at owlriver.com
Sun Aug 23 15:27:14 EDT 2009

On Sun, 23 Aug 2009, Ken Feng wrote:

> Looking up the fill price in OrderStatus, I grepped my oversized
> ShimText and found that 3|11| 7| appears to be the signifier for a
> filled order.

The first three fields set off by pipes are for the shim's 
use: owning process ID, seconds since midnight that the 
process stated, and elapsed seconds since start with 
microsecond resolution.  Then the next three fields set off my 
pipes are first, one of: (command, request, message, or 
commentary ); second a major categoy therein; and third a sub 
category.  This is done to aid mechanical parsing.  The 
remaining pipe delimited fields on a line until the next CR 
will vary as the contents of that sub-category vary.

The   3| indicates a major type record, here a 'message' from
 		the TWS
The |11| indicates the major class of the (here) message, and
 		particularly that a sub-type
     | 7 detail record

Scanning a ShimText, they should be obvious

       1| command channel content to the shim
       2| requests                to the TWS   from the shim
       3| messages as received    from the TWS back to the shim --
       4| commentary or status messages by the shim


|1| 2| 0|set loglevel Detail;|
|1| 5| 0|ping pre;|
|1| 2| 0|select next;|

|2|14| 1|14|1|5||||
|2| 8| 1|8|1|1||||

|3| 9| 1|1|	TWS' response on the 'select next'

|4| 0| 0|# star|****************|
|4| 1| 0|# head|0.94|080820|data|
|4| 0| 0|# star|****************|
|4| 2| 0|# hand|44|1|45|20090806 15:42:04 EST|Connect with
 	: cv 44, id 1, sv 45|
 	(above is start up banner commentary)

|4|11| 0|# set loglevel Detail;|
|4|11| 0|# select next;|
 	(comment pasthroughs)

As Bill has noted in many past posts, our choices after the 
first digit are documneted and follow the equivalent Request 
or reply Messages used by the TWS, in the two Java scripts. 
Some sub-commands or sub-messages have been extended or varied 
over time as the server or client version has been advanced by 

-- Russ herrold

More information about the ts-general mailing list