Operational

P&L accounting

How fills, fees, slippage, and settlement currency become the net_pnl in your trades table.

1 min readUpdated Jun 19, 2026

LucraX stores every trade's gross and net P&L in USD, regardless of the venue's settlement currency. This makes cross-venue comparisons trivial.

Conversion rules

  • USD-quoted contracts (Binance USDT-margined, ByBit USDT perp, CME ES/GC/SI in USD): direct.
  • Coin-margined contracts (BitMEX XBTUSD): each fill's P&L is computed in BTC, then converted at the exit price.
  • LNMarkets: P&L is reported by the venue in sats. LucraX converts via sats / 1e8 × exit_price to USD before storing.

What net_pnl includes

net_pnl = gross_pnl - fees - slippage
  • gross_pnl - (exit - entry) × size for longs; (entry - exit) × size for shorts.
  • fees - venue fees, both entry and exit.
  • slippage - only in backtests; live trades record actual fills, not a slippage estimate.

Display

The UI shows two decimals everywhere a money amount appears. The underlying value is stored at full precision; the rounding is for display only.

Pitfalls

  • Funding rates are tracked separately on perpetual venues - they affect account balance over time but don't show up in any single trade's P&L.
  • Settlement-currency moves can affect realized USD even after the trade closes (e.g. BTC dumps before you withdraw). LucraX records the P&L at close time and doesn't revalue.
P&L accounting | Help Center | LucraX · LucraX