Since the partial depth gives us results every 100ms, so there might be some trades going on in the 0-99ms part and we may miss those packets to include in our order book.
So how do I maintain an order book continuously?
Here is recommendation of how to maintain the local orderbook:
https://binance-docs.github.io/apidocs/spot/en/#how-to-manage-a-local-order-book-correctly
我获取到值的时候。经常报错。
DepthCacheExample depthCacheExample = webSocketMap.get(convertThirdSymbol(symbol));
NavigableMap<BigDecimal, BigDecimal> asks = depthCacheExample.getAsks();
NavigableMap<BigDecimal, BigDecimal> bids = depthCacheExample.getBids();
我去拿里面的数据的时候,经常报错。
[Binance]客户端异常:java.util.ConcurrentModificationException