How the Orderbook Works
The orderbook is a live list of open orders, split into two sides:- Bids (LONG): Buyers posting “I will pay up to this price.” The highest bid is the best one. It is closest to getting filled.
- Asks (SHORT): Sellers posting “I will accept this price or higher.” The lowest ask is the best one. It is closest to getting filled.
| Bids (LONG) | Price | Asks (SHORT) |
|---|---|---|
| 65% | 500 USDC | |
| 64% | 1,200 USDC | |
| 800 USDC | 63% | |
| 2,000 USDC | 62% | |
| 1,500 USDC | 61% |
- Want to go LONG right now? You match the best ask and pay 64%.
- Want to go SHORT right now? You match the best bid and receive 63%.
Order Types
Ascend supports standard order types:- Limit Orders
- Market Orders
You specify a price and size. Your order rests on the book until:
- It gets matched with an incoming order
- You cancel it
- It expires (if you set a time limit)
Matching Logic
The matching engine follows price-time priority:- Best price first: Orders at better prices get filled before orders at worse prices
- Earlier orders first: At the same price, older orders have priority
| Trader | Time | Size |
|---|---|---|
| Alice | 10:00:01 | 500 USDC |
| Bob | 10:00:05 | 300 USDC |
| Carol | 10:00:10 | 400 USDC |
- Alice gets filled: 500 USDC (she was first)
- Bob gets filled: 100 USDC (partial fill, he was second)
- Carol gets nothing yet (Bob’s remaining 200 USDC fills before her)
Partial Fills
Orders can be partially filled when available liquidity is insufficient. Example: You place a market order to LONG 1,000 USDC. The orderbook looks like:| Price | Ask Size |
|---|---|
| 64% | 400 USDC |
| 65% | 300 USDC |
| 66% | 500 USDC |
- 400 USDC at 64%
- 300 USDC at 65%
- 300 USDC at 66%
Spread and Liquidity
The spread is the gap between the best bid and best ask.| Spread | Meaning |
|---|---|
| Tight (0.1-0.5%) | High liquidity, active market, low trading cost |
| Medium (0.5-2%) | Normal liquidity, moderate trading cost |
| Wide (2%+) | Low liquidity, higher trading cost, use limit orders |
- Best bid: 62%
- Best ask: 64%
- Spread: 2%
Order Validation
Every order is validated before being accepted:Margin check
Margin check
You must have sufficient margin to cover the position if the order fills. Orders that would exceed your available margin are rejected.
Leverage check
Leverage check
The resulting position must stay within the market’s maximum leverage. Orders that would create excessive leverage are rejected.
Price bounds
Price bounds
Orders at extreme prices (far from current market) may be rejected or flagged. This prevents fat-finger errors and manipulation.
Size limits
Size limits
Orders must meet minimum size requirements and cannot exceed maximum position limits.
Matching vs Risk Management
The matching engine and risk engine are separate:| System | Responsibility |
|---|---|
| Matching Engine | Pairs compatible orders, executes trades |
| Risk Engine | Enforces margin, leverage, liquidation rules |
Why CLOB for Prediction Markets
The orderbook model provides:- Transparent pricing: All bids and offers are visible
- Fair execution: Price-time priority treats everyone equally
- No slippage from curves: You trade at discrete prices, not along a bonding curve
- Real depth: You can see exactly how much liquidity exists at each price level
- Professional compatibility: Market makers and algorithmic traders can participate using familiar infrastructure
Continuous Price Discovery
Prices on Ascend update continuously as orders are placed, matched, and canceled. Every trade prints a new price. Every new limit order changes the orderbook state. The “current price” is always the midpoint between best bid and best ask, or the last traded price. This continuous process is how probability prices evolve in real time as traders express their views.Next: Settlement & Resolution
Learn how markets resolve and positions settle