nautechsystems / nautilus_trader

A high-performance algorithmic trading platform and event-driven backtester
https://nautilustrader.io
GNU Lesser General Public License v3.0
1.7k stars 398 forks source link

Add request_order_book_snapshot method #1745

Closed graceyangfan closed 2 days ago

graceyangfan commented 4 days ago

Pull Request

1741 Add request_order_book_snapshot method

Type of change

Delete options that are not relevant.

How has this change been tested?

test with live trading example Describe how this code was/is tested.

cjdsellers commented 2 days ago

Thanks for adding the tests @graceyangfan, much appreciated :pray:.

graceyangfan commented 2 days ago

@cjdsellers In fact, in backtest mode, the request is not doing anything. It only works for live trading at the moment. To make it work in backtest mode, some additional work is still needed.

cjdsellers commented 2 days ago

Yes, for historical requests to work for backtesting the DataEngine needs access to the catalog. There's a section which handles this for ticks already.