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

Position

One open perps position. Returned inside UserState.

Definition

class Position(TypedDict):
    size: Quantity
    entry_price: UsdPrice
    entry_funding_per_unit: FundingPerUnit
    conditional_order_above: ConditionalOrder | None
    conditional_order_below: ConditionalOrder | None

Fields

sizeQuantity. Signed quantity (positive = long, negative = short).

entry_priceUsdPrice. Volume-weighted entry price in USD.

entry_funding_per_unitFundingPerUnit. Funding accumulator snapshot at entry; used to compute realized funding on close.

conditional_order_aboveConditionalOrder | None. The take-profit / stop-loss order with TriggerDirection.ABOVE, if any.

conditional_order_belowConditionalOrder | None. The conditional order with TriggerDirection.BELOW, if any.

See also