The order book is the central display of market state. It shows all resting limit orders — what prices buyers and sellers are willing to trade at, and how much quantity is available at each price level.Documentation Index
Fetch the complete documentation index at: https://docs.vela.monolithsystematic.com/llms.txt
Use this file to discover all available pages before exploring further.
Book Structure
Vela’s order book is a standard CLOB (Central Limit Order Book):Asks (Top Half)
Asks are sell orders — traders willing to sell the base asset. They are sorted ascending by price: the best ask (lowest price a seller will accept) is closest to the spread. When you place a market buy, you match against asks starting from the best ask and walking up.Bids (Bottom Half)
Bids are buy orders — traders willing to buy the base asset. They are sorted descending by price: the best bid (highest price a buyer will pay) is closest to the spread. When you place a market sell, you match against bids starting from the best bid and walking down.Spread
The spread is the gap between the best ask and best bid:- Spread: 2.00 USDC
- Mid price: 3201.00
- Spread in bps: (2.00 / 3201.00) × 10,000 ≈ 6.2 bps
Depth Bars
Each price level in the order book displays a depth bar — a horizontal bar whose width is proportional to the quantity available at that level relative to the largest level visible on screen. Depth bars give an immediate visual sense of where concentration of orders is.Depth bars are relative to the current visible range, not the entire book. Scrolling the book changes the scale. The depth chart (below) gives a more accurate picture of cumulative depth.
Best Bid and Ask
The best bid and best ask are the most competitive prices in the book:| Term | Definition |
|---|---|
| Best Bid | The highest price any buyer is currently offering |
| Best Ask | The lowest price any seller is currently accepting |
| Mid Price | (Best Bid + Best Ask) / 2 |
| Mark Price | Used for reference; may incorporate off-chain price feeds |
Depth Chart
The depth chart is a cumulative view of available liquidity across the full book. It shows how much volume is available within a certain price distance from the current mid price.- The X-axis shows price. The midpoint is the current mid price.
- The Y-axis shows cumulative ETH available from the mid price out to that price level.
- Steep slope = thin book, large slippage for market orders
- Flat slope = deep book, low slippage
Analytics Panel
The Vela UI includes an analytics panel alongside the order book with several advanced metrics:| Metric | Description |
|---|---|
| OFI (Order Flow Imbalance) | Measures buying vs. selling pressure from recent order flow |
| Spread Decomposition | Breaks spread into adverse selection and inventory components |
| VWAS (Volume-Weighted Average Spread) | Average spread weighted by trade volume over a rolling window |
| Trade Intensity | Trades per second, updated every 5 seconds |
WebSocket Updates
The order book updates in real time via WebSocket. Subscribe to thebook:<market> channel to receive incremental updates:
"0" should be removed from your local book. The sequence field monotonically increases; gaps indicate missed messages, which should trigger a full snapshot re-fetch.
See WebSocket Protocol for full subscription details.