> For the complete documentation index, see [llms.txt](https://hertzflow.gitbook.io/hertzflow-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hertzflow.gitbook.io/hertzflow-docs/trade-on-hertzflow/order-execution.md).

# Order Execution

## Order Types

You can open and close positions using four execution modes:

| Order Type                | Triggers When                                                            | Best For                                                              |
| ------------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| **Market** (Open / Close) | Immediately at mark price                                                | Getting in or out quickly when speed matters more than exact price    |
| **Limit** (Open only)     | Mark price reaches your set limit price                                  | Entering at a specific target price without overpaying                |
| **Trigger** (Close only)  | Mark price reaches your set trigger price, then executes as market order | Stop-loss or take-profit strategies — prioritizes execution certainty |
| **Liquidation**           | Mark price hits your liquidation threshold                               | Automatic protocol safeguard to prevent further losses                |

{% hint style="info" %}
**Limit vs. Trigger — what's the difference?**

* **Limit orders** rest as a pending order from the moment you place them. They only fill once the mark price reaches your limit price (or better) — great for price discipline, but may never fill in fast markets.
* **Trigger orders** stay inactive until your trigger price is hit, then become a market order. They prioritize getting you out over exact price, so some slippage is possible.
  {% endhint %}

## Price Impact

Price impact reflects the cost of pool imbalance when your trade skews the long/short ratio. HertzFlow uses a **deferred impact model** — you don't pay impact fees upfront:

1. **When you open:** Your entry price equals the oracle mark price. No impact fee is charged.
2. **While your position is open:** Price impact accrues as open interest imbalance fluctuates, but nothing is deducted yet.
3. **When you close:** The net price impact from open to close settles as part of your final PnL.

**Why this is better for you:** If the market rebalances while your position is open, you benefit from the reduced imbalance. You only pay for the net impact, not a worst-case estimate at entry.

* Impact is capped at **50 basis points (0.5%)**. If the calculated impact exceeds this cap, the excess is deducted upfront but stored in a claimable balance — you can reclaim it at any time from the **Claim** tab.
* If closing your position **reduces** pool imbalance, you receive a positive price impact (rebate).

**Example:** You open a $10,000 long when longs are dominant. By the time you close, shorts have caught up and the pool is more balanced. Instead of paying impact, you receive a small rebate because your exit helped rebalance the pool.

## Guaranteed Take Profit and Stop Loss

Your TP and SL orders are **guaranteed to execute at the trigger price you set**, regardless of how far the market moves past your trigger level.

**Example:** You set a stop loss at $1,900 for your ETH long. Due to extreme volatility, the oracle price gaps down to $1,850 — skipping right past your SL. HertzFlow still closes your position at $1,900 (your requested price), not the worse market price.

This guarantee applies to all TP/SL orders across every leverage tier, giving you reliable risk management even during high volatility.

## TP & SL Boundaries

To protect system solvency, TP and SL prices are bounded within a PnL range:

| Boundary                | Cap        |
| ----------------------- | ---------- |
| **Maximum Take Profit** | +2500% PnL |
| **Maximum Stop Loss**   | -80% PnL   |

**Example:** You open a long with 100 USDT collateral and 10x leverage ($1,000 position). Your maximum TP is at +2500% PnL = $2,500 profit. Your maximum SL is at -80% PnL = $80 loss.

{% hint style="info" %}
You can set both TP and SL simultaneously — whichever trigger hits first executes and automatically cancels the other. Both orders can be modified independently while your position is open.
{% endhint %}

If you add or remove collateral from a position, the valid TP/SL boundaries shift. You may need to update your trigger prices to stay within the -80% to +2500% PnL range.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hertzflow.gitbook.io/hertzflow-docs/trade-on-hertzflow/order-execution.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
