For the complete documentation index, see llms.txt. This page is also available as Markdown.

Perps Metrics Guide

This guide explains the main metrics on Rails and how they are calculated.

Definitions

Symbol
Meaning

PP

Price: The price in USDT, where:

  • Pindex=Index PriceP_{index} = \text{Index Price} = the fair market value of the asset pulled from our Index Price sources.

  • Pentry=Entry PriceP_{entry} = \text{Entry Price}

  • Pavg=Average Entry PriceP_{avg} = \text{Average Entry Price}

  • Pexit=Exit PriceP_{exit} = \text{Exit Price}

  • Pmark=Mark PriceP_{mark} = \text{Mark Price}

P&LP\&L

Profit & Loss: How much in USDT gained (profit) or lost (loss) compared to the entry price and position size, where:

  • P&LuP\&L_{u} = Unrealized P&L

  • P&LrP\&L_{r} = Realized P&L

SS

Position Side: The side of your position, where:

  • Slong=1S_{long}=1

  • Sshort=1S_{short}=-1

QQ

Position Quantity: The position size in units of the asset (e.g. 0.01 BTC).

FeesFees

Trading Fees: Total entry and exit fees in USDT.

FF

Funding Payments: Can be positive or negative, and are transferred between traders. Funding payments are not fees charged by Rails. Learn about the funding mechanism in perpetuals here.

DD

Deposits: Amount of USDT deposited to your account

WW

Withdrawals: Total USDT withdrawal volume

LL

Leverage: The per-market leverage used, between 1x - 5x.

VV

Notional Position Value

MM

Margin: the portion of your funds set aside to support a trade. It acts as collateral for open positions and open orders, where:

  • Mp,cross=Cross Position MarginM_{p,cross} = \text{Cross Position Margin} = margin locked by your open cross margin positions

  • Mp,iso=Isolated Position MarginM_{p,iso} = \text{Isolated Position Margin} = margin already allocated to all isolated positions

  • Mtotal,openorders=Total Open Order MarginM_{total,open orders} = \text{Total Open Order Margin} = margin reserved for all open, unfilled orders

  • Mreq=Margin RequiredM_{req} = \text{Margin Required} = Margin Required to keep your positions open

  • Mexcess=Excess MarginM_{excess} = \text{Excess Margin} = Margin available to place orders. Only excess margin is withdrawable.

Calculations

Price & Value

Entry Price/Exit Price

The Entry Price is the price at which your order was filled to open a position. The Exit Price is the price at which your order was filled to close your position.

Average Price

The Average Price shown in your account is the adjusted weighted average entry price of your open position, calculated as:

Pavg=Position ValueQP_{avg} = \frac{\text{Position Value}}{Q}

When you add to a position, every new trade that increases its size is added to the weighted average. This gives you one entry price that reflects the full open position.

When you partially close a position:

  1. The system realizes profit or loss on the part you closed.

  2. It subtracts any trading fees and, if applicable, funding charges.

  3. It then recalculates the average entry price for the remaining position.

This keeps your unrealized P&L aligned with the position still open.

Because realized PnL and fees are included, your displayed average price can change slightly after a partial close. This does not mean your trade executed at a different price. It means the platform adjusted the remaining position to account for PnL already realized.

Notional Value

Notional Value is the current market value of your position based on the index price:

Notional Value=Pindex×Q\text{Notional Value} = P_{index} \times Q

Position Value

Position Value is the total notional value, or exposure, of your trade based on the entry price used to open the position:

Position Value=Pentry×Q\text{Position Value} = P_{entry} \times Q

Balance and P&L

Available Balance

Available Balance is the amount you have available to place new trades, and fluctuates as the market moves. Margin calculations can be found here.

Available Balance=Cross Margin EquityCross Position MarginTotal Open Order Margin\text{Available Balance} = \text{Cross Margin Equity} - \text{Cross Position Margin} - \text{Total Open Order Margin}

Total Balance

Total Balance is the settled cash value of your account. It reflects completed events, but does not include unrealized P&L from open positions:

Total Balance=DtotalWtotal+P&Lr,totalFeestotal+Utotal\text{Total Balance} = D_{total} - W_{total} + P\&L_{r,total} -Fees_{total} +U_{total}

Withdrawable Balance

Withdrawable Balance represents the portion of your account balance that can be withdrawn. Note that the margin locked for open positions and orders, as well as unrealized losses from open positions, reduces what you can withdraw. To increase your withdrawable balance, you should partially or fully close an open position with positive unrealized P&L to realize profits.

Withdrawable Balance=Total Balance+(min(0,(PindexPentry)×Q×S))(Pentry×QL)Open Order Margin\text{Withdrawable Balance} = \text{Total Balance} + \sum (min(0,(P_{index}-P_{entry})\times Q \times S)) - \sum (P_{entry} \times \frac{Q}{L}) - \text{Open Order Margin}

Cross-Margin Balance

Cross-Margin Balance is the base balance available for your cross-margin pool. It equals your settled total balance minus collateral locked in isolated margin positions.

Cross-Margin Balance=Total BalanceIsolated Position Margin\text{Cross-Margin Balance} = \text{Total Balance} - \text{Isolated Position Margin}

Unrealized P&L

Unrealized P&L reflects the profit or loss if a position were closed at current market prices, with values changing in real-time. The account summary displays the total unrealized P&L for all positions.

P&Lu=(PindexPavg)×S×QP\&L_{u} = (P_{index} - P_{avg}) \times S \times Q

Realized P&L

Realized P&L reflects the profit or loss realized through closed positions. Once a position is closed, the realized P&L is computed and added to the Account Summary.

