Cancel an Order — Hard Cancel
Immediately cancel a limit order on-chain by submitting a transaction to the Limit Order contract. Requires a gas fee.
Cancel an Order — Hard Cancel
Flow
GET /orders → POST /encode/cancel-batch-orders → send transactionStep 1 — Get Active Orders
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 — Encode the Cancel Calldata
Alternative: Cancel All Orders
Step 3 — Execute On-chain
Related
Last updated
Was this helpful?