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

    Type Alias ApiPerpetualsPreviewCancelOrdersBody

    ApiPerpetualsPreviewCancelOrdersBody: {
        marketIdsToData: Record<
            PerpetualsMarketId,
            { orderIds: PerpetualsOrderId[] },
        >;
        shouldAbortOnMissingId?: boolean;
        shouldDeallocateFreeCollateral?: boolean;
    } & (
        | { accountCapId?: ObjectId; accountId: PerpetualsAccountId }
        | { vaultId: ObjectId }
    )

    Request body for previewing cancel-order operations.

    Type Declaration

    • marketIdsToData: Record<PerpetualsMarketId, { orderIds: PerpetualsOrderId[] }>

      Per-market mapping of order IDs to cancel.

    • OptionalshouldAbortOnMissingId?: boolean

      If true, abort the preview when any given order ID is not found on-chain. If false (default), missing IDs are tolerated.

    • OptionalshouldDeallocateFreeCollateral?: boolean

      If true, also deallocate free collateral (margin not backing a position) back to the wallet. Defaults to false.