When I subscribe to the aggregated futures trade stream, I noticed some trades are missing.
The messages come with an aggregated block id and also with a first and last trade ids for that block.
The aggregated block ids are sequential, so this suggests that I am receiving every block of data from Binance, but Binance has dropped some trades in between.
08/30/2021 13:45:51 FTMUSDT - missing trades, went from 89496196 to 89496198
08/30/2021 13:45:51 FTMUSDT - missing trades, went from 89496205 to 89496207
08/30/2021 13:46:19 ADAUSDT - missing trades, went from 415484061 to 415484070
but this data come from aggregated trades with sequential numbers (I print an error otherwise), so no data is dropped in the transmission.
what is happening here?
you can check the test code here: https://gitlab.com/ThomasD3/binancemonitor
it also highlights another issue with lagging for which I’ll open another question