@openpit/engine
    Preparing search index...

    Class OrderPosition

    Order position group: hedged/netting side and lifecycle flags.

    Index
    • Constructs an empty position group (reduceOnly/closePosition false).

      Returns OrderPosition

    closePosition: boolean

    Whether the order closes the entire position.

    reduceOnly: boolean

    Whether the order may only reduce an existing position.

    • get positionSide(): string | undefined

      The position side wire string ("LONG"/"SHORT"), or undefined.

      Returns string | undefined

    • set positionSide(value: "LONG" | "SHORT" | null | undefined): void

      Sets the position side from its wire string.

      Errors

      Throws ParamError when value is not "LONG"/"SHORT".

      Parameters

      • value: "LONG" | "SHORT" | null | undefined

      Returns void

    • Returns void

    • Returns a deep copy of this position group.

      Returns OrderPosition

    • Returns void