# /quote v2 - Request a trade quote

### Endpoint

**Method:** `POST`\
**URL:** `https://api.swapkit.dev/quote`

***

### Request parameters

```json
{
  "sellAsset": "string",
  "buyAsset": "string",
  "sellAmount": "string",
  "providers": [
    "string"
  ],
  "sourceAddress": "string",
  "destinationAddress": "string",
  "slippage": 100,
  "affiliate": "string",
  "affiliateFee": 1000,
  "allowSmartContractSender": true,
  "allowSmartContractReceiver": true,
  "disableSecurityChecks": true,
  "includeTx": true,
  "cfBoost": true
}
```

Here's a detailed description of the different parameters:

<table data-full-width="false"><thead><tr><th width="230">Parameter</th><th width="110">Type</th><th width="99">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>sellAsset</code></td><td><code>string</code></td><td>✅ Yes</td><td>The asset being sold (e.g. <code>"ETH.ETH"</code>).</td></tr><tr><td><code>buyAsset</code></td><td><code>string</code></td><td>✅ Yes</td><td>The asset being bought (e.g. <code>"BTC.BTC"</code>).</td></tr><tr><td><code>sellAmount</code></td><td><code>string</code></td><td>✅ Yes</td><td>Amount in basic units (decimals separated with a dot).</td></tr><tr><td><code>providers</code></td><td><code>array</code></td><td>❌ No</td><td>Limits the possible liquidity providers.</td></tr><tr><td><code>sourceAddress</code></td><td><code>string</code></td><td>✅ Yes</td><td>Address of the sender.</td></tr><tr><td><code>destinationAddress</code></td><td><code>string</code></td><td>✅ Yes</td><td>Address of the recipient.</td></tr><tr><td><code>slippage</code></td><td><code>number</code></td><td>❌ No</td><td>Max slippage in percentage (5 = 5%).</td></tr><tr><td><code>affiliate</code></td><td><code>string</code></td><td>❌ No</td><td>Affiliate address for revenue sharing.</td></tr><tr><td><code>affiliateFee</code></td><td><code>number</code></td><td>❌ No</td><td>Fee percentage in basis points (50= 0.5%).</td></tr><tr><td><code>allowSmartContractSender</code></td><td><code>boolean</code></td><td>❌ No</td><td>Allow smart contract as sender. Do not use without consulting SwapKit devs first. </td></tr><tr><td><code>allowSmartContractReceiver</code></td><td><code>boolean</code></td><td>❌ No</td><td>Allow smart contract as receiver. Do not use without consulting SwapKit devs first. </td></tr><tr><td><code>disableSecurityChecks</code></td><td><code>boolean</code></td><td>❌ No</td><td>Bypass security checks. Do not use without consulting SwapKit devs first. </td></tr><tr><td><code>includeTx</code></td><td><code>boolean</code></td><td>❌ No</td><td>Include transaction details in the response. Read more about it <a href="/pages/acApilBPwysSkWkXWCqQ">here</a>.</td></tr><tr><td><code>cfBoost</code></td><td><code>boolean</code></td><td>❌ No</td><td>Enables Chainflip boost for better rates.</td></tr></tbody></table>

**Note:** Asset names for `sellAsset` and `buyAsset` should follow the following nomenclature:

* Chain.Asset (e.g., `"BTC.BTC"` or `"ARB.ETH"`)
* Chain.Asset-ContractAddress (e.g., `"ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"`)

This is the `identifier`as provided in the [`/tokens`](/swapkit-api/tokens-request-supported-tokens-by-a-swap-provider.md) endpoint.

{% hint style="warning" %}
When you test your integration, use an address with enough `sellAsset` balance to cover the trade. This will ensure you receive complete responses.
{% endhint %}

***

### Example request

A simple request to trade `ETH.ETH`to `BTC.BTC`may omit the `providers`list if you can manage them in the response, but should include the amount, the involved addresses and slippage settings.

The expiration time returned by the endpoint is an estimation. We recommend requesting a new quote at least every minute if the trade has not been executed yet.

{% hint style="info" %}
Using the header `x-api-key`in your `/quote`request automatically applies your affiliate addresses and fee values set up through our [partners dashboard](/monetization.md#step-3-set-affiliate-fee-tiers) in the response parameters.
{% endhint %}

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

```sh
curl -X POST "https://api.swapkit.dev/quote" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_VARIABLE_HERE" \
  -d '{
    "sellAsset": "ETH.ETH",
    "buyAsset": "BTC.BTC",
    "sellAmount": "0.1",
    "sourceAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "destinationAddress": "357a3So9CbsNfBBgFYACGvxxS6tMaDoa1P",
    "slippage": 10,
    "includeTx": true
  }'
```

{% 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.swapkit.dev/swapkit-api-v2/quote-v2-request-a-trade-quote.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.
