Skip to main content
Understanding these key position metrics is essential for tracking your trading performance. Average entry price forms the foundation for calculating unrealized PnL.

Key Definitions

  • positionValue: Total value of the position (positive for long, negative for short)
  • positionQuantity: Size of the position (positive for long, negative for short)
  • indexPrice: Current market index price for the asset
  • avgEntryPrice: Average entry price for the position

Calculation Formulas

FieldFormulaDescription
avgEntryPricepositionValue / positionQuantityAverage entry price for the position
unrealizedPnl(indexPrice - avgEntryPrice) × positionQuantityProfit/loss on open positions

Usage in API

These calculations are used in the Get Account Positions response to show the current unrealized profit or loss for each of your open positions. Both value and quantity fields are included in the response, allowing you to verify or calculate the average entry price.