Green while open, red when closed
why BYDFi's unrealized PnL leaves out fees and funding, with the 0.12% round-trip math on a live BTC perp
Key takeaway
A common BYDFi support question: the position showed green the whole time, then the closing result came back as a loss. Nothing is broken. The unrealized PnL you watch while the position is open and the closed result you get afterwards are measured differently, and the gap is fees and funding.

What BYDFi's help center says
The support article on this breaks it down in a small table:
- Unrealized PnL (while holding): includes the price PnL of the position, but not transaction fees and not funding fees.
- Closing result: includes the price PnL, transaction fees and funding fees.
It adds two more points. Markets keep moving while you click, so a market close cannot lock in the exact number you were looking at. And it points to TP/SL settings and stop limit or stop market orders as the tools to control the exit.
The math on a live BTC perpetual
BYDFi's public contract API for $BTC.USDT (Nov 15, 7:33 PM ET) showed last price 65,029.9, fair price 65,030, index 65,062.6, maker fee 0.02%, taker fee 0.06%, and a funding reading of -0.0021% for the current interval.
Say you open a 0.5 BTC long with a market order at 65,029.9 and close with a market order after a 65 USDT move up to 65,094.9:
- Price PnL: 0.5 x 65 = +32.50 USDT. This is roughly what the unrealized PnL showed.
- Opening fee: 32,514.95 notional x 0.06% = 19.51 USDT
- Closing fee: 32,547.45 notional x 0.06% = 19.53 USDT
- Closed result: 32.50 - 19.51 - 19.53 = about -6.54 USDT
Green on screen, red on close. With taker fees on both legs, the round trip costs about 0.12% of notional, so BTC needed to move roughly 78 USDT in your favour just to break even before funding. Using limit orders that rest on the book (maker on both sides) cuts that to about 0.04%, or around 26 USDT on BTC.
The same 0.12% hurdle in coin terms, using the same API snapshot:
- $ETH.USDT at 1,821.84: about 2.19 USDT per ETH
- $SOL.USDT at 72.02: about 0.086 USDT per SOL
- $XRP.USDT at 0.963: about 0.0012 USDT per XRP
- $DOGE.USDT at 0.05933: about 0.00007 USDT per DOGE
Small numbers per coin, but scalps live inside them.
Where funding comes in
Funding is settled at each interval while the position is open and is not part of the unrealized PnL figure. Under the usual convention a negative rate means shorts pay longs, so at the -0.0021% BTC reading a long would have received a tiny amount. On DOGE the reading was +0.0036%, the other way round. Check the funding page for your pair before relying on the sign. Hold for several intervals with leverage and those small numbers add up, in either direction. That is why a trade that sat open for days can close well away from the number you remember.
A five-step habit before you call a trade a winner
- Add the round-trip fee to your target. With taker on both sides, a 0.12% move is your zero line on BTC.
- Check the funding reading and the next settlement time if you plan to hold across it.
- Prefer limit orders for entries and planned exits when you are not in a hurry, so you pay maker instead of taker.
- Set a TP or a stop limit in advance rather than a panic market close, as the help center suggests.
- Judge your results by the closed PnL in your history, not by the peak unrealized number you screenshotted.
None of this makes a strategy profitable. It just makes sure the number you track is the number you keep.
Have you ever closed a "winning" trade and found it was a loss after fees? What fee tier do you assume when you set a take-profit?
FAQ
Does unrealized PnL include trading fees on BYDFi?
No. BYDFi says unrealized PnL excludes transaction fees and funding fees; the closing result includes both.
How big a move do I need to break even?
With a 0.06% taker fee in and out, about 0.12% of notional before funding; with maker on both sides, about 0.04%.
How can I control the exit price?
Use TP/SL or stop limit orders instead of a last-second market close, which can slip.