Entry Price and PnL
Your Entry Price is the baseline for all PnL calculations. TxFlow tracks two types of PnL:
Unrealized PnL — Floating profit/loss based on current Mark Price. Changes in real time.
Realized PnL — Locked-in profit/loss from closed or reduced positions. Cannot change.
Entry Price
Entry Price is the volume-weighted average price at which you opened or added to your position.
How It's Calculated:
Entry Price = ∑(Fill Price × Fill Size) ÷ Total Position SizeOpen position
Set to fill price
Buy 1 BTC @ 50,000 → Entry=50,000
Add to position (same direction)
Recalculate weighted average
Hold 1 BTC @ $50,000, buy 1 BTC @ $51,000 → Entry = $50,500
Reduce position (partial close)
No change
Hold 2 BTC @ $50,500, sell 1 BTC → Entry stays $50,500
Flip position (reverse direction)
Recalculate for new position
Hold 1 BTC long @ $50,000, sell 3 BTC → Close long, open 2 BTC short @ new entry
Entry price resets to 0 when the position is fully closed.
Unrealized PnL
Unrealized PnL updates in real time with the Mark Price.
Long positions:
Unrealized PnL = (Mark Price − Entry Price) × PositionShort positions:
Realized (Closed) PnL
Realized PnL is locked in when you fully or partially close a position.
Long position:
Short position:
Net Closed PnL (after fees):
Realized PnL is immediately credited to or debited from your USDC balance upon settlement.
Return on Equity (ROE)
ROE measures your profit relative to the initial margin used:
Related Pages
Calculation of Mark Price and Oracle Price
Funding fees
Last updated
Was this helpful?

