Versions in this module Expand all Collapse all v1 v1.1.0 Dec 5, 2026 Changes in this version + type Input struct + EntryPrice float64 + ExitPrice float64 + FeeRate float64 + Leverage float64 + MaintMarginRate float64 + Margin float64 + Side string + type Result struct + BreakEvenPrice float64 + Fees float64 + GrossPnL float64 + Liquidated bool + LiquidationDistancePct float64 + LiquidationPrice float64 + NetPnL float64 + NetROEPct float64 + Notional float64 + Quantity float64 + ROEPct float64 + Side string + func Calculate(in Input) (Result, error)