Repository: nautechsystems/nautilus_trader
File: nautilus_trader/adapters/hyperliquid/data.py (Python)

Code before:
                self._handle_data(trade_tick)
        except Exception as e:
            self._log.error(f"Error requesting trade ticks for {request.instrument_id}: {e}")

    async def _request_quote_ticks(self, request: RequestQuoteTicks) -> None:
        """
        Request historical quote ticks.
        """
        try:
            quote_ticks = await self._http_client.request_quote_ticks(
                request.instrument_id,
                request.start,
                request.end,
                request.limit,
            )
            for quote_tick in quote_ticks:
                self._handle_data(quote_tick)
        except Exception as e:
            self._log.error(f"Error requesting quote ticks for {request.instrument_id}: {e}")

    async def _request_bars(self, request: RequestBars) -> None:
        """
        Request historical bars.
        """
        try:
            bars = await self._http_client.request_bars(
                request.bar_type,
                request.start,
                request.end,
                request.limit,
            )
            for bar in bars:
                self._handle_data(bar)
        except Exception as e:
            self._log.error(f"Error requesting bars for {request.bar_type}: {e}")

    async def _request_order_book_snapshot(self, request: RequestOrderBookSnapshot) -> None:
        """
        Request order book snapshot following standard pattern.
        """
        try:
            snapshot = await self._http_client.request_order_book_snapshot(
                request.instrument_id,
                request.depth,
            )
            self._handle_data(snapshot)
        except Exception as e:
            self._log.error(
                f"Error requesting order book snapshot for {request.instrument_id}: {e}",
            )


Review comment (suggestion):
These will be `pyo3_bars` which will then need to be converted (e.g. https://github.com/nautechsystems/nautilus_trader/blob/develop/nautilus_trader/adapters/bitmex/data.py#L448)

Code after:
            )
            trade_ticks = TradeTick.from_pyo3_list(pyo3_trades)
            for trade_tick in trade_ticks:
                self._handle_data(trade_tick)
        except Exception as e:
            self._log.error(f"Error requesting trade ticks for {request.instrument_id}: {e}")

    async def _request_quote_ticks(self, request: RequestQuoteTicks) -> None:
        """
        Request historical quote ticks.
        """
        try:
            pyo3_quotes = await self._http_client.request_quote_ticks(
                request.instrument_id,
                request.start,
                request.end,
                request.limit,
            )
            quote_ticks = QuoteTick.from_pyo3_list(pyo3_quotes)
            for quote_tick in quote_ticks:
                self._handle_data(quote_tick)
        except Exception as e:
            self._log.error(f"Error requesting quote ticks for {request.instrument_id}: {e}")

    async def _request_bars(self, request: RequestBars) -> None:
        """
        Request historical bars.
        """
        try:
            pyo3_bars = await self._http_client.request_bars(
                request.bar_type,
                request.start,
                request.end,
                request.limit,
            )
            bars = Bar.from_pyo3_list(pyo3_bars)
            for bar in bars:
                self._handle_data(bar)
        except Exception as e:
            self._log.error(f"Error requesting bars for {request.bar_type}: {e}")