Class AccountAdjustmentBalanceOperation

Balance-scoped adjustment operation for one physical asset. Average entry price and realized PnL are denominated in the account currency.

Constructors

Accessors

  • get asset(): undefined | string
  • The asset, or undefined.

    Returns undefined | string

  • set asset(value): void
  • Sets the asset.

    Errors

    Throws AssetError when the asset string is empty.

    Parameters

    • value: undefined | null | string

    Returns void

  • get averageEntryPrice(): undefined | Price
  • The account-currency average entry price, or undefined.

    Returns undefined | Price

  • set averageEntryPrice(value): void
  • Sets the account-currency average entry price (accepts a value object or DecimalInput). No FX is applied.

    Errors

    Throws ParamError on an invalid value.

    Parameters

    • value:
          | undefined
          | null
          | string
          | number
          | bigint
          | Price

    Returns void

  • get realizedPnl(): undefined | PnlHaltReason | Pnl
  • The account-currency position PnL state, or undefined when this adjustment does not correct it.

    Returns undefined | PnlHaltReason | Pnl

  • set realizedPnl(value): void
  • Sets or clears the account-currency position PnL state.

    Errors

    Throws TypeError, RangeError, or ParamError on an invalid PnL state.

    Parameters

    • value:
          | undefined
          | null
          | string
          | number
          | bigint
          | PnlHaltReason
          | Pnl

    Returns void

Methods

  • Returns void

  • Returns void