Skip to content

Commit 5e1e501

Browse files
committed
Normalize venue to Tardis exchange mapping format
1 parent 6e21a3a commit 5e1e501

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nautilus_trader/adapters/tardis/providers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ async def load_all_async(self, filters: dict | None = None) -> None:
8585
for venue in venues:
8686
venue = venue.upper().replace("-", "_")
8787
for exchange in nautilus_pyo3.tardis_exchange_from_venue_str(venue):
88+
exchange = exchange.lower().replace("_", "-")
8889
self._log.info(f"Requesting instruments for {exchange=}")
8990
pyo3_instruments = await self._client.instruments(
90-
exchange=exchange.lower(),
91+
exchange=exchange,
9192
base_currency=list(base_currency) if base_currency else None,
9293
quote_currency=list(quote_currency) if quote_currency else None,
9394
instrument_type=list(instrument_type) if instrument_type else None,
@@ -147,9 +148,10 @@ async def load_ids_async(
147148
available_offset_ns = available_offset
148149

149150
for exchange, symbols in venue_instruments.items():
151+
exchange = exchange.lower().replace("_", "-")
150152
self._log.info(f"Requesting instruments for {exchange=}")
151153
pyo3_instruments = await self._client.instruments(
152-
exchange=exchange.lower(),
154+
exchange=exchange,
153155
base_currency=list(base_currency) if base_currency else None,
154156
quote_currency=list(quote_currency) if quote_currency else None,
155157
instrument_type=list(instrument_type) if instrument_type else None,

0 commit comments

Comments
 (0)