Closed LJingnan closed 4 months ago
It depends on the user's intention. Since in the case of Binance, there is no way to fetch the complete full market depth, the market depth is always incomplete in a strict sense. But, over time, with the diff. book depth stream, the market depth becomes more complete. Essentially, it depends on the natural refresh.
If the connection is lost, one can delete all market depth data. In that case, reaching a state close to the complete market depth will take long time. So, I decided to leave the market depth behind the snapshot that can be fetched.
If you want to clear all the market depth in the backtesting, modifying the market depth clear event with an invalid side will do.
It depends on the user's intention. Since in the case of Binance, there is no way to fetch the complete full market depth, the market depth is always incomplete in a strict sense. But, over time, with the diff. book depth stream, the market depth becomes more complete. Essentially, it depends on the natural refresh.
If the connection is lost, one can delete all market depth data. In that case, reaching a state close to the complete market depth will take long time. So, I decided to leave the market depth behind the snapshot that can be fetched.
If you want to clear all the market depth in the backtesting, modifying the market depth clear event with an invalid side will do.
Thank you very much
Here we clear the depth from best_bid_tick to clear_upto (clear_upto_price is the lowest bid price from restful api). This approach would miss the level below clear_upto_price. Suppose the data project loss the data for 10 minutes due to Internet problem, when project restart to work, it would get a restful depth-1000, but clearly all past data is useless.