¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

granularity of ticks


 

Hello

I'm using reqHistoricalTicks with type=TRADES to get and store historical ticks day after day. This lets me make backtests on my own.
I get ticks from historicalTicksLast and then I store them into a file.
Also I have ProRealTime Trading application, whiche have its own source of datas.
When I compare the tick-by-tick data between the 2 sources (IBAPI and ProRealTime), I can see that some sequential ticks with same price are regrouped in IBAPI. This is quite?annoying, because then the 100ticks-candles for examples ar not the same.
Do you know something about this granularity ? Is there any way to have higher (real) granularity in ticks returned by reqHistoricalTicks??

Here is the way I use to call reqHistoricalTicks :

self.reqHistoricalTicks(reqId+1, self.contract, self.ts_next, "", NbTicksDemandes, "TRADES", 0, False, []);


 

Here is an example with fresh datas (today = 25 may 2023; 20h20 = 14h20 in local time for Future NQ) :


 

IB API Ticks are not real ticks. They are a summary of some miliseconds - don't know the exact time. This results in ticks wich are a real single tick and others where 2 or more ticks accumulated in one tick (for this period of time).
For this reason, it is also not possible to get the bid or ask side of all tick, something you need if you want to build a historical footprint chart.
It is very sad that IB still has no real tick dates.

Kind regards
Christian


 

Thanks a lot for the answer. Is this huge limitation well displayed by IB ? I didn't find it. Do you have an URL with this information ?
Do you know anaother API which could be called to habe real ticks data ?

Kind regards

Florent


 

If ready for "listen real-time and store": consider Nanex (NxCore).
Be careful:
A- Huge amount of data, you need to master a little of C/C++ to handle it. if you create hooks for only a couple of stocks that stay manageable.
B- Their data can be late by a couple of second (but still accurately sequential, just like a pipeline that sometime filled up beyond client/network processing capabilities)
C- $$$

Alternative:
Polygon.io

With IB , give a peep at marketDepth API, doesn't exactly match your request but work differently that ticks API (doesn't have a "historical mode")
It will give you a feeling of the horsepower needed to manage this kind of granular data. Hence the service IB offer to pack historical trades in ticks.

How did you get data out of ProRealTime ? DDE ?


 

SierraChart


On Wed, May 31, 2023 at 8:50?PM Gordon Eldest via <hymagik=[email protected]> wrote:

If ready for "listen real-time and store": consider Nanex (NxCore).
Be careful:
A- Huge amount of data, you need to master a little of C/C++ to handle it. if you create hooks for only a couple of stocks that stay manageable.
B- Their data can be late by a couple of second (but still accurately sequential, just like a pipeline that sometime filled up beyond client/network processing capabilities)
C- $$$

Alternative:
Polygon.io

With IB , give a peep at marketDepth API, doesn't exactly match your request but work differently that ticks API (doesn't have a "historical mode")
It will give you a feeling of the horsepower needed to manage this kind of granular data. Hence the service IB offer to pack historical trades in ticks.

How did you get data out of ProRealTime ? DDE ?


Franco Chiesa Docampo
 

¿ªÔÆÌåÓý

Gordon, is it possible to interface Nanex with IBAPI? Does the latency of IBAPI with TWS and the exchange make redundant any high resolution data? Or is it worth it?

El 31 may. 2023, a la(s) 14:50, Gordon via groups.io <hymagik@...> escribi¨®:

?

If ready for "listen real-time and store": consider Nanex (NxCore).
Be careful:
A- Huge amount of data, you need to master a little of C/C++ to handle it. if you create hooks for only a couple of stocks that stay manageable.
B- Their data can be late by a couple of second (but still accurately sequential, just like a pipeline that sometime filled up beyond client/network processing capabilities)
C- $$$

Alternative:
Polygon.io

With IB , give a peep at marketDepth API, doesn't exactly match your request but work differently that ticks API (doesn't have a "historical mode")
It will give you a feeling of the horsepower needed to manage this kind of granular data. Hence the service IB offer to pack historical trades in ticks.

How did you get data out of ProRealTime ? DDE ?


 

How did you get data out of ProRealTime ? DDE ?
=> I've just set the granularity of the graph on "1-tick", and noted the values...


 

OK @Gordon Eldest, I will have a look at marketDepth API.

As a matter of fact, i'm not really interested in having the real granularity of the tick. I could be happy with 50-ticks candles which would be the good ones, the same ones as in PRT. Is it possible in IBAPI the get 50-ticks candles ??
Or having the real number of ticks agregated in one IBAPI tick returned by historicalTicksLast??

Thanks


 

Nanex to IBAPI:

No,
I don't see how to connect it to IB
nor do I see any reason to connect it.? Because both should be seen as data supplier (While IB is a broker offering a multitude of additional services, and IB never advertised themselves as data provider but as instruments handler)

Nanex deliver raw data directly, there is a need to format the data to an output. (generally a DB)
As data analysis are done in soft aside of the feeder,: IB or Nanex or whatever,? anyway, this is theses pieces that need a link to the feed. IB being one of theses.

Nanex is last step before direct market access, understand that NxCore traffic is the range of 2GB a day for Regular Trading Hours.
The kind of DB to use, need to be able to handle TB of datas. (or you need to stay restricted to the range of ~100 of instruments.)

The level of tick granularity you seems to look for require to carefully consider the amount of data you will have to deal with.
If IB does pack ticks it is for good reasons, to offer a generally decent tradeoff between data rate and content richness.

I suspect that you should consider polygon.io,? Even if slower and less real time, it is seems easier to link the REST HTTP world to your apps than the C word, also it will be more easy for you to call just the data set you need.


 

On Thu, Jun 1, 2023 at 12:48 AM, FrenchFlorent wrote:

As a matter of fact, i'm not really interested in having the real granularity of the tick. I could be happy with 50-ticks candles which would be the good ones, the same ones as in PRT. Is it possible in IBAPI the get 50-ticks candles ??
Or having the real number of ticks agregated in one IBAPI tick returned by historicalTicksLast??
I don't see how.
Packing is decided by IB based on rules that involved change in price and a kind of timeout to push out the latest aggregation.
You don't really respect the concept of Ticks if you got for a fixed tick count for aggregation.

Bar including 5Sec bar does contain a "number of transactions". It doesn't replace ticks but maybe helpful for you.

Otherwise you probably should use the Ticks API and decide what and how you aggregate the ticks