# Cancel a limit order

To cancel an earlier placed order(s), a transaction [AugustusRFQ](/api/augustusrfq/contracts.md).[cancelOrder](https://etherscan.io/address/0xe92b586627cca7a83dc919cc7127196d70f55a06/advanced#writeContract#F3) (or [CancelOrders](https://etherscan.io/address/0xe92b586627cca7a83dc919cc7127196d70f55a06/advanced#writeContract#F4)) needs to be sent on behalf of the order's maker.

#### Transaction parameters:

`orderHash`: limit order unique id&#x20;

#### Example

{% tabs %}
{% tab title="Typescript" %}

```typescript
/* eslint-disable @typescript-eslint/no-unused-vars */
import axios from 'axios';
import * as dotenv from 'dotenv';
import { ethers } from 'ethers';
import {
  constructPartialSDK,
  constructEthersContractCaller,
  constructAxiosFetcher,
  constructCancelLimitOrder,
  constructGetLimitOrders,
} from '..';
dotenv.config();

const maker = new ethers.Wallet(process.env.PK).connect(ethers.getDefaultProvider(1));

const fetcher = constructAxiosFetcher(axios);

// provider must have write access to account
// this would usually be wallet provider (Metamask)
const provider = ethers.getDefaultProvider(1);
const contractCaller = constructEthersContractCaller(
  {
    ethersProviderOrSigner: provider,
    EthersContract: ethers.Contract,
  },
  maker.address
);

const paraSwapLimitOrderSDK = constructPartialSDK(
  {
    chainId: 1,
    fetcher,
    contractCaller,
  },
  constructGetLimitOrders,
  constructCancelLimitOrder
);

async function run() {
  const { orders: currentOrders } = await paraSwapLimitOrderSDK.getLimitOrders({
    maker: maker.address,
    type: 'LIMIT',
  });

  if (!currentOrders[0]?.orderHash) throw new Error('No orders found');

  const deleteTx: ethers.ContractTransaction =
    await paraSwapLimitOrderSDK.cancelLimitOrder(currentOrders[0].orderHash);

  console.log('deleteTx', deleteTx);
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.velora.xyz/api/augustusrfq/api-references/fungible-tokens/cancel-a-limit-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
