{"record":{"id":"e624070c8f789fed","repo":"nautechsystems/nautilus_trader","slug":"hyperliquid-does-not-provide-historical-market-tra","errorCode":null,"errorMessage":"Hyperliquid does not provide historical market trades via HTTP API","messagePattern":"Hyperliquid does not provide historical market trades via HTTP API","errorType":"exception","errorClass":"PyValueError","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/python/http.rs","lineNumber":272,"sourceCode":"        pyo3_async_runtimes::tokio::future_into_py(py, async move {\n            Err::<Vec<u8>, _>(to_pyvalue_err(anyhow::anyhow!(\n                \"Hyperliquid does not provide historical quotes via HTTP API\"\n            )))\n        })\n    }\n\n    #[pyo3(name = \"request_trade_ticks\", signature = (instrument_id, start=None, end=None, limit=None))]\n    fn py_request_trade_ticks<'py>(\n        &self,\n        py: Python<'py>,\n        instrument_id: InstrumentId,\n        start: Option<jiff::Timestamp>,\n        end: Option<jiff::Timestamp>,\n        limit: Option<u32>,\n    ) -> PyResult<Bound<'py, PyAny>> {\n        let _ = (instrument_id, start, end, limit);\n        pyo3_async_runtimes::tokio::future_into_py(py, async move {\n            Err::<Vec<u8>, _>(to_pyvalue_err(anyhow::anyhow!(\n                \"Hyperliquid does not provide historical market trades via HTTP API\"\n            )))\n        })\n    }\n\n    /// Request the recent public trade snapshot for an instrument.\n    ///\n    /// Hyperliquid's `recentTrades` endpoint is a bounded newest-first snapshot,\n    /// rather than a range-query endpoint. The returned trades are normalized to\n    /// ascending event time and then constrained to the requested window.\n    ///\n    /// A self-hosted node without the indexer responds with HTTP 422. This is\n    /// treated as no available coverage so requests can still complete.\n    #[pyo3(name = \"request_public_trades\", signature = (instrument_id, start=None, end=None, limit=None))]\n    #[gen_stub(override_return_type(type_repr = \"typing.Any\", imports = (\"typing\",)))]\n    fn py_request_public_trades<'py>(\n        &self,\n        py: Python<'py>,","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/python/http.rs#L254-L290","documentation":"Hyperliquid's HTTP API does not expose historical market trade ticks, so the Python HTTP client's request_trade_ticks is intentionally a stub that always returns an error through a rejected future. Like the quote stub, this is a permanent capability gap in the adapter rather than a transient or configuration error. Recent trade snapshots are available instead via the dedicated snapshot request method, and live trades via the WebSocket subscription.","triggerScenarios":"Calling the Hyperliquid HTTP data client's request_trade_ticks from Python (or via the DataEngine's historical trade-tick request path routed to it), with any arguments.","commonSituations":"Backfilling trade history through a Hyperliquid data client; porting code from adapters with HTTP trade history; wiring catalog/backtest data loading against Hyperliquid.","solutions":["Use the recent public trade snapshot request method for current trades instead of historical ranges","Subscribe to the trades WebSocket stream and persist trades locally to build history","Route historical trade-tick requests to an adapter/venue that supports them","Use Hyperliquid candle/OHLCV endpoints if bar-level history suffices"],"exampleFix":"// before\ntrades = client.request_trade_ticks(instrument_id, start, end)  # always errors\n// after\nsnapshot = client.request_trade_snapshot(instrument_id)  # supported recent snapshot\nclient.subscribe_trade_ticks(instrument_id)              # live stream; persist for history","handlingStrategy":"fallback","validationCode":"# Python: check capability before requesting historical trades\nif isinstance(data_client, HyperliquidDataClient):\n    use_trade_snapshot_or_candles()","typeGuard":"def supports_historical_trades(client) -> bool:\n    return not type(client).__name__.startswith(\"Hyperliquid\")","tryCatchPattern":"try:\n    trades = client.request_trade_ticks(instrument_id, start, end)\nexcept ValueError as e:\n    if \"historical market trades\" in str(e):\n        snapshot = client.request_trade_snapshot(instrument_id)  # fallback\n    else:\n        raise","preventionTips":["Use the dedicated recent-trade snapshot method instead of ranged history","Persist WebSocket trade streams locally to build your own history","Route backfills to venues that support historical trade ticks"],"tags":["rust","hyperliquid","python","historical-data","unsupported-operation","trades"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}