Closed lufengkuang closed 1 month ago
one of the examples doesn't work examples/live/binance/binance_futures_testnet_orderbook_imbalance.py
Add here...
the error message reads as follow:
Traceback (most recent call last): File "F:\quant\ntrader\test.py", line 103, in strategy = OrderBookImbalance(config=strat_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\office.conda\envs\ntrader\Lib\site-packages\nautilus_trader\examples\strategies\orderbook_imbalance_rust.py", line 116, in init self.book = nautilus_pyo3.OrderBook(self.book_type, pyo3_instrument_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument 'book_type': 'BookType' object cannot be converted to 'BookType'
nautilus_trader
Hi @lufengkuang
Thanks for the report on this.
I've now fixed the import on develop branch.
develop
Bug Report
one of the examples doesn't work examples/live/binance/binance_futures_testnet_orderbook_imbalance.py
Expected Behavior
Add here...
Actual Behavior
the error message reads as follow:
Traceback (most recent call last): File "F:\quant\ntrader\test.py", line 103, in
strategy = OrderBookImbalance(config=strat_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\office.conda\envs\ntrader\Lib\site-packages\nautilus_trader\examples\strategies\orderbook_imbalance_rust.py", line 116, in init
self.book = nautilus_pyo3.OrderBook(self.book_type, pyo3_instrument_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument 'book_type': 'BookType' object cannot be converted to 'BookType'
Steps to Reproduce the Problem
Specifications
nautilus_trader
version: 1.192.0