> 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/positions-and-orders.md).

# Positions & Orders

***

### Overview

Once you've placed trades, you need to keep track of what's open, how it's performing, and what orders are still pending. Positions & Orders gives you a real-time view of everything happening in your Hyperliquid account.

**What you can do:**

* View all open positions with entry price, size, and unrealized PnL
* Check individual positions for detailed performance
* See all pending orders (limits, stops, take-profits)
* Monitor your margin usage and liquidation levels
* Track return on equity (ROE) per position

***

### Viewing Positions

Your positions are your currently open trades. Each position shows the asset, direction (long/short), size, entry price, current mark price, unrealized PnL, and liquidation price.

| Prompt                           | Interpretation                                   |
| -------------------------------- | ------------------------------------------------ |
| "Show my positions"              | All open positions with live PnL                 |
| "What positions do I have open?" | Same, full position overview                     |
| "How's my BTC position?"         | BTC position details with entry, mark price, PnL |
| "Am I up or down on ETH?"        | ETH position performance                         |
| "What's my SOL position size?"   | SOL notional value and margin used               |
| "Show my largest position"       | Position with the highest notional value         |

#### What You'll See

For each open position:

| Field                 | What It Shows                                 |
| --------------------- | --------------------------------------------- |
| **Asset**             | The token (BTC, ETH, SOL, etc.)               |
| **Side**              | Long or Short                                 |
| **Size**              | Notional value in USD                         |
| **Entry Price**       | Your average entry price                      |
| **Mark Price**        | Current market price                          |
| **Unrealized PnL**    | Profit or loss if you closed right now        |
| **ROE**               | Return on equity (PnL as % of margin used)    |
| **Liquidation Price** | Price at which the position gets force-closed |
| **Leverage**          | Current leverage on this position             |
| **Margin Mode**       | Cross or Isolated                             |

***

### Monitoring PnL

Track how your positions are doing in real-time without closing them.

| Prompt                               | Interpretation                               |
| ------------------------------------ | -------------------------------------------- |
| "What's my total PnL?"               | Sum of unrealized PnL across all positions   |
| "How much am I up on BTC?"           | BTC unrealized PnL in dollars and percentage |
| "What's my ROE on ETH?"              | Return on equity for ETH position            |
| "Am I profitable right now?"         | Overall account unrealized PnL               |
| "Which position is doing best?"      | Ranks positions by PnL                       |
| "Which position is losing the most?" | Identifies worst performer                   |

{% hint style="info" %}
**Unrealized PnL** changes with every price tick. It only becomes **realized PnL** when you close the position.
{% endhint %}

***

### Viewing Orders

Orders are your pending instructions that haven't executed yet: limit orders waiting for a price, stop-losses, take-profits, and conditionals.

| Prompt                          | Interpretation                       |
| ------------------------------- | ------------------------------------ |
| "Show my open orders"           | All pending orders across all assets |
| "What orders do I have on BTC?" | BTC-specific pending orders          |
| "Do I have any limit orders?"   | Filters to limit orders only         |
| "Show my stop-losses"           | All active stop-loss orders          |
| "What take-profits are set?"    | All active TP orders                 |
| "Any pending orders on ETH?"    | ETH-specific orders                  |

#### What You'll See

For each pending order:

| Field             | What It Shows                                                   |
| ----------------- | --------------------------------------------------------------- |
| **Asset**         | The token                                                       |
| **Side**          | Buy or Sell                                                     |
| **Type**          | Market, Limit, Stop-Market, Stop-Limit, Take-Market, Take-Limit |
| **Size**          | Order amount in USD                                             |
| **Price**         | Limit price or trigger price                                    |
| **Status**        | Open, Partially Filled, Triggered                               |
| **Time-in-Force** | GTC, IOC, or ALO                                                |

***

### Account Overview

Get a high-level snapshot of your entire Hyperliquid account including equity, margin usage, and available balance.

| Prompt                            | Interpretation                               |
| --------------------------------- | -------------------------------------------- |
| "Show my account overview"        | Full account snapshot                        |
| "What's my account balance?"      | Total equity and available margin            |
| "How much free margin do I have?" | Available balance for new positions          |
| "What's my margin usage?"         | Used margin vs total equity                  |
| "Am I close to liquidation?"      | Margin ratio and lowest liquidation distance |

#### Key Account Metrics

| Metric                   | What It Means                                      |
| ------------------------ | -------------------------------------------------- |
| **Equity**               | Account balance + unrealized PnL                   |
| **Used Margin**          | Collateral backing open positions                  |
| **Free Margin**          | Equity minus used margin, available for new trades |
| **Margin Ratio**         | Used margin / equity (higher = more risk)          |
| **Total Unrealized PnL** | Sum of all open position PnL                       |
| **Total Realized PnL**   | Cumulative closed trade PnL                        |

***

### Position + Order Relationship

Understanding how positions and orders connect helps you manage your trades:

#### Open Position with No Orders

You have a position but no stop-loss, take-profit, or pending orders attached. The position stays open until you manually close it.

{% hint style="warning" %}
This is risky, especially with leverage. Always consider adding a stop-loss.
{% endhint %}

#### Open Position with TP/SL

Your position has a stop-loss and/or take-profit attached. These show up as pending orders. When triggered, they close your position automatically.

#### Pending Orders with No Position

You have limit orders or conditional orders waiting to fill. Once filled, they create a new position.

#### Multiple Orders on One Position

You can have multiple orders attached to a single position:

* A stop-loss below entry
* A take-profit above entry
* Additional limit orders to scale in or out

{% hint style="info" %}
**Tip**: When you close a position manually, remember to cancel any attached TP/SL orders. Otherwise they'll remain active and could open a new position if triggered.
{% endhint %}

***

### Common Workflows

#### Morning Check

```
1. "Show my positions"          → See what's open and how it's doing
2. "What's my total PnL?"       → Quick P&L snapshot
3. "Show my open orders"        → Verify stops and TPs are in place
4. "How much free margin?"      → Check room for new trades
```

#### Managing a Winning Position

```
1. "How's my BTC position?"     → Check current PnL
2. "Move my stop to breakeven"  → Lock in risk-free trade
3. "Close half my BTC position" → Take partial profits
4. "Move TP to $110,000"        → Let the rest ride with updated target
```

#### Risk Check

```
1. "Am I close to liquidation?"  → Check margin ratio
2. "What's my margin usage?"     → See how much is committed
3. "Show my stop-losses"         → Verify all positions have stops
4. "Which position is my biggest risk?" → Identify largest exposure
```

***

### Pro Tips

1. **Check positions daily** - Markets move 24/7, don't let positions drift without attention
2. **Verify TP/SL are in place** - After opening a position, confirm your stops are set
3. **Watch margin ratio** - If it's above 80%, you're in the danger zone
4. **Cancel orphaned orders** - When you close a position, cancel the attached TP/SL orders
5. **Track ROE, not just PnL** - A $50 profit on $100 margin (50% ROE) is better than $50 on $5,000 margin (1%)
6. **Use the morning check workflow** - Takes 30 seconds and prevents surprises

***


---

# 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/positions-and-orders.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.
