hyperliquid_backtest/
lib.rs

1//! Minimal Hyperliquid backtesting toolkit.
2//!
3//! This crate provides just enough building blocks to run lightweight experiments
4//! in unit tests: a [`Position`] type, simple order requests, a [`FundingPayment`]
5//! structure and a very small [`RiskManager`]. The implementation intentionally
6//! avoids external dependencies or complex behaviours so the library can compile
7//! quickly and remain easy to understand.
8
9pub mod backtest;
10pub mod optimization;
11pub mod risk_manager;
12pub mod unified_data;
13
14#[cfg(test)]
15mod tests {
16    mod basic;
17}
18
19/// Convenient re-export of the most common items used when writing examples or tests.
20pub mod prelude {
21    pub use crate::backtest::FundingPayment;
22    pub use crate::risk_manager::{RiskConfig, RiskError, RiskManager, RiskOrder};
23    pub use crate::unified_data::{
24        OrderRequest, OrderResult, OrderSide, OrderType, Position, TimeInForce,
25    };
26}