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

Trading Metrics Guide

This article explains common metrics on the Rails platform, including their precise calculations.

Definitions

Symbol
Meaning

PindexP_{index}

Index Price: The fair market value of the asset pulled from our Index Price sources.

PentryP_{entry}

Entry Price: The price at which your order was filled to open a position. This is based on actual execution price and may differ from the index and order book price at the moment you placed the order due to factors like slippage or partial fills.

PavgP_{avg}

Average Entry Price: The weighted average fill price for the position, calculated as:

  • Pavg=PositionValueQP_{avg} = \frac{Position Value}Q

PexitP_{exit}

Exit Price: The price at which your order was filled to close a position. This reflects the actual execution price and may differ from the index and order book price you saw when closing your position due to factors like slippage or partial fills.

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).

FF

Trading Fees: Total entry and exit fees in USDT.

UU

Funding Payments: Positive or negative. Learn more 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 Postition MarginM_{p,cross} = \text{Cross Postition Margin} = margin locked by your open cross margin positions

  • Mp,iso=Cross Postition MarginM_{p,iso} = \text{Cross Postition 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

Profit & Loss Calculations

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×QF+UP\&L_{r} = (P_{exit} - P_{entry}) \times S \times Q - F + U

Value Calculations

Notional Value

Notional Value is the 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 the total notional value or exposure of your trade, determined by the entry price used when you opened the position:

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

Balance Calculations

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 represents your actual money after all completed (realized) events have been factored in, but before accounting for any live, ongoing trades.

Total Balance=DtotalWtotal+P&Lr,totalFtotal+Utotal\text{Total Balance} = D_{total} - W_{total} + P\&L_{r,total} -F_{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}

where:

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

Cross-Margin Balance

Cross-Margin Balance is the base balance available for your cross margin pool. It represents your settled total balance minus any collateral that has been strictly isolated and locked for isolated margin positions.

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

Equity & Margin Calculations

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}

where:

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

Cross-Margin Equity

Cross-Margin Equity represents the total value of your shared collateral pool, which dynamically fluctuates based on the performance 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 PnL is aggregated across all open cross margin positions. Because it fluctuates with the market, your cross margin equity is continuously updated.

Isolated Position Equity

In Isolated Margin Mode, each position has it's own dedicated margin pool, and excluded from the cross-margin pool. Isolated Position Equity is then 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 total of funds currently available to support your open positions after accounting for required margin. It represents the buffer your position still has 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}

Leverage & Liquidation Calculations

Visit this article for a more in-depth explanation of leverage and liquidation.

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}}

Cross-Margin Ratio

Cross-Margin Ratio measures overall account health — 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

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 EquityMaintenence Marginposition\text{Available Margin} = \text{Isolated Position Equity} - \text{Maintenence Margin}_{position}

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

FAQ's

Index Price vs Order Book Price

Understanding the difference between the index price and the order book price is crucial for traders. Each is employed in different trading calculations, and this distinction is a common source of confusion, particularly when slippage happens. By comprehending these differences, traders can better estimate their trading performance.

Index Price

The Index Price is a benchmark price calculated from a basket of major exchanges. Instead of reflecting just Rails’ order book, it represents a fair, averaged market value of the asset across multiple venues.

Order Book Price

The Order Book Price is the real-time price at which trades are executed on our platform. It is calculated using the current best bid (buy orders) and best ask (sell orders) from the order book.

  • When you place a market order, it is filled against the best available prices in the order book.

  • This ensures instant execution, but depending on liquidity and your order size, the final fill price may be higher or lower than the last traded price you saw as a result of slippage.

The following table details when and why one price is used over the other:

Event
Price Used

Liquidation

Liquidation occurs when the your liquidation price crosses the index price. This prevents traders from being unfairly liquidated due to thin liquidity or a price spike in the order book.

Funding Payment Calculation

Both: the funding mechanism aims to balance deviations between the order book price and the index price, so both are considered.

Trigger Orders

Stop loss orders and take profit orders are triggered using the index price. This avoids premature order execution due to thin liquidity or a price spike in the order book.

Order Execution

Once the trigger condition is met, the order itself is executed against the order book price (just like any other market or limit order).

Unrealized P&L

Unrealized P&L is calculated using the index price, not the order book price, to provide a fair and stable view of your postion's value.

Why does the average price change?

Average Price: The Average Price shown in your account is the adjusted weighted average entry price of all trades that make up your currently open position.

How it works

  • When adding to a position, each new buy or sell that increases your position size is included in the weighted average. This ensures your entry price reflects the combined cost of all open trades.

  • When partially closing a position:

    1. The system books any realized profit or loss (PnL) on the portion you closed.

    2. It also deducts applicable trading fees (and, if relevant, funding charges).

    3. The average entry price of the remaining open position is then recalculated so that the unrealized PnL you see stays consistent with your actual exposure.

Why your Average Price may change

Because realized PnL and fees are factored into the recalculation, your displayed average price may shift slightly after a partial close — even if your execution prices haven’t changed. This adjustment is accounting-based: it does not mean you actually bought higher or lower, but rather that the platform is aligning your remaining position’s entry with the PnL already realized.

Last updated

Was this helpful?