How to get Binance Futures USD-M PNL and ROE?

-2

I’m trying to use the formula mentioned on Binance for Futures USD-M PNL & ROE but not getting the first part correctly (PNL).

Link to the guide: How to Calculate Profit and Loss for Futures Contracts | Binance Support

Formula to get Unrealized PNL: Unrealized PNL = position size * direction of order * (mark price - entry price)

Binance app:

My attempt:

quantity = 6.645
entry_price = 221.230
exit_price = 221.470

unrealized_pnl = quantity * -1 * (exit_price - entry_price)
print(f"Unrealized PNL is: {unrealized_pnl}")

Output: Unrealized PNL is: -1.5948000000000604

What am I missing?

EDIT: I got the PNL working, I think. I used the following code:

unrealized_pnl = (mark_price - entry_price) * 0.03

Still no idea how to get ROE…

Formula:

> ROE% =Unrealized PNL in USDT / entry margin = ( ( mark Price - entry Price ) * direction of order * size ) / (position_amount * contract_multiplier * mark_price* IMR

What to enter for contract_multiplier? What is “size” and “position_amount”? How do they differ?

Contract multiplier represents the value of a contract.

USD-M
Each futures contract specifies the base asset’s quantity delivered for a single contract, also known as “Contract Unit”. For instance, BTC/USDT, ETH/USDT, and BCH/USDT futures contracts represent only one unit of its respective base asset, similar to spot markets.

Coin-M
Each BTC futures contract represents 100 USD, while each ETH futures contract represents 10 USD. For example, 1,000 USD of BTCUSD Quarterly 1225 equals 100 USD x 10 contracts, and 1,000 USD of ETHUSD Quarterly 1225 equals 10 USD x 100 contracts.

I did not quite understand. Can you provide more examples for USD-M, please?

USD-M contract multiplier is always 1.