# Request a Swap Quote

`POST /swaps/quotes`

Requests a new swap quote.

{% hint style="info" %}

* User action signature required. See [User Action Signing](https://docs-legacy.dfns.co/d/api-docs/authentication/user-action-signing) for more information.
* Request headers required. See [Request Headers](https://docs-legacy.dfns.co/d/advanced-topics/authentication/request-headers) for more information.
* Authentication required. See [Authentication Headers](https://docs-legacy.dfns.co/d/advanced-topics/authentication/request-headers#authentication-headers) for more information.
  {% endhint %}

## Parameters <a href="#parameters.1" id="parameters.1"></a>

## Body <a href="#request-body" id="request-body"></a>

<table><thead><tr><th width="247.1796875">Property</th><th width="121">Required/Optional</th><th width="246.76171875">Description</th><th width="131.6015625">Type</th></tr></thead><tbody><tr><td><code>walletId</code> <mark style="color:red;">*</mark></td><td>Required</td><td>Id of the Dfns wallet spending the sourceAsset</td><td>String</td></tr><tr><td><code>targetWalletId</code> <mark style="color:red;">*</mark></td><td>Required</td><td>Id of the Dfns wallet receiving the targetAsset. Currently this value must be the same as the walletId</td><td>String</td></tr><tr><td><code>provider</code> <mark style="color:red;">*</mark></td><td>Required</td><td>The Swap provider, either "UniswapClassic" or "UniswapX"</td><td>String</td></tr><tr><td><code>sourceAsset</code><mark style="color:red;">*</mark></td><td>Required</td><td>The source asset that will be spent on the Swap transaction, following the same stucture as the <a href="../../../api-docs/wallets/transfer-asset">transfer API</a></td><td>Object</td></tr><tr><td><code>targetAsset</code> <mark style="color:red;">*</mark></td><td>Required</td><td>The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount</td><td>Object</td></tr><tr><td><code>slippageBps</code><mark style="color:red;">*</mark></td><td>Required</td><td>The slippage tolerance for this trade. Slippage tolerance defines the maximum price movement you're willing to accept during a trade, ensuring you still receive at least a minimum number of tokens if the price shifts.</td><td>Number</td></tr></tbody></table>

**Example**

```json
{
    "walletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
    "targetWalletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
    "provider": "UniswapClassic",
    "sourceAsset": {
        "kind": "Native",
        "amount": "10000000000"
    },
    "targetAsset": {
        "kind": "Erc20",
        "contract": "0xda0be7efd234295395d4204d0df4358339b57b27"
    },
    "slippageBps": 100
}
```

## Response <a href="#response" id="response"></a>

### Response example <a href="#response-example" id="response-example"></a>

```json
{
    "id": "swapQuote-3hgv4-q8tbf-8v2ajmrbmg6m4i9t",
    "walletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
    "targetWalletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
    "provider": "UniswapClassic",
    "sourceAsset": {
        "kind": "Native",
        "amount": "10000000000",
        "metadata": {
            "network": "EthereumSepolia",
            "name": "Ethereum",
            "symbol": "SepoliaETH",
            "decimals": 18,
            "tid": "native:eth"
        }
    },
    "targetAsset": {
        "kind": "Erc20",
        "contract": "0xda0be7efd234295395d4204d0df4358339b57b27",
        "amount": "6467571553831928182",
        "metadata": {
            "network": "EthereumSepolia",
            "name": "Test",
            "symbol": "Test",
            "decimals": 18,
            "tid": "erc20:0xda0be7efd234295395d4204d0df4358339b57b27"
        }
    },
    "slippageBps": 100,
    "dateCreated": "2025-09-11T10:52:15.039Z",
    "requestBody": {
        "provider": "UniswapClassic",
        "walletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
        "targetWalletId": "wa-3l3cj-l8mq7-8q78f9nopq7f1qjv",
        "sourceAsset": {
            "kind": "Native",
            "amount": "10000000000"
        },
        "targetAsset": {
            "kind": "Erc20",
            "contract": "0xda0be7efd234295395d4204d0df4358339b57b27"
        },
        "slippageBps": 100
    },
    "requester": {
        "userId": "us-48r5q-eshfg-9pmr2lo6bmpr4i4i",
        "tokenId": "to-4etah-smoal-9n3rmhul4dpaueg5"
    }
}
```
