Skip to main content

Module leverage

Module leverage 

Source
Expand description

updateLeverage: the leverage and margin mode of a perp position, main dex or HIP-3, checked against the perp’s meta and margin table, or against a ticket’s Market, before anything is signed.

Re-exports§

pub use crate::account::holdings::MarginMode;

Structs§

UpdateLeverage
updateLeverage: {type, asset, isCross, leverage}.

Functions§

leverage
updateLeverage, held to the market’s ceiling and margin mode.
update_leverage
updateLeverage for perp at asset: refused over its maxLeverage, and refused as cross where it is isolated only.
update_leverage_for
update_leverage, and held to the tier of table (the perp’s, from crate::markets::perps::Meta::table_of) that a position of notional reaches: BTC takes 40x up to 150M and 20x past it.