[ts-gen] Risk-related events [Was: Risk Triplets ...]
pippin at owlriver.net
Mon Aug 24 15:11:27 EDT 2009
Your question here is in two parts, first about risk-related events,
and second about the various order states they indicate. I'll answer
the first here, and as for the second, which is somewhat open-ended,
I'll focus on just part, the actual order state values that occur
in order status messages, in a follow on post.
> Now, besides 3|11| 7|, are there other "risk triplets" I need to
> watch out for, from the perspective of order management? ...
Taken from the NEWs, below is the first description of the completed
order journalling feature:
* Order journalling for the shim is now complete. You don't
need to refer to it --- the same information has been and
still is available through the output log channel printed
by the shim --- but it's there if you need it.
In short, CreateEvent and ChangeOrder records track order
requests by the shim towards the IB tws, while OrderStatus,
ActiveOrder, OrderResult, and OrderReport records reflect
the order status, open order, portfolio value, and execution
report messages from the IB tws to the shim.
For more detail, see the "Triple 8 release" message on the
As for the message and request indices, you can determine what
possibilities exist from the IB Java sample client sources,
EReader.java and EClientSocket.java, or from the api guide available
from IB's web site, APIprintable.pdf. You should download local
copies of both the java reader/sender files, and the API guide,
from IB's website.
I'm reluctant to duplicate IB docs any more than necessary, since
that just puts me in the tedious position of wasting time and having
to keep up with their changes and improvemnts, so you should make
sure you have your own copies of the sample client sources and the
api guide pdf file.
>From the java sample client sources, EReader.java, near the top of
the file you'll see, among others, the following static defs for what
in C would be #defines:
static final int ORDER_STATUS = 3;
static final int OPEN_ORDER = 5;
static final int ACCT_VALUE = 6;
static final int PORTFOLIO_VALUE = 7;
static final int EXECUTION_DATA = 11;
As indicated above, message events 3, 5, 7, and 11 are all journalled.
The account quads, those message index 6, are varied, have subtypes as
mentioned by Russ, and are not journalled. Think of those as
up-to-the-minute, fast changing summary data, and so not suitable for
journalling. You'll see what I mean if you keep an ongoing account
data subscription, and try to decide which parts are interesting.
More information about the ts-general