So I probably answered my own question via an experiment - getting the same 5 secs bars as real-time and as historical.
They seem to match exactly except for field naming and precision.
Docs here are basically wrong -?.
"average" and "barCount" fields of historical bars are the same as "wap" and "count" fields of real-time bars except that "wap" in real-time bars has decimal precision of 3 digits after period and "average" of historical bars seem to have only 2 digits precision.
I checked just for one symbol of stocks and options and it seems to hold true. Perhaps, there are occasional discrepancies - I didn't check at large scale.
On Wed, Feb 17, 2021 at 1:03 AM Alex Gorbachev <ag@...> wrote:
Hi all,
Is WAP available for historical bars?
Looking at the API docs .
WAP is supposed to be present in the historical bars but I don't see it (I'm using ib_insync?Python module if that makes any difference). I can see WAP is returned in real-time bars but not in historical. I can see average. I wonder if that's basically WAP and just named differently than in the docs. I'm using IB Gateway?978.