Position & Order Limits
The ceilings an order has to clear before it reaches the book: a per-market position cap, order size bounds, price bands relative to the oracle, and price protection on market orders.
Position limit
The maximum position you can hold in a market, in base asset units (BTC, ETH, …). On submission TxFlow checks:
|resulting position size| ≤ position limitwhere resulting position size = current position ± order size, depending on direction.
| Scenario | Check |
|---|---|
| Adding to an existing position (same direction) | ` |
| Reducing or closing (opposite direction) | always allowed — it reduces exposure |
| Reversing (flipping long ↔ short) | ` |
Order size limits
| Parameter | Description | Example |
|---|---|---|
| Minimum order size | smallest quantity allowed | 0.001 BTC |
| Maximum market order size | largest single market order | 50 BTC |
| Maximum limit order size | largest single limit order | 100 BTC |
Price limits on limit orders
Limit prices are bounded relative to the oracle price, so a fat-fingered or manipulative order cannot rest far away from fair value.
Buy (long) limit orders| Limit | Formula | Purpose |
|---|---|---|
| Price cap | oracle price × (1 + max deviation %) | prevent buying far above fair value |
| Price floor | oracle price × 0.2 | prevent unrealistic lowball bids |
| Limit | Formula | Purpose |
|---|---|---|
| Price cap | oracle price × 5 | prevent unrealistic high asks |
| Price floor | oracle price × (1 − max deviation %) | prevent selling far below fair value |
Dynamic price bands
In actively traded markets TxFlow tightens the bands using recent premium:
price cap (buy) = min[ max(oracle, oracle × (1 + Y) + average premium), oracle × (1 + Z) ]
price floor (sell) = min[ max(oracle, oracle × (1 − Y) + average premium), oracle × (1 + Z) ]Y— short-term deviation allowance (e.g. 2%)Z— maximum deviation cap (e.g. 5%)average premium— 2-minute moving average ofmid price − oracle price
Price protection on market orders
A market order is bounded by two prices, and matching stops at whichever it hits first:
| Bound | Market buy | Market sell |
|---|---|---|
Protection price p (the order's own price) | stops before asks above p | stops before bids below p |
| Oracle price band (pushed by the oracle) | stops before asks above buy_max | stops before bids below sell_min |
- Matching walks the book until the next level is beyond
por the band; the unfilled remainder is cancelled, not queued. This is why a large market order in a thin book can come back partially filled. - There is no separate fixed ±5% check —
pand the oracle band are the only price bounds. - If
pis set wide and the book is thin, a market order can fill far from the oracle price, as far as the band edge allows.
Related
| Page | Covers |
|---|---|
| Margin & Leverage | maximum leverage by asset and position size |
| Orders & Time-in-Force | order types and matching mechanics |
| Liquidation | liquidation mechanics |
| Fees & Discounts | trading and funding fees |