Function buyOptionBySeriesIdImpl

  • Buys a specified amount of options by a specific series ID. The trading account must be initialized before this operation.

    Throws

    Throws an error if the trading account is not initialized.

    Parameters

    • this: SdxClient
    • asset: AssetType

      The type of the asset for the option.

    • seriesId: number

      The series ID of the option to buy.

    • optionAmount: BN

      The amount of the option to buy.

    • maxAmountToPay: BN

      The maximum amount to pay for the buy operation.

    • splitTx: boolean = false

      Flag indicating if sell ix should be sent separately to isolate compute units.

    Returns Promise<TransactionSignature[]>

    A promise that resolves to the transaction signature of the buy operation.

Generated using TypeDoc