> For the complete documentation index, see [llms.txt](https://sharwa.gitbook.io/sharwa-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharwa.gitbook.io/sharwa-docs/for-devs/margin-account/hegicstoporders.md).

# HegicStopOrders

### Features

#### Functionality:

1. Automatically execute the option when time conditions are met.
2. Automatically execute the option when price conditions are met.

#### Examples

For example, if you buy a Call option with a strike price of $1,000, you can set up a stop market order with a trigger price of $1,100. When the trigger condition is met, the option can be exercised (closed).

HegicStopOrders uses Chainlink Automation to check the conditions of all active stop orders. When the trigger conditions are met, Chainlink Automation calls the specified function that exercises the option.

HegicStopOrders also uses Chainlink Price Oracles to determine if the price trigger condition is met.

Another functionality involves time-based triggers. You can set up a time trigger, and the positions will be closed when the trigger condition is met. For example, you can set a condition that your position should be exercised one hour before the expiration date. When the time conditions are met, Chainlink Automation will call the specified function to exercise the position.

### Support

If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel in our Discord.

{% embed url="<https://github.com/SharwaFinance/HegicStopOrders>" %}
