Order operation group: instrument, account, side, amount, and price.

Constructors

  • Constructs an empty operation group; populate it through the setters.

    Returns OrderOperation

Accessors

  • get accountId(): undefined | AccountId
  • The account identifier, or undefined.

    Returns undefined | AccountId

  • set accountId(value): void
  • Sets the account identifier.

    Accepts an AccountId object or a number | bigint | string (mirroring AccountId.fromInt/AccountId.fromString).

    Errors

    Throws AccountIdError on an invalid identifier value.

    Parameters

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

    Returns void

  • get price(): undefined | Price
  • The limit price, or undefined for a market order.

    Returns undefined | Price

  • set price(value): void
  • Sets the limit price (accepts a Price object or a DecimalInput).

    Errors

    Throws ParamError on an invalid price.

    Parameters

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

    Returns void

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

    Returns undefined | string

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

    Errors

    Throws AssetError when the asset string is empty.

    Parameters

    • value: undefined | null | string

    Returns void

  • get side(): undefined | string
  • The trading side wire string ("BUY"/"SELL"), or undefined.

    Returns undefined | string

  • set side(value): void
  • Sets the trading side from its wire string.

    Errors

    Throws ParamError when value is not "BUY"/"SELL".

    Parameters

    • value:
          | undefined
          | null
          | "BUY"
          | "SELL"

    Returns void

  • get tradeAmount(): undefined | TradeAmount
  • The trade amount, or undefined.

    Returns undefined | TradeAmount

  • set tradeAmount(value): void
  • Sets the trade amount.

    Errors

    Throws ParamError when value is not a TradeAmount.

    Parameters

    Returns void

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

    Returns undefined | string

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

    Errors

    Throws AssetError when the asset string is empty.

    Parameters

    • value: undefined | null | string

    Returns void

Methods

  • Returns void

  • Returns void