# eckoDEX SDK

## Initializing a eckoDEX SDK client

Initializing a eckoDEX SDK client is super simple and straightforward.

{% tabs %}
{% tab title="Node - TypeScript" %}

```typescript
import { KaddexSdk } from 'kaddex-sdk';

const kaddex = new KaddexSdk({ account, secretKey:  );

await kaddex.swap({ ... });
```

{% endtab %}
{% endtabs %}

You can also pass your account and/or secret key into the initializer to avoid the need to pass them into each function call.

{% tabs %}
{% tab title="Node - TypeScript" %}

```typescript
import dotenv from 'dotenv';
import { KaddexSdk } from 'kaddex-sdk';

dotenv.config();

const PUBLIC_KEY = process.env.PUBLIC_KEY;
const SECRET_KEY = process.env.SECRET_KEY;

// if your account name is different from your PUBLIC_KEY, use the correct value here
const account = await retrieveVerifiedAccount({ accountName: PUBLIC_KEY });

const kaddex = new KaddexSdk({ account, secretKey: SECRET_KEY });

await kaddex.swap({ ... });
```

{% endtab %}
{% endtabs %}

A client instance includes all the core methods you'll need for interacting with the swap.

{% content-ref url="/pages/f2vLO8zhCHmXyHoJnLF0" %}
[createPair](/eckodao/sdk/reference/eckodex-sdk/createpair.md)
{% endcontent-ref %}

{% content-ref url="/pages/kcqZJVBiZrhtJqoksozG" %}
[addLiquidity](/eckodao/sdk/reference/eckodex-sdk/addliquidity.md)
{% endcontent-ref %}

{% content-ref url="/pages/SbnzwkF9FzvM6G44yMA5" %}
[removeLiquidity](/eckodao/sdk/reference/eckodex-sdk/removeliquidity.md)
{% endcontent-ref %}

{% content-ref url="/pages/hyn5AaZFtOfAqUsN8aLG" %}
[swap](/eckodao/sdk/reference/eckodex-sdk/swap.md)
{% endcontent-ref %}

{% content-ref url="/pages/74CQ1yiDQ2HPqdBBvscV" %}
[swapExactIn](/eckodao/sdk/reference/eckodex-sdk/swapexactin.md)
{% endcontent-ref %}

{% content-ref url="/pages/e1j1VqYQtYAff0V5QXco" %}
[swapExactOut](/eckodao/sdk/reference/eckodex-sdk/swapexactout.md)
{% endcontent-ref %}


---

# 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.ecko.finance/eckodao/sdk/reference/eckodex-sdk.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.
