> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openfinance.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Open a Hyperliquid Perp With Take-Profit and Stop-Loss

> Decide where you will take profit and where you will cut a loss before you open the trade, then let your agent place the entry and both exits together.

By the end of this guide you will have opened a perp position on Hyperliquid with its take-profit and stop-loss attached, and checked that both exit orders are resting on the book.

A perp tracks a price with no expiry. You can go long or short with leverage, and you pay or receive funding while the position is open. A **take-profit** closes the position when the price reaches your target; a **stop-loss** closes it when the price moves against you by the amount you chose. Hyperliquid can group both with the entry in one order. See [Hyperliquid](https://docs.openfinance.tech/markets/hyperliquid.md).

## What you need

* USDC in your Hyperliquid account. See [Fund each venue](https://docs.openfinance.tech/guides/fund-each-venue.md).
* A plan: market, direction, size, leverage, and the two exit prices. Decide these before you open the chat.

## Steps

**1. Read your balance and the market**

```text theme={"system"}
What is my Hyperliquid balance and do I have open positions? Then show ETH's mid price, funding rate, open interest and maximum leverage.
```

You should get one USDC balance. If the agent mentions it switched your account to unified mode, that is a one-time setup step that lets spot and perp USDC count as one balance.

**2. Set leverage and margin mode (changes your account)**

```text theme={"system"}
Set ETH leverage to 3x, isolated margin. Show me the change first.
```

Isolated margin limits a loss to the margin set aside for this one position. Cross margin shares your whole balance across positions. Changing leverage alters the liquidation risk of an existing position, so the agent asks first.

**3. Ask for the order with its exits**

```text theme={"system"}
Long 0.1 ETH at market on Hyperliquid, with a take-profit 5% above entry and a stop-loss 3% below entry, grouped with the entry. Show me the full order, including the estimated liquidation price, before placing it.
```

Read the summary: market, side, size in ETH and in dollars, order type, leverage and margin mode, take-profit and stop-loss trigger prices, and the liquidation price. The stop-loss must sit between your entry and the liquidation price, or it will never get the chance to fire.

**4. Place it (moves money)**

Reply yes if every number matches your plan.

**5. Verify the position and the exits**

```text theme={"system"}
Show my ETH position, and list my open orders with trigger prices and reduce-only flags.
```

You should see the position plus two trigger orders, one take-profit and one stop-loss, both reduce-only.

**6. Add exits to a position you already hold (moves money)**

If you opened a position earlier without exits, attach them now:

```text theme={"system"}
Attach a stop-loss at 2900 and a take-profit at 3400 to my existing ETH position. Show me the orders first.
```

**7. Close or adjust later (moves money)**

```text theme={"system"}
Move my ETH stop-loss to my entry price.
```

```text theme={"system"}
Close half of my ETH position at market, reduce-only.
```

Every order needs your confirmation, and nothing here is financial advice. Leverage can lose your whole margin.

## Check it worked

* The position size and entry match the fill.
* Both trigger orders show in open orders with the prices you approved.
* Ask "what are my fills in the last hour?" to see exactly what executed.

## Common mistakes

* **Stops past the liquidation price.** At high leverage the liquidation price can sit closer than your stop. Lower leverage or tighten the stop.
* **Size in dollars sent as units.** Say "0.1 ETH" or "300 dollars of ETH" clearly. The agent converts dollars to the right size.
* **Forgetting the exits on a manual close.** If you close a position some other way, ask the agent to cancel any exit orders still resting.
* **Prices too far from the market.** Hyperliquid rejects them. Ask for a fresh mid price and retry.
* **Ignoring funding.** A position held for days pays or receives funding. Ask for your funding history to see the effect.

## Next guides

> [card] [Stock and FX perps on Hyperliquid](https://docs.openfinance.tech/guides/hyperliquid-stock-perps.md)
>
> The same flow on HIP-3 markets.

> [card] [Work a large order](https://docs.openfinance.tech/guides/twap-and-limit-ladders.md)
>
> TWAP and limit ladders for bigger entries.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.