df-lighter-core 0.0.1-beta

Lighter SDK for Rust: markets, account, trading, transfers, pools and binary options on Lighter and on Robinhood Chain, with exact decimals and the API key signer in Rust. Native and wasm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! A position's margin: its leverage and margin mode, and the collateral an isolated one holds.
//!
//! - [`leverage`]: `UpdateLeverage` (20): the initial margin fraction (10,000 over the leverage)
//!   and cross or isolated, held to what the market allows.
//! - [`isolated`]: `UpdateMargin` (29): collateral into or out of an isolated position.

pub mod isolated;
pub mod leverage;

pub use isolated::{MAX_MARGIN_UNITS, MarginDirection, UpdateMargin};
pub use leverage::{MARGIN_FRACTION_TICK, MarginLimits, UpdateLeverage, leverage_fraction};