> For the complete documentation index, see [llms.txt](https://docs.txflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txflow.com/perp/trading-rules/position-and-order-limits.md).

# Position and Order Limits

### Position Limit

The **Position Limit** is the maximum position size you can hold in a given market (in base asset units, e.g., BTC or ETH).

When you submit an order, TxFlow checks:

```
|Resulting Position Size| ≤ Position Limit
```

Where: `Resulting Position Size = Current Position ± Order Size` (depending on direction)

<table><thead><tr><th width="389.9921875">Scenario</th><th width="421.25390625">Checks</th></tr></thead><tbody><tr><td>Adding to existing position (same direction)</td><td>|Resulting Position Size| ≤ Position Limit</td></tr><tr><td>Reducing or closing a position (opposite direction)</td><td>Always allowed — reduces exposure</td></tr><tr><td>Reversing a position (flipping long ↔ short)</td><td>|Resulting Position Size| ≤ Position Limit</td></tr></tbody></table>

### Order size limits

<table><thead><tr><th width="241.7734375">Parameter</th><th width="275.98046875">Description</th><th width="147.5">Example Value</th></tr></thead><tbody><tr><td>Minimum order size</td><td>Smallest quantity allowed</td><td>0.001 BTC</td></tr><tr><td>Maximum market order size</td><td>Largest single market order</td><td>50 BTC</td></tr><tr><td>Maximum limit order size</td><td>Largest single limit order</td><td>100 BTC</td></tr></tbody></table>

{% hint style="info" %}
Orders below minimum size will be rejected immediately.
{% endhint %}

### Price limits for limit orders

To prevent erroneous or manipulative orders, limit order prices are bounded relative to the Oracle Price.

### Buy (long) limit orders

<table><thead><tr><th width="117.68359375">Limit</th><th width="338.125">Formula</th><th width="306.5859375">Purpose</th></tr></thead><tbody><tr><td>Price Cap</td><td>Oracle Price × (1 + Max Deviation %)</td><td>Prevent buying far above fair value</td></tr><tr><td>Price Floor</td><td>Oracle Price × 0.2</td><td>Prevent unrealistic lowball bids</td></tr></tbody></table>

### Sell (short) limit orders

<table><thead><tr><th width="112.87890625">Limit</th><th width="333.37890625">Formula</th><th width="353.02734375">Purpose</th></tr></thead><tbody><tr><td>Price Cap</td><td>Oracle Price × 5</td><td>Prevent unrealistic high asks</td></tr><tr><td>Price Floor</td><td>Oracle Price × (1 - Max Deviation %)</td><td>Prevent selling far below fair value</td></tr></tbody></table>

### Dynamic Price Bands (Advanced)

For actively traded markets, TxFlow calculates tighter price bands based on recent premium:

```
Price Cap (Buy) = Min[Max(Oracle Price, Oracle Price * (1 + Y) + Average premium), Oracle Price * (1 + Z)]
Price Floor (Sell) = Min[Max(Oracle Price, Oracle Price * (1 - Y) + Average premium), Oracle Price * (1 + Z)]
```

Where:

* `Y` = Short-term deviation allowance (e.g., 2%)
* `Z` = Maximum deviation cap (e.g., 5%)
* `Average premium` = 2-minute moving average of `(Mid Price - Oracle Price)`

### Slippage protection for market orders

Market orders are protected by a fixed **5% slippage tolerance** (not user-configurable).

<table><thead><tr><th width="119.60546875">Order type</th><th width="321.94921875">Acceptance Condition</th><th width="271.28515625">if exceeded</th></tr></thead><tbody><tr><td>Market buy</td><td>Execution Price ≤ Oracle Price × 1.05</td><td>Partially fill valid portion; cancel the rest</td></tr><tr><td>Market sell</td><td>Execution Price ≥ Oracle Price × 0.95</td><td>Partially fill valid portion; cancel the rest</td></tr></tbody></table>

### Related Pages

<table><thead><tr><th width="233.87109375">Pages</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/RsrFttIKuKlVFyVqd25z">Margin Tiers</a></td><td>Maximum leverage by asset and position size</td></tr><tr><td><a href="/pages/ULmoXhthX9AEP6aH6ZSe">Order Types and Matching</a></td><td>Market, Limit, and advanced orders and matching mechanics</td></tr><tr><td><a href="/pages/z986rTaJ8Z98daTE3x0N">Liquidation</a></td><td>Detailed liquidation mechanics</td></tr><tr><td><a href="/pages/qHStLNd4Ek6xhOePLqG1">Trading Fees</a></td><td>Trading and funding fees</td></tr></tbody></table>
