aftermath-ts-sdk - v3.3.3
    Preparing search index...
    ApiPerpetualsLimitOrderBody: {
        builderCode?: PerpetualsBuilderCodeParamaters;
        cancelSlTp: boolean;
        clientOrderId?: PerpetualsClientOrderId;
        collateralChange: number;
        expiryTimestamp?: bigint;
        hasPosition: boolean;
        leverage?: number;
        marketId: PerpetualsMarketId;
        orderType: PerpetualsOrderType;
        price: bigint;
        reduceOnly: boolean;
        side: PerpetualsOrderSide;
        size: bigint;
        slTp?: {
            builderCode?: PerpetualsBuilderCodeParamaters;
            gasCoinArg?: TransactionObjectArgument;
            isSponsoredTx?: boolean;
            size?: bigint;
            stopLossPrice?: number;
            takeProfitPrice?: number;
            triggerPriceType?: PerpetualsStopOrderTriggerPriceType;
        };
        sponsor?: PerpetualsSponsorConfig;
        txKind?: SerializedTransaction;
        walletAddress: SuiAddress;
    } & (
        | { accountCapId?: ObjectId; accountId: PerpetualsAccountId }
        | { vaultId: ObjectId }
    )

    API request body for placing a limit order in a given market.

    Type Declaration

    • OptionalbuilderCode?: PerpetualsBuilderCodeParamaters

      Optional integrator fee configuration for this order.

      If provided, the integrator specified in the configuration will receive a fee on the taker volume generated by this order. The integrator must have been previously approved by the account owner, and the fee must not exceed the maximum fee the user approved for that integrator.

    • cancelSlTp: boolean

      True is position is closed.

    • OptionalclientOrderId?: PerpetualsClientOrderId

      Optional client-managed order id to tag this limit order with. Resolve or cancel by this id later instead of the on-chain order id.

    • collateralChange: number

      Change in collateral allocated to this position.

    • OptionalexpiryTimestamp?: bigint

      Optional expiration for the order.

    • hasPosition: boolean

      Whether the account already has a position in this market.

    • Optionalleverage?: number

      Optional leverage override.

    • marketId: PerpetualsMarketId

      Market ID associated with the request.

    • orderType: PerpetualsOrderType

      How the order behaves on the orderbook.

    • price: bigint

      Limit price in scaled fixed-point representation.

    • reduceOnly: boolean

      If true, order can only reduce an existing position.

    • side: PerpetualsOrderSide

      Order side: 0 for bid or long, 1 for ask or short.

    • size: bigint

      Order size in scaled base units.

    • OptionalslTp?: {
          builderCode?: PerpetualsBuilderCodeParamaters;
          gasCoinArg?: TransactionObjectArgument;
          isSponsoredTx?: boolean;
          size?: bigint;
          stopLossPrice?: number;
          takeProfitPrice?: number;
          triggerPriceType?: PerpetualsStopOrderTriggerPriceType;
      }

      Optional SL/TP instructions to be placed along with the limit order.

      • OptionalbuilderCode?: PerpetualsBuilderCodeParamaters

        Optional integrator fee configuration applied when the SL/TP fires.

      • OptionalgasCoinArg?: TransactionObjectArgument

        Optional gas coin argument used when extending the transaction.

      • OptionalisSponsoredTx?: boolean

        Whether the transaction is sponsored rather than paid directly by the wallet.

      • Optionalsize?: bigint

        Order size in base units.

      • OptionalstopLossPrice?: number

        Stop-loss trigger price.

      • OptionaltakeProfitPrice?: number

        Take-profit trigger price.

      • OptionaltriggerPriceType?: PerpetualsStopOrderTriggerPriceType

        Which on-chain price the trigger uses: 0 = index (default), 1 = book, 2 = mark.

    • Optionalsponsor?: PerpetualsSponsorConfig

      Optional transaction sponsorship configuration.

    • OptionaltxKind?: SerializedTransaction

      Optionally pre-built transaction payload.

    • walletAddress: SuiAddress

      Wallet address used to identify the signer or owner.