> For the complete documentation index, see [llms.txt](https://nobots.gitbook.io/nobots-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nobots.gitbook.io/nobots-gitbook/trading/positions-and-order-types.md).

# 📊 Positions & Order Types

This page covers how pricing works on NoBots, how to open and manage positions, the available order types, and swaps.

#### 💸 Pricing on NoBots

NoBots uses oracle-based pricing rather than an orderbook model. Understanding this is important for limit orders, stop-loss orders, and other conditional order types.

**Oracle prices:** $$minPrice$$ **and** $$maxPrice$$

NoBots receives pricing sourced from aggregated exchange data as a spread with two values derived from the bid and ask in each data stream report:

* 📉 $$minPrice$$: The lower bound of the price spread (bid).
* 📈 $$maxPrice$$: The upper bound of the price spread (ask).

Both the `minPrice` and `maxPrice` are utilized to protect liquidity providers and the protocol's liquidity pool from temporary market manipulation or extreme volatility spikes. This approach is known as the Pessimistic Price Model.

The oracle price used for both triggering and execution depends on the operation:

| **Operation**             | **Oracle Price Used** | **Reasoning**                                         |
| ------------------------- | --------------------- | ----------------------------------------------------- |
| Long open                 | $$maxPrice$$          | You pay the higher price to enter a long              |
| Long close / liquidation  | $$minPrice$$          | You receive the lower price when exiting a long       |
| Short open                | $$minPrice$$          | You sell at the lower price to enter a short          |
| Short close / liquidation | $$maxPrice$$          | You buy back at the higher price when exiting a short |

🎯 **Entry price**

Your entry price is the oracle price used for your order — $$maxPrice$$ for longs, $$minPrice$$ for shorts. No price impact is applied at entry; it is stored and applied when you close. Because the entry price is the market price from pricing sourced from aggregated exchange data.

📍 **Mark price**

The mark price is the midpoint of the oracle spread: ⚖️

(minPrice + maxPrice) / 2

The mark price is used for:

* Display in the interface and charts.
* Funding rate calculations.
* Price impact calculations (deposits, swaps, position sizing).
* It is not used for order triggering or execution.

🧮 **Trigger price evaluation**

This is a key difference from orderbook exchanges. On NoBots, there is no orderbook — trigger prices are evaluated against $$minPrice$$ or $$maxPrice$$ depending on the order direction, which is the same price used for execution.

> Example: You set a Stop-Loss at $$ $3,900 $$ for your ETH long. The order triggers when $$minPrice$$ reaches $$ $3,900 $$ (not when the mark price reaches $$ $3,900 $$). Since closing a long uses $$minPrice$$, the trigger and execution price are the same oracle price.

#### 📊 Charts

The current price displayed on the chart is the mark price: $$\frac{minPrice + maxPrice}{2}$$.

Candlestick charts use:

* Open: previous candle's close.
* Close: average price ($$minPrice + maxPrice) / 2$$.
* High: highest $$maxPrice$$ reported by oracles.
* Low: lowest $$minPrice$$ reported by oracles.

This means a candle may show your trigger price being reached, but your order may not trigger if the specific side ($$min$$ or $$max$$) required hasn't hit the mark.

#### 🟢 Opening a position

On the Market page, select "Long" or "Short," choose an order type (Market, Limit, or Stop), and configure your position using the fields described below.

💰 **Pool and collateral**

Select the market you want to trade from the market selector. You can configure:

* Market: Choose based on your preferred collateral, net rates, and price impact.
* Collateral: Choose which token your position's collateral is stored as (e.g., WETH or USDC).

📈 **Margin, size, and leverage**

* Margin: The amount you deposit.
* Size: The total position size (USD).
* Leverage: Adjusted via the slider or manual input.

💸 **Collateral choice affects your exposure:**

* **Long WETH with WETH collateral:** You gain exposure from both the long position and the collateral itself. For example, a 0.1 WETH long with 1 WETH as collateral gives 1.1 WETH total exposure.
* **Long WETH with USDC collateral:** Exposure comes only from the long position. Useful if switching frequently between longing and shorting.
* **Short WETH with WETH collateral:** Useful for delta neutral strategies to earn funding fees. For example, a 1 WETH short with 1 WETH as collateral.
* **Short WETH with USDC collateral:** Useful if switching frequently between longing and shorting.

❓ **Are NoBots perps linear or inverse?**

NoBots uses linear PnL math rather than inverse perp math. NoBots calculates profit and loss from your token exposure. Price-move PnL equals:

PnL = size in tokens × price move

In practice, NoBots is a multi-collateral perpetual market with linear, USD-based PnL.

#### 🎯 Take-Profit / Stop-Loss <a href="#take-profit--stop-loss" id="take-profit--stop-loss"></a>

You can set basic TP/SL orders directly in the trade box before opening a position. Toggle the Auto Close section to configure a trigger price and view estimated PnL for each. These orders fully close your position when triggered. For more advanced TP/SL configurations (partial closes, multiple entries), use the positions list after opening the position.

#### ⚙️ Execution details <a href="#execution-details" id="execution-details"></a>

Before submitting, expand the "Execution details" section at the bottom of the trade box to review: liquidation price, fees, network fee, collateral spread, allowed slippage, stored price impact, leverage, size, and collateral. Adjust the allowed slippage in this section if needed.

#### 🛡️ Max leverage

The maximum allowed leverage on NoBots is fixed for each market. This fixed cap ensures predictable risk parameters for traders regardless of current market liquidity levels.

The interface will display a warning if a requested action would exceed the maximum allowed leverage. If the maximum leverage limit is reached or exceeded, the transaction causing the leverage to increase further will be completely blocked and will not proceed.

Because of this strict limit, if your position has already reached maximum leverage and you wish to withdraw collateral, you must close the position fully. You can no longer withdraw partial collateral while keeping the position open, as doing so would push the leverage beyond the maximum allowed threshold.

#### 🛠️ Managing positions

After opening a trade, you can view it under your positions list on market page. Each position row displays the market and side, size, net value, collateral, entry price, mark price, liquidation price, and any active TP/SL orders.

You can also interact directly from the position row:

* Click the edit button next to the collateral value to deposit or withdraw collateral, adjusting your leverage and liquidation price.
* Click the edit button next to the leverage value to adjust your leverage.
* Click on Set TP/SL — create, edit, or cancel Take-Profit and Stop-Loss orders. You can set multiple TP/SL orders per position with different trigger prices and sizes.
* Use the "Close" button in the Actions column to close the position (see *Closing a position*).

#### 🛑 Closing a position

Close a position partially or completely by clicking the "Close" button in the position row. This opens a dialog where you configure the close size, and execution details. Closing realizes pending profits or losses proportional to the percentage of the position that is closed.

💰 Close size

Enter the USD amount to close, or quick-select buttons (10%, 25%, 50%, 75%) to set a partial or full close.

💵 Market close

* Market — closes immediately at the current oracle price.

⚖️ Keep leverage

When partially closing with a Market order, the "Keep leverage" toggle maintains your current leverage ratio by proportionally reducing collateral alongside the size. This is enabled by default and disabled for full closes.

If a partial close would leave the position with collateral below the protocol minimum, the close is blocked. This can happen more easily when "Keep leverage" is enabled, since reducing size also withdraws collateral proportionally.

⚙️ Execution details

Before confirming, expand the "Execution details" section to review trade fees, network fee, allowed slippage, leverage, size, and collateral transitions.&#x20;

#### 📊 PnL

The PnL from price movement is calculated based on your collateral and the leverage applied. Your percentage return relative to your collateral is effectively the asset's price movement multiplied by your leverage. For example, if you open a long position using 10 USD in collateral at 10x leverage, and the asset's price increases by 2%, your profit is 2 USD—representing a 20% profit on your initial collateral. This calculation excludes changes in your collateral's underlying value; if your collateral is a non-stablecoin asset, its own price movement will also affect your net value.

#### 🔄 Swaps

NoBots supports perpetual trading and swaps. To swap, click the "Swap" tab on the Trade page.

* Market Swap — executes immediately at the current oracle price, subject to your allowed slippage setting.

⚙️ Swap configuration

The swap form has two main fields:

* Sell — the token and amount you are swapping from. You can fill your available balance from this field.
* Buy — the token and amount you receive.

Use the swap button between the fields to reverse the token pair.

Currently , On NoBots Swaps can only be performed between the specific Long token and Short token of a market—and only if that market is unlocked and actively open for trading

⚡ Routing

Swaps are routed through Market pools. The available tokens for swapping are the collateral tokens across all active Market pools on the connected network. This includes long tokens (for example, WETH, WBTC) and short tokens (for example, USDC).

⚙️ Execution details

Before confirming, expand the "Execution details" section to review:

* Price impact / fees — the net price impact percentage and total fee percentage. Positive price impact means you receive more tokens than expected.
* Network fee — the estimated blockchain execution fee. Overestimated amounts are refunded after execution.

> Note: On most DEX aggregators and AMMs, "slippage" covers everything that can reduce your output — including the price impact of your trade on liquidity pools. On NoBots, slippage and price impact are separate: the expected output already factors in price impact and fees, and slippage only covers oracle price movement during execution.

#### 🛑 Limit orders

Limit orders let you specify a price at which to open or increase a position. Create a limit order by selecting "Limit" in the trade box.

Perp limit orders

Limit orders on NoBots work differently from orderbook exchanges. There is no orderbook — when the oracle price reaches your trigger price, a keeper picks up and executes the order at that oracle price.

🎯 **Trigger Conditions**

The oracle price checked against your limit price depends on the direction of your position:

* Long: The order triggers when `maxPrice <= limit price`. The `maxPrice` oracle value is also used for execution.
* Short: The order triggers when `minPrice >= limit price`. The `minPrice` oracle value is also used for execution.

> ⚠️ Warning: Unlike resting limit orders on a centralized exchange, NoBots orders don't fill passively as price moves through them. They're executed by keepers against oracle prices — there is no queue priority or passive fill. Fast market moves can cause the oracle price to skip past your trigger price entirely. On NoBots, use a Market Increase instead and set an acceptable slippage under the execution details if you want an immediate fill with a price cap.

🛠️ Managing limit orders

After creating a limit order, it appears under the "Orders" tab. You can edit the order to adjust the trigger price or limit price.

#### 🛑 Stop Market orders

A Stop Market order opens or increases a position when the oracle price reaches your specified stop price. Stop Market orders are available for long and short positions only.

🎯 Trigger conditions

The oracle price checked against your stop price depends on the direction of your position:

* Long: The order triggers when `maxPrice >= stop price`. The `maxPrice` oracle value is also used for execution.
* Short: The order triggers when `minPrice <= stop price`. The `minPrice` oracle value is also used for execution.

🏷️ Execution price

When the oracle price reaches your stop price, the order executes at the closest oracle price update to the trigger price — not necessarily at the exact stop price you set.

⚖️ Acceptable price

Stop Market orders do not have a user-configurable acceptable price. The acceptable price is set automatically to the maximum possible value for longs and the minimum for shorts.

🛠️ Managing Stop Market orders

After creation, a Stop Market order appears under the "Orders" tab. You can edit the order to adjust the stop price. Stop Market orders cannot be partially filled.

> Note: Stop Market orders are not guaranteed to execute. Execution may fail if the oracle price does not reach your stop price, if there is insufficient liquidity, or if the max allowed leverage would be exceeded.

#### 🎯 Take-Profit and Stop-Loss orders

Take-Profit and Stop-Loss (TP/SL) orders automatically close part or all of a position when the oracle price reaches a specified level.

* 🟢 Take-Profit closes at a favorable price to lock in gains.
* 🔴 Stop-Loss closes at an unfavorable price to limit losses.

You can create TP/SL orders in three ways:

1. Select "Set TP/SL" in the positions list.
2. Use the Auto-Close section section in the trade box before opening a position.

Trigger price evaluation

| **Order**   | **Side** | **Triggers when**           |
| ----------- | -------- | --------------------------- |
| Take-Profit | Long     | `minPrice >= trigger price` |
| Take-Profit | Short    | `maxPrice <= trigger price` |
| Stop-Loss   | Long     | `minPrice <= trigger price` |
| Stop-Loss   | Short    | `maxPrice >= trigger price` |

The same oracle price component used to trigger the order is also used as the base execution price, before any price impact adjustment is applied.

❌ Auto-cancel TP/SL

When a position is fully closed, any remaining TP/SL orders on that position are automatically cancelled. This prevents orphaned orders from persisting. Auto-cancel applies only to Take-Profit and Stop-Loss order types (Limit Increase and Stop Market orders are not auto-cancelled).

The current per-network limit for auto-cancel TP/SL orders per position is:

| **Network** | **Max auto-cancel TP/SL orders** |
| ----------- | -------------------------------- |
| World Chain | 10                               |

#### Order execution guarantees

> ⚠️ Warning: Limit, Stop Market, and TP/SL orders are not guaranteed to execute.

This can occur in situations including but not limited to:

* The oracle price did not reach the specified trigger price.
* There may not be sufficient liquidity to execute the order.
* The max allowed leverage would be exceeded.
* If your position becomes liquidatable, keepers attempt to execute associated Stop-Loss orders first, but this is not guaranteed to succeed.


---

# 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://nobots.gitbook.io/nobots-gitbook/trading/positions-and-order-types.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.
