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

    Per-order TWAP (time-weighted-average-price) request payload.

    interface PerpetualsTwapOrderDetails {
        amountUncertaintyBps: number;
        builderCode?: PerpetualsBuilderCodeParamaters;
        chunksAmount: number;
        executionGapMs: number;
        executionTimeUncertaintyMs: number;
        expireTimestamp?: bigint;
        firstRunExpireTimestamp?: bigint;
        marketId: string;
        maxOneExecutionAmountBps: number;
        maxSlippageBps: number;
        reduceOnly: boolean;
        side: PerpetualsOrderSide;
        size: bigint;
        smallTailMergeThresholdBps: number;
        timeForRetryMs: number;
    }
    Index
    amountUncertaintyBps: number

    Allowed deviation of a chunk's size from its target, in basis points.

    Optional integrator fee configuration (friendly fractional fee).

    chunksAmount: number

    Number of child executions to split the order into.

    executionGapMs: number

    Target spacing between chunk executions, in milliseconds.

    executionTimeUncertaintyMs: number

    Allowed jitter around each scheduled execution time, in milliseconds.

    expireTimestamp?: bigint

    Optional overall expiry for the TWAP order (ms since epoch).

    firstRunExpireTimestamp?: bigint

    Optional deadline for the first execution (ms since epoch).

    marketId: string

    Market (clearing house) ID this TWAP order targets.

    maxOneExecutionAmountBps: number

    Cap on a single execution's size, as basis points of total size.

    maxSlippageBps: number

    Max slippage tolerated per chunk execution, in basis points.

    reduceOnly: boolean

    Whether the order may only reduce an existing position.

    Position side: 0 for bid (long), 1 for ask (short).

    size: bigint

    Total base-asset size to execute across all chunks (scaled base units).

    smallTailMergeThresholdBps: number

    Threshold below which a small trailing remainder is merged into the final chunk, in basis points.

    timeForRetryMs: number

    How long to keep retrying a failed chunk execution, in milliseconds.