Skip to content

Commit fb630f3

Browse files
committed
Fix instrument config format
1 parent 7fca200 commit fb630f3

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

20220617/demo/live.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import msgspec.json
12
from nautilus_trader.adapters.interactive_brokers.config import (
23
InteractiveBrokersDataClientConfig,
3-
InteractiveBrokersExecClientConfig
4+
InteractiveBrokersExecClientConfig,
45
)
56
from nautilus_trader.adapters.interactive_brokers.factories import (
67
InteractiveBrokersLiveDataClientFactory,
7-
InteractiveBrokersLiveExecClientFactory
8+
InteractiveBrokersLiveExecClientFactory,
89
)
910
from nautilus_trader.config import InstrumentProviderConfig, TradingNodeConfig
1011
from nautilus_trader.live.node import TradingNode
@@ -24,13 +25,11 @@
2425
gateway_port=4002,
2526
instrument_provider=InstrumentProviderConfig(
2627
load_all=True,
27-
filters=tuple(
28-
{
29-
"filters": (
30-
tuple({"secType": "STK", "symbol": "SEC0", "exchange": "BVME.ETF"}.items()),
31-
tuple({"secType": "STK", "symbol": "SMH", "exchange": "BVME.ETF"}.items()),
32-
)
33-
}.items()
28+
filters=msgspec.json.encode(
29+
[
30+
{"secType": "STK", "symbol": "SEC0", "exchange": "BVME.ETF"},
31+
{"secType": "STK", "symbol": "SMH", "exchange": "BVME.ETF"},
32+
]
3433
),
3534
),
3635
),

0 commit comments

Comments
 (0)