Home / Blog / MEXC

The line most MEXC XRP_USDT beginners skip: realized PnL = closing PnL + funding - opening fee - closing fee

By Updated

Key takeaway

A perpetual futures contract on MEXC lets you hold a long or short on XRP_USDT, priced, margined and settled in USDT. MEXC's perpetual model guide notes that value and PnL on these contracts are calculated in USDT, which keeps your results in a dollar-pegged unit.

MEXC logo, for the post: The line most MEXC XRP_USDT beginners skip: realized PnL = closing PnL + funding - opening fee - closing fee
MEXC logo.

Funding, which MEXC calls a mechanism unique to perpetual futures that balances holding costs between longs and shorts, is the running cost of keeping the position open.

What does one XRP_USDT contract hold?

MEXC's public contract API (4:23 PM ET, Nov 19):

  • Contract size: 1 XRP per contract. Position size in XRP equals the number of contracts.
  • Minimum order: 1 contract. Price step: 0.0001 USDT.
  • Max leverage on XRP_USDT: 300x. MEXC's perpetual model guide says USDT-margined perps support 1x to 500x, with 500x on pairs such as BTCUSDT and ETHUSDT. The pair you trade sets its own ceiling.
  • Funding: every 8 hours, 0.0012% at this fetch, cap +3% / -3%. Next settlement 7:00 PM ET.
  • Prices: last 0.957, fair 0.9571, index 0.9575.

What is position value?

MEXC's calculation guide defines it with the contract size:

position_value = fair_price x contracts x contract_size

On XRP_USDT, contract_size is 1, so position_value = fair_price x contracts.

How is the fee charged?

taker_fee = avg_fill_price x contracts x contract_size x taker_rate maker_fee = avg_fill_price x contracts x contract_size x maker_rate

MEXC's perpetual model guide lists a 0.00% maker and 0.02% taker rate for perpetual futures, and says rates may vary in different countries and regions, so the rate page shown to your account prevails. Treat those two numbers as the default, not as your rate.

How is funding charged?

funding_fee = funding_rate x position_value

Positive rate: longs pay shorts. Negative rate: shorts pay longs. At today's 0.0012% print, one settlement is position_value x 0.0012%, three a day about position_value x 0.0036%.

What is unrealized PnL measured on?

MEXC's guide says unrealized PnL uses the fair price, not the last traded price:

unrealized_long = (fair - avg_entry) x contracts x contract_size unrealized_short = (avg_entry - fair) x contracts x contract_size

And what lands in your balance?

The guide sums it up in one line:

total_realized_pnl = closing_pnl + funding_fees - opening_fee - closing_fee

closing_pnl_long = (close - avg_entry) x contracts x contract_size

Funding_fees is signed: a payment you made enters as a negative number, a payment you received as a positive one.

What changes it?

  • Your region's fee rate. The default can differ by country or region; read it off the rate page before you plug it in.
  • Maker vs taker. A resting limit order that fills as maker uses the maker rate; a market order uses the taker rate. Entry and exit can be different types.
  • Funding sign and size. Today's print is tiny, but the cap allows up to 3% per 8h.
  • The range. XRP on MEXC ran from 0.9974 to 0.9541 in the last 24h, a 4.54% range, while BTC broke below $62,000 to its lowest since early July (CoinDesk, 3:37 PM ET). At 300x the margin is about 0.33% of position value.

Common mistakes

  • Judging a trade by the closing PnL line alone and forgetting the two fees and the funding line.
  • Using the last price to estimate unrealized PnL. MEXC marks it on the fair price.
  • Copying the default fee rate without checking your region.
  • Reading 300x on XRP_USDT as the same ceiling as BTCUSDT. Each pair has its own max.

FAQ

How many XRP is N contracts? N XRP, because the contract size is 1. On other pairs the contract size differs, so always multiply.

Who pays funding at a positive rate? Longs pay shorts. At a negative rate, shorts pay longs.

Why does my PnL field differ from my own math on the last price? Because MEXC marks unrealized PnL on the fair price. At this fetch fair was 0.9571 while the last trade was 0.957.

Next time you size an XRP perp, write down all four lines of realized PnL before you click, not after. The same formula covers BTC, ETH, SOL and DOGE perps, with each pair's own contract size.

Discussed on r/MEXCReferralCodes

Open an account