You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the high cost of subscribing to the order book, especially for strategies that run multiple instruments and are not high-frequency, it is important to consider the utility of micro-level order book data for strategies. Therefore, adding an HTTP method to fetch order book snapshots should be considered. I request the addition of a request_order_book_snapshot method to obtain this data within the model.
Example usage:
def on_historical_data(self, data):
if isinstance(data, OrderBookDeltas):
self.deltas = data
def on_bar(self, bar: Bar):
self.request_order_book_snapshot(
instrument_id=self.instrument_id,
limit=5
)
# Process deltas
The text was updated successfully, but these errors were encountered:
I think this makes sense, that a trader may require a snapshot at some arbitrary frequency and depth - but not necessarily be maintaining a book the entire time with deltas.
Thankfully this wasn't too much trouble to implement with the flexible messaging system.
The only thing left here from what I can see is to add some test coverage for the DataEngine. You could use the TestDataProvider.order_book_snapshot(...) method.
Do you have an adapter implementation for Binance?
Feature Request
Due to the high cost of subscribing to the order book, especially for strategies that run multiple instruments and are not high-frequency, it is important to consider the utility of micro-level order book data for strategies. Therefore, adding an HTTP method to fetch order book snapshots should be considered. I request the addition of a request_order_book_snapshot method to obtain this data within the model.
Example usage:
The text was updated successfully, but these errors were encountered: