Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

PerpsUserStateExtended

Extended perps user state with optional PnL, equity, margin, and liquidation fields.

Definition

type PerpsUserStateExtended = {
  margin: string
  vaultShares: string
  unlocks: PerpsUnlock[]
  reservedMargin: string
  openOrderCount: number
  equity: string | null
  availableMargin: string | null
  maintenanceMargin: string | null
  positions: Record<string, PerpsPositionExtended>
}
 
type PerpsPositionExtended = PerpsPosition & {
  unrealizedPnl: string | null
  unrealizedFunding: string | null
  liquidationPrice: string | null
}

Notes

See also