# Order Execution

## Order Types

Orders are categorized into three primary execution modes: Market Orders, Limit Orders, and Trigger Orders, excluding liquidations.

| <p><strong>Market</strong></p><p><strong>Open / Close</strong></p> | Mark Price (immediate)                                         | Entering / Exiting a trade quickly when execution speed is more important than exact price. |
| ------------------------------------------------------------------ | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| <p><strong>Limit</strong></p><p><strong>Open</strong></p>          | Execution price reaches trader’s set limit price               | Opening at a specific target price without compromising on value.                           |
| <p><strong>Trigger</strong></p><p><strong>Close</strong></p>       | Execution price reaches trader’s set trigger price (immediate) | Stop-loss or take-profit strategies when you prioritize execution certainty.                |
| **Liquidation**                                                    | Mark price hits liquidation threshold                          | Platform safeguard to prevent further losses and maintain solvency.                         |

{% hint style="info" %}
**Note that:** *Trigger orders* differ from *limit orders*:

* **Limit**: Stays active in the order book from placement. Executes only at your set price or better. Great for price discipline, but may never fill in fast markets.
* **Trigger**: Inactive until your trigger price is hit, then becomes a market order. Prioritizes execution over exact price, so slippage is possible.
  {% endhint %}

## Price Impact Mechanism

Price impact reflects the cost of pool imbalance when trades skew the long-short ratio. Unlike traditional systems that charge impact fees at entry, HertzFlow applies a deferred impact model. When opening positions, the entry price equals the oracle mark price with no immediate impact charge. Throughout the position lifecycle, price impact accrues as open interest imbalance fluctuates, but fees are not assessed until closing.

At position closure, the net price impact from entry to exit settles as part of the final position accounting. This approach allows traders to benefit from favorable market movements that reduce imbalance. Price impact is capped at **50 basis points (0.5%)** with excess amounts converting to rebates for traders. Positions that close into reduced imbalance receive positive price impact as a rebate, incentivizing liquidity balancing.

## Guaranteed Take Profit and Stop Loss

HertzFlow implements guaranteed execution for take profit and stop loss orders across all leverage tiers. Given the platform's reliance on oracle pricing for execution, a trader's TP or SL request is always filled at the requested price, regardless of how far market price moves beyond the trigger level.

For example, if oracle prices gap below a trader's requested stop loss for a long position due to extreme volatility, HertzFlow closes the position at the requested SL price rather than the worse market price. This guarantee applies to all stop loss orders set within valid boundaries, ensuring traders have sophisticated risk management tools even during high market volatility or when trading with extreme leverage.

## Take Profit & Stop Loss Boundaries

TP and SL prices are capped to protect system solvency:

**Take Profit Caps:**

Long: `TP Price ≤ [(25 × Collateral - Fees) / Size + 1] × Entry Price`\
Short: `TP Price ≥ [1 - (25 × Collateral - Fees) / Size] × Entry Price`

Maximum profit: +2500% PnL

**Stop Loss Caps:**

Long: `SL Price ≥ [(-0.8 × Collateral - Fees) / Size + 1] × Entry Price`\
Short: `SL Price ≤ [1 - (-0.8 × Collateral - Fees) / Size] × Entry Price`

Maximum loss: -80% PnL

The platform automatically validates trigger prices against these boundaries and displays warnings if your inputs fall outside acceptable ranges.

Traders can set both take profit and stop loss orders simultaneously, creating bracketed exit strategies that automatically manage positions in either direction. When both orders are active, whichever trigger price is reached first executes and closes the position, automatically canceling the remaining order.

These orders remain attached to their positions and can be modified independently while positions remain open. Adding or removing collateral from positions adjusts the valid price boundaries for TP and SL orders, potentially requiring traders to update trigger prices to maintain compliance with the -80% to +2500% PnL range.


---

# 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://hertzflow.gitbook.io/hertzflow-docs/trade-on-hertzflow/order-execution.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.
