> For the complete documentation index, see [llms.txt](https://docs.stryke.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stryke.xyz/developers/apis/clamm-deprecated/trading/exercise.md).

# Exercise

### Prepare Exercise

Generate transaction call data for exercising options positions purchased on CLAMM.

Exercising on CLAMM involves swapping of tokens. i.e if for call options, Call Asset (eg: ETH) -> Put Asset (eg: USDC) and vice versa. Currently, the API only supports swaps through DEX and aggregators as specified below:

| DEX           | Chains Supported              | SwapperId   |
| ------------- | ----------------------------- | ----------- |
| PancakSwap V3 | Arbitrum, Base                | pancakeswap |
| Uniswap V3    | Arbitrum, Base                | uniswap     |
| Sushiswap V3  | Arbitrum, Base, Mantle, Blast | sushiswap   |
| Thruster V3   | Blast                         | thruster    |
| Agni V3       | Mantle                        | agni        |
| FusionX V3    | Mantle                        | fusionx     |

| Aggregator          | Chains Supported              | SwapperId |
| ------------------- | ----------------------------- | --------- |
| 0x Protocol         | Arbitrum, Base, Blast         | 0x        |
| Odos SOR V2         | Arbitrum, Base, Mantle        | odos      |
| 1inch Aggregator V6 | Arbitrum, Base                | 1inch     |
| Paraswap V6.2       | Arbitrum, Base                | paraswap  |
| KyberSwap V1        | Arbitrum, Base, Mantle, Blast | kyberswap |
| OpenOcean V4        | Arbitrum, Base, Mantle, Blast | openocean |

It is important to try and experiment with reasonable slippage percentages as CLAMM contracts always ensure the underlying collateral of the options are fulfilled before the profit is paid out to the trader when the swap takes place. To understand this concept better let's consider the example below:

```
strike: 1000 USDC
options amount: 10 WETH
type: CALL
size: 10 WETH

exercise price: 1050
slippage tolerance: 1%
swap route: WETH -> USDC

amount after swap without slippage: 10500 USDC
profit after swap without slippage: 500 USDC
amount after swap considering slippage: 10395 USDC
profit after swap considering slippage: 395 USDC
amount to fulfill liquidity providers: 10000 USDC
```

As you can see with the example above, when options are exercised the slippage only affects trader's profit to ensure liquidity providers are always whole. To avoid losing much on profit it is recommended to exercise options partially similar to how one would TWAP on DEXs or use supported aggregators but it is also important to note that even aggregators are prone to slippage if the size of the swap is big enough.

{% openapi src="/files/uiLe2AdTixay9Y0zMePt" path="/clamm/exercise/prepare" method="get" %}
[stryke-api-swagger.yaml](https://1713171471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtOz5vakeeIFF4xdhXZoK%2Fuploads%2F7vSesYn9AbVPrQsNonoy%2Fstryke-api-swagger.yaml?alt=media\&token=3587d8b1-a932-4855-978d-363671da0ce2)
{% endopenapi %}

### Exercise History

the history endpoint can be used to retrieve the history of options exercised for a user

{% openapi src="/files/uiLe2AdTixay9Y0zMePt" path="/clamm/exercise/history" method="get" %}
[stryke-api-swagger.yaml](https://1713171471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtOz5vakeeIFF4xdhXZoK%2Fuploads%2F7vSesYn9AbVPrQsNonoy%2Fstryke-api-swagger.yaml?alt=media\&token=3587d8b1-a932-4855-978d-363671da0ce2)
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stryke.xyz/developers/apis/clamm-deprecated/trading/exercise.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
