> For the complete documentation index, see [llms.txt](https://docs.boba.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.boba.xyz/agents/boba-agents/core-capabilities/perpetuals-trading/tp-sl-and-conditionals.md).

# TP/SL & Conditionals

***

### Overview

Risk management is everything in leveraged trading. TP/SL and conditional orders let you define your exit plan upfront so you don't have to watch charts 24/7. Set a stop-loss to cap your downside, a take-profit to lock in gains, or a conditional trigger to enter or exit at a specific price level.

**What you can do:**

* Attach stop-loss and take-profit to any position
* Set TP/SL when opening a position or add them after
* Place conditional orders that trigger at a specific price
* Use stop-market and stop-limit orders for precise exits
* Use take-market and take-limit orders for profit targets
* Combine multiple conditions on a single position

***

### Stop-Loss

A stop-loss automatically closes your position if the price moves against you, limiting your downside.

* **On a long**: Stop-loss triggers when price drops to your level
* **On a short**: Stop-loss triggers when price rises to your level

| Prompt                                      | Interpretation                            |
| ------------------------------------------- | ----------------------------------------- |
| "Add a stop-loss on my BTC long at $92,000" | Closes BTC long if price drops to $92,000 |
| "Set a stop at $3,100 on my ETH position"   | Adds SL to existing ETH position          |
| "Stop-loss my SOL long at 5% below entry"   | SL set 5% below your entry price          |
| "Add a tight stop on BTC at $96,500"        | Close stop-loss near current price        |
| "Move my ETH stop to $3,200"                | Updates existing stop-loss to new level   |

#### How It Works

When your stop price is hit, a market order is placed to close your position. This means:

* Execution is guaranteed (as long as there's liquidity)
* The fill price may differ slightly from your stop price due to slippage
* In fast-moving markets, slippage can be larger than expected

{% hint style="info" %}
**Tip**: For tighter control over execution price, use a stop-limit instead. It places a limit order when triggered, but risks not filling if price moves too fast.
{% endhint %}

***

### Take-Profit

A take-profit automatically closes your position when price reaches your target, locking in gains.

* **On a long**: Take-profit triggers when price rises to your level
* **On a short**: Take-profit triggers when price drops to your level

| Prompt                                           | Interpretation                              |
| ------------------------------------------------ | ------------------------------------------- |
| "Set a take-profit on my BTC long at $105,000"   | Closes BTC long when price hits $105k       |
| "TP my ETH short at $3,000"                      | Closes ETH short when price drops to $3,000 |
| "Take profit on SOL at $180"                     | Locks in gains at $180                      |
| "Add a TP at 10% above entry on my BTC position" | TP set 10% above entry price                |
| "Move my ETH take-profit to $2,800"              | Updates existing TP level                   |

***

### Combined TP/SL

The most common setup is attaching both a stop-loss and take-profit at the same time, either when opening a position or after.

#### On Entry

| Prompt                                                | Interpretation                             |
| ----------------------------------------------------- | ------------------------------------------ |
| "Long $500 ETH with SL at $3,200 and TP at $4,000"    | Opens long with both exits set immediately |
| "Short $1000 BTC, stop $105k, take profit $90k"       | Short with full risk management from entry |
| "10x long SOL $2000, stop at $140, TP at $175"        | Leveraged entry with SL and TP             |
| "Buy ETH perps $300 with 5% stop and 15% take profit" | Percentage-based SL and TP                 |

#### After Entry

| Prompt                                                       | Interpretation                 |
| ------------------------------------------------------------ | ------------------------------ |
| "Add SL at $92,000 and TP at $105,000 to my BTC position"    | Adds both to existing position |
| "Set stop and take profit on my ETH long, $3,100 and $3,800" | SL and TP on open position     |
| "Update my BTC stop to $94,000 and TP to $110,000"           | Modifies both levels           |

{% hint style="info" %}
**Best practice**: Always set your TP/SL at entry. It takes the emotion out of exits and ensures you have a plan before the market moves.
{% endhint %}

***

### Conditional Orders

Conditional orders are standalone orders that trigger when a price level is hit. Unlike TP/SL which are attached to positions, conditionals can be used for entries, exits, or anything in between.

#### Stop-Market

Triggers a market order when price hits your level. Commonly used for breakout entries or stop-losses.

| Prompt                                     | Interpretation                           |
| ------------------------------------------ | ---------------------------------------- |
| "Sell $200 BTC if price drops to $60,000"  | Stop-market sell triggered at $60,000    |
| "Short ETH $500 if it breaks below $3,000" | Breakdown entry, shorts ETH on the drop  |
| "Long SOL $300 if it breaks above $160"    | Breakout entry, longs SOL on the move up |

#### Stop-Limit

Same trigger as stop-market, but places a limit order instead of a market order. Gives you price control but risks not filling.

| Prompt                                                   | Interpretation                           |
| -------------------------------------------------------- | ---------------------------------------- |
| "Sell $500 BTC if it drops to $60,000, limit at $59,500" | Triggered at $60k, limit order at $59.5k |
| "Short ETH at $3,000 trigger with $2,990 limit"          | Triggered at $3k, places limit at $2,990 |

#### Take-Market

Triggers a market order at your take-profit level. Used for profit-taking entries or exits.

| Prompt                              | Interpretation                    |
| ----------------------------------- | --------------------------------- |
| "Buy $300 ETH if it reaches $5,000" | Take-market entry at $5,000       |
| "Long SOL $500 when it hits $200"   | Enters long when SOL reaches $200 |

#### Take-Limit

Same trigger as take-market, but places a limit order.

| Prompt                                             | Interpretation                    |
| -------------------------------------------------- | --------------------------------- |
| "Buy $300 ETH at $5,000 trigger with $5,010 limit" | Triggered at $5k, limit at $5,010 |

***

### Conditional Order Types Summary

| Type        | Trigger          | Execution                   | Best For                         |
| ----------- | ---------------- | --------------------------- | -------------------------------- |
| Stop-Market | Price hits level | Market order (instant)      | Stop-losses, breakdown entries   |
| Stop-Limit  | Price hits level | Limit order (price control) | Precise exits, avoiding slippage |
| Take-Market | Price hits level | Market order (instant)      | Take-profits, breakout entries   |
| Take-Limit  | Price hits level | Limit order (price control) | Precise profit-taking            |

***

### Strategies

#### Risk/Reward Setup

Define your risk before entering. A common approach is 1:2 or 1:3 risk/reward:

```
Entry: Long BTC at $97,000
Stop-Loss: $95,000 (2% risk, $2,000 downside)
Take-Profit: $103,000 (6% reward, $6,000 upside)
Risk/Reward: 1:3
```

| Prompt                                                 | Interpretation        |
| ------------------------------------------------------ | --------------------- |
| "Long $1000 BTC at $97,000, stop $95,000, TP $103,000" | 1:3 risk/reward setup |

#### Trailing Exit Strategy

Use conditional orders to scale out of a winning position:

```
1. Open: Long $1000 ETH at $3,400
2. First TP: Close $500 at $3,600 (lock in half)
3. Move stop to breakeven ($3,400)
4. Second TP: Close remaining $500 at $3,800
```

#### Breakout Trading

Use conditionals to enter only when price confirms a breakout:

```
1. "Long SOL $500 if it breaks above $160"    → Breakout entry
2. Attach SL at $155 and TP at $180            → Manage risk
3. Wait for trigger, no need to watch charts
```

#### Stop-Loss Laddering

Instead of one stop-loss, spread your exits across multiple levels:

```
1. Close 50% at $94,000 (tight stop)
2. Close remaining 50% at $92,000 (wider stop)
→ Reduces chance of getting stopped out on a wick
```

***

### Pro Tips

1. **Always set a stop-loss** - Especially with leverage, one bad move without a stop can wipe your margin
2. **Use stop-market for guaranteed exits** - Stop-limits can miss in fast markets
3. **Set TP/SL at entry, not after** - Removes emotion and ensures a plan before the market moves
4. **Avoid stops at round numbers** - $95,000, $3,000, $150 are magnets for stop hunts. Offset by $50-100
5. **Consider risk/reward before entering** - If your stop is wider than your target, the trade math doesn't work
6. **Use conditionals for breakout entries** - Let the market come to you instead of chasing

***


---

# 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://docs.boba.xyz/agents/boba-agents/core-capabilities/perpetuals-trading/tp-sl-and-conditionals.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.
