Skip to main content

LiveLeg

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

FieldTypeRequiredNullableDefaultDescription
IdintYesNoLive leg id.
NamestrYesNoUser-facing leg name/key (used as a stable identifier within an execution plan).
LiveContractLiveContractYesNoContract specification for this leg.
LegGroupIdintYesNoLeg group id within the execution plan (0 when not grouped/unknown).
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).