Ah, ok. I'm referring to data directly from the exchanges.
Ah, ok. I'm referring to data directly from the exchanges.
The data you get from IB is probably fine for most purposes. I use their API for trading but I get data from polygon.io since IB is so cumbersome and limited when it comes to getting data. The raw trade data from the exchanges (via polygon.io) is a little too raw to be practical due to all the trade conditions that must be sorted through. Polygon does provide a call that will return 1-min bars that have been filtered for you based on trade condition flags on the raw trades.
Here is an explanation of trade conditions and how to use the trade data. This chart isn't enough though. You nee this 200+ page document that explains more, which I have a link to somewhere.
https://polygon.io/glossary/us/stocks/conditions-indicators
The trades from polygon are correct and are exactly as they come from the exchanges. These aren't "issues". It's just that what is coming from the exchanges is more complex and complete than most people realize. Trades are not "being reported at wrong times" by the exchanges. Sometimes data is reported late, corrected, etc. This is what the trade condition field is all about. You'll have to deal with this when using real-time data from the exchanges regardless of whether it is polygon or not.
Well, i dont agree with this statement, but if it works for you, then thats all that matters i think.