Our code just does that, ignore ticks with negative volume. And as i said, this was put in place several years back after we did see negative volumes.
I took a quick look at the current API documentation before I sent my initial answer and realized, that our filter is actually too restrictive, though. As currently implemented it ignores RtVolume and RtTradeVolume ticks unless volume > 0. The correct filter would be volume >= 0 according to this sentence from the IB documentation: As volume for US stocks is reported in lots, a volume of 0 reported in RTVolume will typically indicate an odd lot data point (less than 100 shares).JR PS. Not to make this more complicated, but other tick types do have documented cases of price or volume values of -1 From Receiving Market Data When and are reported as -1, this indicates that there is no data currently available. Most commonly this occurs when requesting data from markets that are closed. It can also occur for infrequently trading instruments which do not have open bids or offers at that time of the request. On Mon, Aug 9, 2021 at 09:28 AM, Edward wrote:
|