Sharwa.Finance Documentation
  • 💼Margin Account
    • Liquidity Providers
      • Insurance Pool
    • Liquidation
    • Fees
    • Allowed Assets
    • Security
    • Links
  • 🪙Tokenomics
    • We don't have a token
  • 🦾FOR DEVS
    • Margin Account
      • Core Contracts
        • MarginTrading.sol
        • MarginAccountManager.sol
        • LiquidityPool.sol
        • ModularSwapRouter
          • HegicModule.sol
      • Toolkits and other contracts
        • OneClick Contracts
      • HegicStopOrders
        • HegicStopOrders SDK
  • 📚Guide
    • How To Trade on Sharwa
Powered by GitBook
On this page
  • Features
  • Support
  1. FOR DEVS
  2. Margin Account

HegicStopOrders

HegicStopOrders is a system that allows users to delegate the execution of option positions.

PreviousOneClick ContractsNextHegicStopOrders SDK

Last updated 3 months ago

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.

🦾
GitHub - SharwaFinance/HegicStopOrdersGitHub
Logo