nautilus_hyperliquid/lib.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! [NautilusTrader](https://nautilustrader.io) adapter for the [Hyperliquid](https://hyperliquid.gitbook.io/hyperliquid-docs) decentralized exchange.
17//!
18//! The `nautilus-hyperliquid` crate provides integration with the Hyperliquid API for
19//! market data and trading in perpetual futures, HIP-3 builder-deployed perpetuals, spot markets,
20//! and experimental HIP-4 outcome markets. The integration guide's
21//! [product support table](https://nautilustrader.io/docs/nightly/integrations/hyperliquid/#product-support)
22//! defines support levels and validation limits.
23//!
24//! # NautilusTrader
25//!
26//! [NautilusTrader](https://nautilustrader.io) is an open-source, production-grade, Rust-native
27//! engine for multi-asset, multi-venue trading systems.
28//!
29//! The system spans research, deterministic simulation, and live execution within a single
30//! event-driven architecture, providing research-to-live semantic parity.
31//!
32//! # Feature Flags
33//!
34//! This crate provides feature flags to control source code inclusion during compilation,
35//! depending on the intended use case, i.e. whether to provide Python bindings
36//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
37//! or as part of a Rust only build.
38//!
39//! - `arrow`: Enables Apache Arrow data support.
40//! - `examples`: Enables the crate's example binaries.
41//! - `extension-module`: Builds as a Python extension module.
42//! - `high-precision` (default): Enables
43//! [high-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation/#precision-mode)
44//! to use 128-bit value types.
45//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs).
46
47#![warn(rustc::all)]
48#![deny(unsafe_code)]
49#![deny(nonstandard_style)]
50#![deny(missing_debug_implementations)]
51// #![deny(clippy::missing_errors_doc)]
52#![deny(clippy::missing_panics_doc)]
53#![deny(rustdoc::broken_intra_doc_links)]
54// pyo3's `from_py_object` generates `.clone()` on `Copy` fields that clippy flags from the
55// macro expansion; an item-level `allow` cannot reach the expansion
56#![allow(clippy::clone_on_copy)]
57
58pub mod account;
59pub mod common;
60pub mod config;
61pub mod data;
62pub mod data_types;
63pub mod execution;
64pub mod factories;
65pub mod http;
66pub mod outcome_settlement;
67pub mod signing;
68pub mod websocket;
69
70mod book;
71
72#[cfg(feature = "python")]
73pub mod python;
74
75pub use crate::{
76 config::{HyperliquidDataClientConfig, HyperliquidExecutionClientConfig},
77 data::HyperliquidDataClient,
78 execution::HyperliquidExecutionClient,
79 factories::{HyperliquidDataClientFactory, HyperliquidExecutionClientFactory},
80 http::client::HyperliquidHttpClient,
81 websocket::client::HyperliquidWebSocketClient,
82};