# Exercise Option

[Contract Git Source](https://github.com/dopex-io/dopex-v2-clamm/blob/c47ed162e778d188e077b6b1874a8b5873e15c1d/src/DopexV2OptionMarketV2.sol)

Exercises the given option .

```solidity
function exerciseOption(ExerciseOptionParams calldata _params) external nonReentrant returns (AssetsCache memory ac);
```

**Parameters**

| Name      | Type                   | Description                     |
| --------- | ---------------------- | ------------------------------- |
| `_params` | `ExerciseOptionParams` | The exercise option parameters. |

### ExerciseOptionParams Struct

This struct contains the parameters needed to exercise an option.

| Field               | Type        | Description                            |
| ------------------- | ----------- | -------------------------------------- |
| optionId            | uint256     | Identifier of the option to exercise   |
| swapper             | ISwapper\[] | Array of swapper interfaces            |
| swapData            | bytes\[]    | Array of swap data                     |
| liquidityToExercise | uint256\[]  | Array of liquidity amounts to exercise |


---

# 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.stryke.xyz/developers/contracts/trading/exercise-option.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.