P&Lr=(PexitPentry)×S×QFees+FP\&L_{r} = (P_{exit} - P_{entry}) \times S \times Q - Fees + F

Equity & Margin

Visit our Margin Modes Guide for more information.

Account Equity

Account Equity is the current live balance of your account. This changes dynamically when you have open positions, as the index price of the assets you’ve traded against fluctuates impacting your unrealized P&L.

Account Equity=Total Balance+P&Lu,total\text{Account Equity} = \text{Total Balance} +P\&L_{u,total}

Cross-Margin Equity

Cross-Margin Equity is the total value of your shared collateral pool. It changes with the unrealized P&L of your open cross-margin positions.

Cross-Margin Equity=Cross-Margin Balance+P&Lu,total\text{Cross-Margin Equity} = \text{Cross-Margin Balance} + P\&L_{u,total}

Unrealized P&L is aggregated across all open cross-margin positions. As the market moves, your cross-margin equity updates continuously.

Isolated Position Equity

In Isolated Margin Mode, each position has its own dedicated margin pool and is excluded from the cross-margin pool. Isolated Position Equity is calculated as:

Isolated Position Equity=Isolated Position Margin +P&Lu,position\text{Isolated Position Equity}=\text{Isolated Position Margin }+P\&L_{u,position}

Maintenance Margin Ratio (or MMR)

Maintenance Margin Ratio (or MMR) is a fixed 5% buffer added to all positions for market volatility and slippage.

MMR=0.05\text{MMR} = 0.05

Maintenance Margin

Each open position requires a minimum amount of equity to remain open, referred to as Maintenance Margin. The maintenance margin is calculated per position:

Maintenance Marginposition=V×MMR\text{Maintenance Margin}_\text{position} = V \times \text{MMR}

Total Maintenance Margin

In cross-margin, the Total Maintenance Margin is the sum of maintenance margins across all open positions.

Total Maintenance Margin=Maintenance Marginposition\text{Total Maintenance Margin} = \sum \text{Maintenance Margin}_{\text{position}}

Available Margin

Available Margin is the amount of funds available to support your open positions after required margin is accounted for. It shows the remaining buffer before liquidation risk increases.

Margin Available = Account Equity - (Maintenance Margin)\text{Margin Available = Account Equity - }\sum(\text{Maintenance Margin})

Position Margin & Open Order Margin

Position Margin is the margin calculated per open position based on the current index price, and influenced by your selected leverage (1x - 5x). Open Order Margin is calculated in the same way for each open order, as these also will impact your available collateral.

Position Margin=Pindex×QL\text{Position Margin} = P_{index} \times \frac{Q}{{L}}

Required Margin

Required Margin is the minimum collateral that must stay locked to keep your position open at your current size, price, and leverage.

Mreq=Pindex×QLM_{req} = P_{index} \times \frac{Q}{L}

Excess Margin

Excess Margin is the extra collateral above the required margin that you can remove (isolated) or withdraw (cross) without immediately breaking the minimum margin needed to keep the position open.

Mexcess=Mp,isoMreqM_{excess} = M_{p,iso} - M_{req}

Effective Leverage

Effective Leverage is the actual leverage applied to an open position. It may differ from the leverage you initially selected due to changes in your available balance caused by index price movements, fees, or margin adjustments between order placement and trade execution.

Effective Leverage=Total Position ValueTotal Available Balance\text{Effective Leverage} = \frac{\text{Total Position Value}}{\text{Total Available Balance}}

Cross Leverage

Cross Leverage reflects the total size of your open positions relative to your margin available, showing how much risk you are taking across all trades combined. It aggregates the effective leverage from all open positions into a single number, showing your total risk exposure.

Cross Leverage=Total PositionsAccount Balance\text{Cross Leverage} = \frac{\text{Total Positions}}{\text{Account Balance}}

Liquidation

Visit Liquidation for a more in-depth explanation of liquidation triggers and mechanics.

Cross-Margin Ratio

Cross-Margin Ratio measures overall account health. It shows what percentage of account equity is consumed by minimum margin requirements across all open positions.

Cross-Margin Ratio=Total Maintenance MarginAccount Equity\text{Cross-Margin Ratio} = \frac{\text{Total Maintenance Margin}}{\text{Account Equity}}

Cross-Margin Ratio
Status

< 100%

Healthy

≥ 100%

Liquidation triggered - all positions closed

Simulated Cross-Margin Ratio

Simulated Cross-Margin Ratio checks whether your open orders would make your account too risky. If the ratio reaches 90%, the system cancels any qualifying orders before they execute. Instead of waiting until after an order fills, the platform estimates risk as the order book changes. This protects your account from the risk of an immediate post-fill liquidation.

Simulated Cross-Margin Ratio is calculated by assuming all eligible open orders are filled:

and

Where:

  • Position Maintenance Margin\text{Position Maintenance Margin} = the maintenance margin required for your current open positions.

  • Selected Order Value\text{Selected Order Value} = the notional value of open orders that would increase your net position exposure.

Liquidation Price

Liquidation Price is the index price at which liquidation may occur:

Where Available Margin\text{Available Margin} is dependent on Margin Mode Used:

  • In Cross-Margin: Available Margin=Cross Margin BalanceTotal Cross Maintenance Margin\text{Available Margin} = \text{Cross Margin Balance} - \text{Total Cross Maintenance Margin}

  • In Isolated Margin: Available Margin=Isolated Position EquityMaintenance Marginposition\text{Available Margin} = \text{Isolated Position Equity} - \text{Maintenance Margin}_{position}

Note: If the liquidation price of your position is less than or equal to zero, no liquidation price is displayed.

Last updated

Was this helpful?