@openpit/engine
    Preparing search index...

    Class OrderOperation

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

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

      Returns OrderOperation

    • get accountId(): AccountId | undefined

      The account identifier, or undefined.

      Returns AccountId | undefined

    • set accountId(
          value: string | number | bigint | AccountId | null | undefined,
      ): 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: string | number | bigint | AccountId | null | undefined

      Returns void

    • get price(): Price | undefined

      The limit price, or undefined for a market order.

      Returns Price | undefined

    • set price(value: string | number | bigint | Price | null | undefined): void

      Sets the limit price (accepts a Price object or a DecimalInput).

      Errors

      Throws ParamError on an invalid price.

      Parameters

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

      Returns void

    • get settlementAsset(): string | undefined

      The settlement asset, or undefined.

      Returns string | undefined

    • set settlementAsset(value: string | null | undefined): void

      Sets the settlement asset.

      Errors

      Throws AssetError when the asset string is empty.

      Parameters

      • value: string | null | undefined

      Returns void

    • get side(): string | undefined

      The trading side wire string ("BUY"/"SELL"), or undefined.

      Returns string | undefined

    • set side(value: "BUY" | "SELL" | null | undefined): void

      Sets the trading side from its wire string.

      Errors

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

      Parameters

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

      Returns void

    • get tradeAmount(): TradeAmount | undefined

      The trade amount, or undefined.

      Returns TradeAmount | undefined

    • set tradeAmount(value: TradeAmount | null | undefined): void

      Sets the trade amount.

      Errors

      Throws ParamError when value is not a TradeAmount.

      Parameters

      Returns void

    • get underlyingAsset(): string | undefined

      The underlying (traded) asset, or undefined.

      Returns string | undefined

    • set underlyingAsset(value: string | null | undefined): void

      Sets the underlying asset.

      Errors

      Throws AssetError when the asset string is empty.

      Parameters

      • value: string | null | undefined

      Returns void

    • Returns void

    • Returns void