Closed 312707047 closed 1 week ago
T
still exists in the target streams. I think the message may not be for the trade or diff book stream. Could you check the raw message where the error occurs?
The error happened at row 183.
It is dealing with the first data stream without data
as a dictionary key.
And I checked the data. It seems that the lastUpdateId
doesn't have T
inside
Could you post the full message of the specific row? I checked the Binance API documentation, and nothing seems to have changed. It may be a temporary problem on Binance's side, but I'm unsure. Meanwhile, I think you can skip that message and rely on the natural refresh.
I’ve checked the data I fetched recently. I found that every other event except trade
has no T
inside. And I also checked the Binance API documentation, and everything seems no problem there. I will try to figure it out in the future.
I think you may be connecting to the spot stream. In the spot stream, there is no T
field in the diff depth stream. Therefore, it is inaccurate to use it, but, you have to use the E
field instead. However, note that the E
field represents the timestamp when the exchange sent the feed, not when the exchange actually accepted the order. Please refer to the documentation for more details. https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream
This solve the problem, thanks!
It seems that Binance change the format of their stream data?