[ts-gen] cross session orders, client ids
pippin at owlriver.net
pippin at owlriver.net
Wed Dec 17 13:45:24 EST 2008
Nils,
I'm not sure if the 081126 cross-session shim is working out for
you, or else if you are still having problems with the issues
you mentioned. I believe that you solved one of your problems
on your own, before reposting, and that a previous message helped
you with the configuration of the shim clientid variable. I
suspect that the last problem, of the shim's timing out while
waiting for account data, went away on its own. I'm writing here
to check if you are still having those --- or any other ---
problems with the shim.
Presumably you've been able to control the clientid value in risk
mode via the .shimrc ClientId equation.
E.g., if that variable was bound to 9 in the .shimrc file, you
ran the shim in --risk mode with the once option, and no other
shim was connected to the IB tws with that particular clientid,
you would expect to see a banner similar to the following:
> The trading shim has connected to the database server
> and loaded 51649 products; connected to the IB tws as
> client id 9; and queried for the account code, which
> seems to be DUxxxxx. Program initialization has been
> completed.
Now, about times where the banner does not appear as above, and
in particular where the shim is unable to receive data from the
IB tws:
> The trading shim has connected to the database server
> and loaded 51649 products; connected to the IB tws as
> client id 9;
>
> Problem: 524 could not obtain IB account info at startup
> Exiting
In the text above, the shim has timed out waiting for a
response from the IB tws for its account info query, so
that the shim can determine the account code, which is
required for journalling. There is a PollTime variable
that you can set in the .shimrc file, and you are welcome
to increase it from its default value of three seconds,
though if the IB tws can't respond to an account info
query in three seconds, something's wrong.
The only possibilities I can see boil down to:
(1) the IB tws is slow or unresponsive; and
(2) the shim is unable to properly read the
first account quad.
You can distinguish the first case from the second by the
contents of the log/tws2shim.bin file, once translated by
the bin/msg.filter script; if the account quads have arrived,
the shim should have been able to read the first of them,
and if not, solutions are pretty much outside the shim's
control.
I often see repeated 524 connect failures whenever there are
network problems, or the IB tws is otherwise occupied. In
particular, if the status color of open orders is maroon, or
in any case, if the orders/subscriptions page grid has changed
to magenta, the problem is almost certainly network-related.
There are also a number of visual alerts in the tws gui that
seem to block the account info messages, so turning those off
is also a good idea. For the common case, though, of network
delays, you'll need to either fix the problems with connectivity,
if they are on your end, or else hope IB's servers come up,
otherwise.
About the time you were seeing the timeouts, I was also seeing
hard, permanent 524 errors. These happened on a Friday evening
late, not too long before the IB servers went down for the Saturday
maintenance window; in this case I was running the risk.rb tests,
and once there were open orders hanging around, they turned maroon,
and could not be deleted in the gui. After this nothing I did
that evening could get the shim to connect. Monday morning the
shim worked fine.
Please let us know on the list if you have problems that are not
due to network issues, or IB tws visual alerts. In particular,
if the shim receives the account data, but fails to read it, I'd
like to know about it.
Thanks,
Bill
More information about the ts-general
mailing list