On FE you can be shown a positive PnL, but then actually lose money when you go to close that position due to
Taker fees
Orderbook spread
This PR accounts for those to hopefully show a more accurate PnL number. FE will feed the webserver's orderbook toplevel into calculateUnrealizedPnl instead of using the mark price
On FE you can be shown a positive PnL, but then actually lose money when you go to close that position due to
This PR accounts for those to hopefully show a more accurate PnL number. FE will feed the webserver's orderbook toplevel into calculateUnrealizedPnl instead of using the mark price