| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired

The URL for this request expired after 30 days.

### The request body for a /defi/v1/dex/swap

#### Parameters

- **dexId**  
  Type: `string`  
  Enum: The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols).

- **path**  
  Type: `array of strings`  
  Required: Array of token addresses to swap, in order of the swap.

- **amountIn**  
  Type: `string`  
  Required: Amount of token to be swapped.

- **amountOutMin**  
  Type: `string`  
  Minimum amount accepted as the result of the swap.

- **to**  
  Type: `string`  
  Required: Address of the recipient of the token.

- **deadline**  
  Type: `string`  
  Required: Deadline for the transaction to be executed (UNIX Timestamp).

- **from**  
  Type: `string`  
  Required: Address of the sender of the token.

- **gas**  
  Type: `string`  
  Maximum gas to be approved for the transaction.

- **gasPriority**  
  Type: `string`  
  Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

- **slippage**  
  Type: `string`  
  Percentage of total swap value allowed for slippage. Default is 1 (0 <= slippage <= 100).

- **enableFee**  
  Type: `boolean`  
  Flag to include a basis points fee transaction alongside the main transaction when set to true.

- **batchOption**  
  Type: `string`  
  Enum: The batch option to be used for the transaction.  
  Allowed: `EIP-5792`, `EIP-7702`

- **batcherContract**  
  Type: `string`  
  The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.

- **poolFees**  
  Type: `string`  
  Different pool based on the fees. By default, it will take the pool with maximum amountOut.

### Example Request

```bash
curl --request POST \
     --url https://svc.blockdaemon.com/defi/v1/dex/swap \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
```

### Response

```json
{
  "status": 200,
  "message": "Successful response"
}
```
