Skip to main content

LiveLeg

Summary view of a live position leg (contract + quantity + pricing metadata).

FieldTypeRequiredNullableDefaultDescription
IdintYesNoLive leg id.
NamestrYesNoUser-facing leg name or response key for display and diagnostics. Use ExecPlanLegRef.ExecPlanLegId as the stable identity for v2 order and paper-fill workflows.
LiveContractLiveContractYesNoContract specification for this leg.
LegGroupIdintYesNoLeg group id within the execution plan.
CreatedAtdatetimeYesNoUTC timestamp when the leg was created.
ClosedAtdatetimeYesYesUTC timestamp when the leg was closed, or null if still open.
LivePositionIdintYesNoParent live position id.
AccountIdstrYesNoBroker account id that owns this position/leg.
UnderlyingstrYesNoUnderlying symbol for this leg (e.g. AAPL, SPX).
QtyDecimalYesNoSigned quantity for this leg (positive = long/buy, negative = short/sell). 0 is used for marker legs.
AvgEntryPriceDecimalYesNoAverage entry price including commission (differs from LiveExecution.Price which excludes commission).
UserSetRealizedPnLDecimalYesYesOptional user-specified realized PnL adjustment for this leg.
TrackedRealizedPnLDecimalYesYesRealized PnL tracked by MesoLive from executions (when available).