aftermath-ts-sdk - v3.3.3
    Preparing search index...

    Type Alias ApiPerpetualsSetLeverageTxBody

    ApiPerpetualsSetLeverageTxBody: {
        collateralChange: number;
        leverage: number;
        marketId: PerpetualsMarketId;
        sponsor?: PerpetualsSponsorConfig;
        txKind?: SerializedTransaction;
        walletAddress?: SuiAddress;
    } & (
        | { accountCapId?: ObjectId; accountId: PerpetualsAccountId }
        | { vaultId: ObjectId }
    )

    API body for setting leverage on an existing position.

    Type Declaration

    • collateralChange: number

      Collateral amount to allocate, deallocate, or change.

    • leverage: number

      Leverage applied by the request or preview.

    • marketId: PerpetualsMarketId

      Market ID associated with the request.

    • Optionalsponsor?: PerpetualsSponsorConfig

      Optional transaction sponsorship configuration.

    • OptionaltxKind?: SerializedTransaction

      Serialized transaction kind sent to the service.

    • OptionalwalletAddress?: SuiAddress

      Caller wallet. For vault-backed accounts, when the caller is a vault assistant (rather than the vault owner), the backend uses this to resolve the correct assistant cap.