Vbk, the chart API.
Bars
A bar of a Deepdom chart is a slice of time of the session, with the order book and the trades of that slice.
See Two indices for
BookIndex and TickIndex. Never read bars after BookIndex during the history: they are not there yet.
Trades
WithOnTickCall set, OnTick receives every trade:
Feed is an alias: using Feed = VolumetricaAPI.Connection.Structure;.
A trade at the ask or above is a buy, at the bid or below a sell: this is the rule the chart itself uses for
AskVol and BidVol.
Aggregated trades
A large order is often filled by several trades at the same price within a few milliseconds. The chart can put them back together: ask for it inOnInit, and OnTick then receives an AggrInfo with the trade which completes an aggregate.
aggrInfo is null for every trade which does not complete an aggregate, and the aggregate it describes includes the trade just received. The Big Trade Marker example uses it.
Prices as integer ticks
Volume data is indexed by the price as an integer number of ticks, calledPinT. Convert with:
Volumes
Volumes are integers. For symbols traded in fractions (cryptocurrencies) the real size is the integer multiplied byVbk.VolMultiplier: use it for the values of a series, and Vbk.FormatVolume(value) for a text (1.5K), which applies it by itself.
The session
These are snapshots of the whole session: in realtime they follow every trade, but during the history they already hold the trades which come after the bar being calculated. Use them for what the session is now, as the Profile POC example does, not for a value bar by bar.