A tagged balance/position adjustment amount: delta or absolute.

Properties

asAbsolute: undefined | PositionSize

Returns the absolute size, or undefined when this is a delta.

asDelta: undefined | PositionSize

Returns the delta size, or undefined when this is absolute.

isAbsolute: boolean

Returns true when this amount is an absolute target.

isDelta: boolean

Returns true when this amount is a signed difference.

Methods

  • Returns void

  • Returns void

  • Builds an absolute-target adjustment amount.

    Accepts a PositionSize value object or a DecimalInput.

    Errors

    Throws ParamError on an invalid value.

    Parameters

    • value:
          | string
          | number
          | bigint
          | PositionSize

    Returns AdjustmentAmount

  • Builds a signed-difference (delta) adjustment amount.

    Accepts a PositionSize value object or a DecimalInput.

    Errors

    Throws ParamError on an invalid value.

    Parameters

    • value:
          | string
          | number
          | bigint
          | PositionSize

    Returns AdjustmentAmount