# How to close liquidity account?

{% hint style="info" %}
Closing account allowed for 0 balances
{% endhint %}

{% tabs %}
{% tab title="@a-dex/a-dex-sdk" %}

```typescript
import { SwapActionGenerator } from "@a-dex/a-dex-sdk";

const actionsGen = new SwapActionGenerator("swap.adex");

const action = await actionsGen.close(
  [
    {
      actor: "trader.adex",
      permission: "active",
    },
  ],
  "trader.adex",
  "0,LPA"
);
```

{% endtab %}

{% tab title="cleos" %}

```bash
cleos -u https://eos.greymass.com push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "swap.adex",
      "name": "close",
      "data": {
        "owner": "trader.adex",
        "symbol": "0,LPA"
      },
      "authorization": [
        {
          "actor": "trader.adex",
          "permission": "active"
        }
      ]
    }
  ]
}'
```

{% endtab %}

{% tab title="eosjs" %}

```javascript
const result = await api.transact({
  actions: [{
    account: 'swap.adex',
    name: 'close',
    authorization: [{
      actor: 'trader.adex',
      permission: 'active',
    }],
    data: {
      owner: 'trader.adex',
      symbol: '0,LPA'
    },
  }]
}, {
  blocksBehind: 3,
  expireSeconds: 30,
});
```

{% 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://docs.a-dex.io/developers/smart-contracts/swap/examples/how-to-close-liquidity-account.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.
