Tick stream volume calculation

I am parsing the tick stream and had a question about the data.

each tick in the packet adds to the previous volume?

For example, this packet and tick below

[{'id': 30, 's': '', 'td': 20220614, 'bp': 15049, 'bt': 1655161390844, 'ts': 0.25, 'tks': [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288521}, {'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288522}, {'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288523}, {'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288524}, {'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288525}, {'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288526}, {'t': 53, 'p': -1, 's': 1, 'b': -1, 'a': 0, 'bs': 6, 'as': 4, 'id': 53288527}, {'t': 54, 'p': -1, 's': 1, 'b': -1, 'a': 0, 'bs': 6, 'as': 4, 'id': 53288528}]}]
TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288521}]
	[   0    ] BID   [3762.25 ] BID VOL [   7    ]
	[   0    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   0    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288522}]
	[   1    ] BID   [3762.25 ] BID VOL [   7    ]
	[   1    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   1    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288523}]
	[   2    ] BID   [3762.25 ] BID VOL [   7    ]
	[   2    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   2    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288524}]
	[   3    ] BID   [3762.25 ] BID VOL [   7    ]
	[   3    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   3    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288525}]
	[   4    ] BID   [3762.25 ] BID VOL [   7    ]
	[   4    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   4    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 0, 'p': 0, 's': 1, 'b': 0, 'a': 2, 'bs': 7, 'as': 7, 'id': 53288526}]
	[   5    ] BID   [3762.25 ] BID VOL [   7    ]
	[   5    ] ASK   [3762.75 ] ASK VOL [   7    ]
	[   5    ] LST   [3762.25 ] LST VOL [   1    ]

TICKS [{'t': 53, 'p': -1, 's': 1, 'b': -1, 'a': 0, 'bs': 6, 'as': 4, 'id': 53288527}]
	[   6    ] BID   [ 3762.0 ] BID VOL [   6    ]
	[   6    ] ASK   [3762.25 ] ASK VOL [   4    ]
	[   6    ] LST   [ 3762.0 ] LST VOL [   1    ]

TICKS [{'t': 54, 'p': -1, 's': 1, 'b': -1, 'a': 0, 'bs': 6, 'as': 4, 'id': 53288528}]
	[   7    ] BID   [ 3762.0 ] BID VOL [   6    ]
	[   7    ] ASK   [3762.25 ] ASK VOL [   4    ]
	[   7    ] LST   [ 3762.0 ] LST VOL [   1    ]
the first tick has 
7 contracts @ 3762.25 bid
7 contracts @ 3762.75 offer
1 contract traded @ 3762.25
so the book should have 
6 contracts @ 3762.25
7 contracts @ 3762.75

second tick
would add another 
7 contracts @ 3762.25 bid
7 contracts @ 3762.75 offer
1 contract traded @ 3762.25
leaving
6 contracts @ 3762.25
7 contracts @ 3762.75

combined
13 contracts @ 3762.25
14 contracts @ 3762.75

Is that how the tick stream volumes are calculated or am I misunderstanding something?

the data is aggregated by timestamp – if they have the same timestamp, overwrite previous data with newer ones!

Although it still seems I am unable to have a proper order type layout. I did try subscribing to the DOM to get that that data and integrate it with the data coming from the tick stream but even that doesn’t seem to be accurate.

@Alexander @BWeis or any other developers can I get some feedback on this issue?

is there any way to accurately track the trade prices and keep them consistent?

I’ve looked at the DOM, tick stream, volume charts, tick charts, I can never get them to agree, is this just a limitation of the data or stream or am I making coding errors in my calculations?

Here’s a gif of price action, the DOM with pulling and stacking enabled and the tick stream data. The DOM just hops around, the traded amount doesn’t match… Is there any way to get a coherent complete view?

It does appear based on that GIF that your DOM and tick stream data are not in sync. I can see that the tick stream matches up with the DOM when I look at it, so this is a localized issue I think. I would normally say check your market data, but you are seeing level 2 data already so I can’t see how that could be the case.

Are you having other connectivity issues? A bad or slow connection could theoretically put these out of sync. We have also learned in the past that certain anti-virus software can interfere with the WebSocket data streams.

I don’t have any connectivity issues, I logged in to the browser to document the issue. I typically get the data through websockets and I couldn’t get the books to match.

If there should be 30 Offer limit orders at price level x, the tick stream shows less than 30 volume trade @ the Offer price but then the price breaks above that Offer limit price, this can be problematic.

Any update on this issue?