df-hyperliquid-core 0.0.9-beta

Hyperliquid SDK for Rust: markets, account, trading, transfers, earn and deploy, with exact decimals and signing. Native and wasm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Leverage and margin on a perp: the leverage and mode a position takes, isolated margin in and
//! out, and the margin tables that cap leverage by size. The account-wide mode is
//! [`crate::account::settings::mode`].

pub mod isolated;
pub mod leverage;
pub mod tables;

pub use isolated::{UpdateIsolatedMargin, add_margin, margin, remove_margin};
pub use leverage::{MarginMode, UpdateLeverage, leverage, update_leverage, update_leverage_for};
pub use tables::{FLAT_TABLES_BELOW, LeverageError, MarginTable, MarginTier, checked_leverage};