[ts-gen] Market data subscription request-to-1st-message round-trip times
pippin at owlriver.net
Thu Apr 3 13:45:39 EDT 2008
IB tws api users are probably familiar with the error code 200, "No security
definition has been found for this request". This occurs properly either
when no such symbol is known to IB, or else if you do not have account
subscription rights for that symbol, e.g., for most overseas exchanges.
I believe it may also occur occasionally for valid symbols, most often when
network access to data farm and history farm servers seems problematic, so
perhaps this problem is due to timeouts for requests by the IB tws to the
Access to market data for well-known symbols should be reasonably fast, with
observed round-trip times here in the low tenths of a second. The following
are measurements taken from the log files for the first two regression tests
of the day.
For the symbols: AIG, and [CAT HPQ IBM JNJ JPM MCD], where the first was
already subscribed in the gui, and the other six were being requested for
the first time this morning, the latencies in seconds between request and
first tick were as follows:
Given well-known but new-to-the-session symbols, there seems to be a latency
for the first data to appear of 0.1 to 0.2 seconds. For the minimum of 0.08,
where there is no need to wait on the upstream, the interval is still several
times the 0.02 pacing requirement suggestd by the api limit of at most 50
requests per second.
Times were similar for the second run of the regression tests, with the
already-subscribed market line providing data in even less time than on
the first try:
The differences above were computed using the 3rd column of a ShimText log
file, where the 1st is the pid; 2nd, time in seconds since midnight, and 3rd,
time in microseconds according to the processor time stamp counter.
More information about the ts-general