Cancel an Order — Gasless

Cancel a limit order off-chain without paying gas by instructing the KyberSwap Operator to stop co-signing the order.

Cancel an Order — Gasless

Gasless cancellation works by revoking the Operator's willingness to co-sign a specific order. Because every fill requires a fresh Operator signature, stopping that signature effectively blocks the order from being filled — no on-chain transaction needed.

Wait time: Up to 5 minutes if the Operator recently signed the order for an in-flight fill. If the order is far from market price, cancellation is near-instant.

For immediate cancellation without any wait, use Hard Cancel and pay a small gas fee.

Flow

GET /orders  →  POST /cancel-sign  →  sign EIP-712  →  POST /cancel

Step 1 — Get Active Orders

Query your active orders to find the orderId to cancel:

const { data } = await axios.get(
    "https://limit-order.kyberswap.com/read-ks/api/v1/orders",
    { params: { chainId: 137, maker: signerAddress, status: "active" } }
);

const targetOrderId = data.data[0].id;

Step 2 — Get the Unsigned EIP-712 Cancel Message

Pass one or more orderIds to cancel in a single signature:

Step 3 — Sign the Cancel Message

Step 4 — Submit the Gasless Cancel

The response includes an operatorSignatureExpiry timestamp if the Operator had recently signed the order. The order will be fully cancelled once that timestamp passes (max 5 minutes).

Last updated

Was this helpful?