# Before you get started

{% hint style="info" %}
Here's an example project built with Next.js. Its purpose is to demonstrate how to integrate the Unizen API for single-chain and cross-chain trade: <https://github.com/unizen-io/unizen-dex-aggregator-example>
{% endhint %}

For security reasons, our API does not return contract addresses. Instead, you can obtain Trade Aggregator addresses using either of the following methods:

1. Install the npm package: <https://www.npmjs.com/package/@unizen-io/unizen-contract-addresses> and use the JSON file from `@unizen-io/unizen-contract-addresses/production.json`
2. Configure the JSON file provided below for your project.

```

  {
  "v1": {
    "ethereum": "0xd3f64BAa732061F8B3626ee44bab354f854877AC",
    "bsc": "0x880E0cE34F48c0cbC68BF3E745F17175BA8c650e",
    "polygon": "0x07d0ac7671D4242858D0cebcd34ec03907685947",
    "avax": "0x1C7F7e0258c81CF41bcEa31ea4bB5191914Bf7D7",
    "fantom": "0xBE2A77399Cde40EfbBc4e89207332c4a4079c83D",
    "arbitrum": "0x1C7F7e0258c81CF41bcEa31ea4bB5191914Bf7D7",
    "optimism": "0xad1D43efCF92133A9a0f33e5936F5ca10f2b012E",
    "base": "0x4F68248ecB782647D1E5981a181bBe1bfFee1040"
  },
  "v2": {
    "ethereum": "0xf140bE1825520F773Ff0F469786FCA65c876885f",
    "bsc": "0x12067e4473a1f00e58fa24e38e2cf3e53e21a33d",
    "polygon": "0x85f8fb7ac814d0a6a0b16bc207df5bbc631f1ca6",
    "avax": "0x468ae09BD4c8B4D9f7601e37B6c061776FeCFE3B",
    "fantom": "0xD38559966E53B651794aD4df6DDc190d2235180E",
    "arbitrum": "0x9660b95fcDBA4B0f5917C47b703179E03a28bf27",
    "optimism": "0x3ce6e87922e62fc279152c841102eb2bf5497010"
  },
  "v3": {
    "ethereum": "0xCf2DBA4e5C9f1B47AC09dc712A0F7bD8eE31A15d",
    "bsc": "0xa9c430de6a91132330A09BE41f9f19bf45702f74",
    "polygon": "0xCf2DBA4e5C9f1B47AC09dc712A0F7bD8eE31A15d",
    "avax": "0xa9c430de6a91132330A09BE41f9f19bf45702f74",
    "arbitrum": "0xa9c430de6a91132330A09BE41f9f19bf45702f74",
    "optimism": "0xa9c430de6a91132330A09BE41f9f19bf45702f74",
    "base": "0xa9c430de6a91132330A09BE41f9f19bf45702f74"
  }
}
```

This file contains the addresses of our production contracts. The version, indicated by "v1" or "v2" or "v3", corresponds to the trade and can be obtained from the quote data of the respective trade using the /quote API.<br>

### How to set the fees

The fees for each integrator can vary based on the selected API plan and, for custom plans, are determined by the fee and revenue-sharing percentage agreed upon with Unizen. Additionally, each trade quote includes a `feePercentage` parameter, allowing integrators to specify different fees based on the trade. For custom plans, the `feePercentage` must fall within the predefined range agreed upon with Unizen.

For more detailed information, please refer to [here](/introduction-to-unizen/unizen-trade/fees.md).

### Make sure you grasp the concepts of Price Impact and Slippage

We have written an article diving into the concepts and protective measures that should be put in place to protect users from conducting trades with high price impact or slippage. \
\
This article can be found [here](/api-introduction/before-you-get-started/understanding-price-impact-and-price-slippage-in-token-swaps.md).&#x20;


---

# 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.unizen.io/api-introduction/before-you-get-started.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.
