Hi team,
I have problems regarding the exchange timestamp (or transaction timestamp, trade time) of the data received from websocket, I observe that there can be inconsistency between aggtrade, trade, and bookTicker for the same trade event. Can you please help explain
- how is the trade time / transaction time generated?
- A aggtrade can contains trades with different trade timestamp (inferred from the first / last trade id), how the aggtrade works in futures api?
Thanks!
- how is the trade time / transaction time generated?
Transactions time is generated by the engine when the transaction occurs.
- A aggtrade can contains trades with different trade timestamp (inferred from the first / last trade id), how the aggtrade works in futures api?
In futures, aggregated trades have a time-window where trades can be aggregated.
https://binance-docs.github.io/apidocs/futures/en/#compressed-aggregate-trades-list
Get compressed, aggregate market trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.
On the other hand, spot does not make use of a time-window and all trades within an aggTrade belong to a single taker order.