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

    Type Alias ApiPerpetualsPreviewPlaceScaleOrderBody

    ApiPerpetualsPreviewPlaceScaleOrderBody: {
        builderCode?: PerpetualsBuilderCodeParamaters;
        endPrice: bigint;
        expiryTimestamp?: bigint;
        leverage?: number;
        marketId: PerpetualsMarketId;
        numberOfOrders: number;
        orderType: PerpetualsOrderType;
        reduceOnly: boolean;
        shouldDeallocateFreeCollateral?: boolean;
        side: PerpetualsOrderSide;
        sizeSkew?: number;
        startPrice: bigint;
        totalSize: bigint;
    } & (
        | { accountId: PerpetualsAccountId
        | undefined }
        | { vaultId: ObjectId | undefined }
    )

    Request body for previewing a scale order placement (before sending a tx).

    Type Declaration

    • OptionalbuilderCode?: PerpetualsBuilderCodeParamaters

      Optional integrator fee configuration.

    • endPrice: bigint

      Ending price of the scale range (inclusive, scaled bigint).

    • OptionalexpiryTimestamp?: bigint

      Optional expiration timestamp in milliseconds since epoch.

    • Optionalleverage?: number

      Optional leverage override.

    • marketId: PerpetualsMarketId

      Market ID associated with the request.

    • numberOfOrders: number

      Number of limit orders to place across the range.

    • orderType: PerpetualsOrderType

      Order type (e.g. GTC, IOC).

    • reduceOnly: boolean

      If true, orders can only reduce an existing position.

    • OptionalshouldDeallocateFreeCollateral?: boolean

      If true, the preview includes deallocating free collateral (margin not backing a position) back to the wallet. Defaults to false.

    • side: PerpetualsOrderSide

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

    • OptionalsizeSkew?: number

      Size ratio between last and first order. 1.0 = uniform, 2.0 = last is 2x first.

    • startPrice: bigint

      Starting price of the scale range (inclusive, scaled bigint).

    • totalSize: bigint

      Total size distributed across all orders (scaled bigint).