Perps Metrics Guide
This guide explains the main metrics on Rails and how they are calculated.
Definitions
Price: The price in USDT, where:
= the external spot price from our Index Price sources.
= the risk reference for perpetuals. It determines unrealized P&L, margin requirements, and liquidations.
= The impact price for a bid/ask is the average execution price for a fixed impact notional, not the top-of-book quote.
= the median of Rails’ best bid, best ask, and last trade.
= The index price plus the exponential moving average (EMA) of the adjustment.
Profit & Loss: How much in USDT gained (profit) or lost (loss) compared to the entry price and position size, where:
= Unrealized P&L
= Realized P&L
= Unrealized P&L on cross-margin positions
Position Side: The side of your position, where:
Position Quantity: The position size in units of the asset (e.g. 0.01 BTC).
= The quantity of any position
= The closed quantity of any position
Trading Fees: Total entry and exit fees in USDT.
Funding Payments: Can be positive or negative, and are transferred between traders. Funding uses the index price. Funding payments are not fees charged by Rails. Learn about the funding mechanism in perpetuals here.
Deposits: Amount of USDT deposited to your account
Withdrawals: Total USDT withdrawal volume
Leverage: The per-market leverage used, between 1x - 5x; therefore
Notional Position Value
Margin: the portion of your funds set aside to support a trade. It acts as collateral for open positions and open orders, where:
= margin locked by your open cross margin positions
= margin already allocated to all isolated positions
= margin reserved for all open, unfilled orders
= Margin Required to keep your positions open
= Margin above what's required to keep an isolated position open.
Calculations
Price & Value
Index Price
The Index Price ( ) is the external spot-price anchor, from our Index Price Sources.
Rails uses the Index Price to calculate funding, and to keep the mark price aligned with the broader market.
Mark Price
The Mark Price is the reference price for a perpetual market. It determines unrealized P&L, margin requirements, liquidation prices, and liquidation triggers.
The mark price uses the median of three values:
Where:
This approach limits the impact of short-lived order-book moves. A sustained difference between Rails’ market and the index can influence the mark price gradually.
Market orders, take-profit and stop-loss triggers, and limit-price safety checks use the mark price as their reference.
Availability and updates
Rails publishes mark-price updates on each index-price tick, at most once every 250 milliseconds per market. Rails uses exact decimal arithmetic and rounds each published price to the 0.00000001 price increment, but displays only 6 decimals in the UI.
If a market is missing a required Rails input, the mark price falls back to the index price:
No Rails quotes: the mark price uses the index price.
Quotes but no trades: the mark price uses the index price while the adjustment EMA warms up.
Quotes and at least one trade: Rails uses the full mark-price formula.
Exponential Moving Average (EMA)
Rails’ market can trade slightly above or below the index price. This difference is the adjustment:
The adjusted index uses an EMA of this adjustment. The EMA has a 2.5-minute time constant. Recent samples carry more weight, while older samples fade smoothly. This smoothing limits the effect of brief order-book changes. A one-second spike barely affects the EMA. A persistent adjustment shifts it over several minutes.
Rails updates the EMA on every tick. Let t be the seconds since the prior update:
Each sample is weighted by how long it remained in effect. Rails rounds the numerator and denominator to 12 decimal places after each update.
Entry & 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:
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:
The system realizes profit or loss on the part you closed.
It subtracts any trading fees and, if applicable, funding charges.
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 mark price:
Position Value
Position Value is the total notional value, or exposure, of your trade based on the entry price used to open the position:
Impact Price
Impact bid or ask price is the average execution price for trading a fixed impact notional against the order book.
Impact Ask is the average price to buy that notional from asks.
Impact Bid is the average price to sell it into bids.
Impact Mid is their midpoint.
Unlike the best bid/ask, impact prices reflect liquidity at meaningful size. They diverge from top-of-book quotes when available depth is limited. Impact Price is used in funding calculations for Perps.
Impact Notional
Withdrawal Fee
Rails deducts a withdrawal fee to cover network costs when you withdraw amounts from the platform, calculated as:
The fee is 0.1% of the amount you withdraw, up to a maximum of $1 per withdrawal. The covers the network costs - like gas fees - we pay to process your withdrawal. It isn’t a Rails platform fee.
Liquidation Fee
If a position is liquidated, Rails charges a liquidation fee of 1% of the liquidated value, calculated as:
Balance and P&L
Available Balance
Available Balance shows the funds available to open new positions. Your withdrawable balance may be lower. Margin calculations can be found here.
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:
Withdrawable Balance
Withdrawable Balance represents the portion of your account balance that can be withdrawn. Margin for open positions and orders reduces this amount. Unrealized losses, based on mark price, also reduce it. To increase your withdrawable balance, you should partially or fully close an open position with positive unrealized P&L to realize profits.
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.
Unrealized P&L
Unrealized P&L reflects the profit or loss if a position were closed at the current mark price. The account summary displays the total unrealized P&L for all positions.
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.
Equity & Margin
Account Equity
Account Equity is the current live balance of your account. It changes as mark-price movements affect unrealized P&L.
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.
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:
Maintenance Margin Rate (or MMR)
Maintenance Margin Rate (or MMR) is a fixed 5% buffer added to all positions for market volatility and slippage.
Maintenance Margin
Each open position requires a minimum amount of equity to remain open, referred to as Maintenance Margin. The maintenance margin uses the current mark price:
Total Cross Maintenance Margin
In cross-margin, the Total Cross Maintenance Margin is the sum of maintenance margins across all open cross-margin positions.
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, and depends on your margin mode:
In cross-margin mode, the following is calculated across all cross-margin positions:
In isolated margin mode, the following is calculated for each specific position only:
Position Margin & Open Order Margin
Position Margin is the margin calculated per open position based on the current mark price. Your selected leverage also affects it. Open Order Margin uses the same reference price and affects your available collateral.
Required Margin
Required Margin is the minimum margin requirement for an isolated position. This floor ensures the position retains enough collateral to remain open at the current leverage.
Excess Margin
Excess Margin is the extra collateral above the required margin that you can remove from an isolated position without immediately breaking the minimum margin needed to keep the position open.
Last updated
Was this helpful?

