20 min read • June 8, 2025
In modern electronic trading, understanding the full picture of market activity requires more than just price and volume. To uncover the actual intentions behind price movement, developers and traders turn to Level 2 market data—also known as market depth. Unlike basic tickers or Level 1 feeds, Level 2 data provides a live view into the order book, revealing liquidity, order flow, and market sentiment in real time.
For developers building trading bots, market-making engines, or institutional trading tools, Level 2 APIs offer granular insight into how markets behave beneath the surface. Yet, despite its value, Level 2 data remains widely misunderstood or underutilized—often due to integration complexity or lack of clean documentation.
This guide aims to demystify Level 2 data, explain how it works, and show you how to integrate real-time market depth APIs—using Finage’s developer-first infrastructure as a case study.
- What Is Level 2 Data? Understanding Market Depth
- Why Market Makers and Traders Depend on Level 2 Feeds
- Level 1 vs Level 2: What Developers Need to Know
- Anatomy of a Level 2 API: Key Fields and Structure
- Streaming vs Snapshot Models for Depth Data
- Order Book Visualization and Real-Time Processing
- Using Finage WebSocket API for Level 2 Market Depth
- Building Use Cases: From Market Making to Execution Algorithms
- Latency, Updates & Infrastructure Considerations
- Final Thoughts: Using Finage to Unlock Market Microstructure Insight
Level 2 data—also referred to as market depth—offers a detailed, real-time view of the order book for a particular asset or trading pair. While Level 1 data only shows the best bid and ask (the highest buy and lowest sell price), Level 2 reveals the full queue of limit orders waiting to be filled at various price levels.
This granular view allows developers and traders to analyze the supply and demand dynamics behind price movements—not just the end result.
At its core, an order book is a live list of all buy and sell orders on an exchange. It’s typically organized into:
- Bids: Buy orders, listed from highest to lowest price
- Asks: Sell orders, listed from lowest to highest price
Each price level includes the total size (volume) of orders and, in some feeds, individual order counts or IDs.
- Multiple price levels beyond the best bid/ask (e.g., top 10 or 50)
- Volume at each level (aggregate or per order)
- Time updates as new orders enter or leave the book
- In some cases, order-specific detail (Level 3)
This data enables you to see not only where the market is priced now, but also how much buy and sell pressure exists above and below the current price.
Level 2 data empowers systems to:
- Detect liquidity gaps and large walls
- Anticipate price resistance/support zones
- Monitor order flow imbalances
- Implement execution strategies that reduce slippage
For high-frequency traders, market makers, and algo systems, these signals are vital. But even for developers building dashboards or analytics tools, Level 2 provides insight into market structure that Level 1 data simply can’t offer.
- Trading bots: Trigger entries/exits based on order book shifts
- Execution algorithms: Break large orders to avoid moving the market
- Dashboards: Visualize live liquidity for users
- Research tools: Analyze behavior of institutional or high-volume traders
Understanding Level 2 data is a first step toward building smarter, structure-aware trading applications.
For sophisticated participants like market makers, institutional traders, and high-frequency trading (HFT) systems, Level 2 data is not just a feature—it’s the foundation of how they interact with the market. Unlike casual investors who make decisions based on price charts or headlines, these players rely on real-time order book intelligence to manage risk, maintain liquidity, and execute trades with precision.
Let’s explore the roles Level 2 data plays in their workflows—and why it’s mission-critical for automated systems and trading infrastructure.
Market makers quote both buy and sell prices to provide liquidity. Their profitability depends on tight spreads and predictable execution. Level 2 data helps them:
- Monitor order book depth to adjust quotes based on available liquidity
- Detect large opposing orders that may signal upcoming price swings
- Avoid adverse selection by stepping out of the way when aggressive orders enter
- Place hidden orders strategically behind large visible ones to reduce detection
Without Level 2 data, a market maker operates blindly—unable to adapt to shifting supply and demand dynamics in real time.
Arbitrage strategies involve exploiting price differences across exchanges or trading pairs. Level 2 feeds provide:
- Real-time spreads across multiple venues
- Visibility into where liquidity is shallow (making arbitrage more viable)
- The ability to pre-confirm volume availability before executing paired trades
For example, if BTC/USDT shows a thinner ask side on Exchange A and deeper bids on Exchange B, an arbitrage engine can use this insight to initiate simultaneous buy/sell orders with confidence.
Executing large trades without affecting price is a delicate process. Smart execution algorithms use Level 2 feeds to:
- Slice large orders across time and price levels
- Avoid “eating through” the book when liquidity is thin
- Predict short-term movement from order flow changes
- Route orders to minimize market impact
This is especially important in illiquid pairs or during high-volatility periods, where every visible order can alter the decision matrix.
Some trading bots are built entirely around order book dynamics rather than traditional technical indicators. These systems:
- Monitor bid/ask pressure ratios
- Detect order book spoofing or unusual quote behavior
- React to quote stacking or sudden volume surges at a price level
Without Level 2 data, these bots cannot function effectively—and may misfire based on incomplete information.
For institutional desks, compliance teams, and quant researchers, Level 2 data supports:
- Live P&L and exposure management
- Custom trade execution simulations
- Backtesting with order book-aware models
- Real-time alerts for liquidity changes in portfolio assets
These applications depend on continuous access to granular, trustworthy depth data—something Finage’s real-time API is specifically designed to deliver.
Level 2 data gives traders and systems control over execution, insight into market mechanics, and a tactical edge in fast, fragmented environments. Without it, any decision is a guess, and any execution is a risk.
For developers working in trading, analytics, or fintech infrastructure, understanding the differences between Level 1 and Level 2 data is essential. These aren’t just different views of the same data—they represent fundamentally different tiers of insight and complexity.
This section provides a practical comparison between Level 1 and Level 2 feeds so you can make the right architectural and product decisions based on your use case.
Level 1 market data is the simplest form of real-time pricing. It typically includes:
- Best Bid: The highest price a buyer is willing to pay
- Best Ask: The lowest price a seller is willing to accept
- Last Trade Price: The most recent trade execution
- Volume (optional): Total traded volume over a time period
Example:
json
{
"symbol": "ETHUSD",
"bid": 3890.50,
"ask": 3891.00,
"last": 3890.75,
"timestamp": 1717520922000
}
Level 1 is great for:
- Price charts and basic dashboards
- Retail brokerage apps
- Simple bots with no market impact concerns
- Basic alerts (e.g., price crosses $X)
Level 2 includes everything in Level 1 plus the full visible order book, i.e., multiple bid and ask levels.
Example (simplified):
json
{
"symbol": "ETHUSD",
"bids": [
{"price": 3890.00, "volume": 1.5},
{"price": 3889.50, "volume": 2.0}
],
"asks": [
{"price": 3891.00, "volume": 0.9},
{"price": 3891.50, "volume": 1.2}
],
"timestamp": 1717520924000
}
Level 2 is essential for:
- Market makers
- Execution optimization
- Liquidity-sensitive bots
- Traders using depth-based signals
- You’re building a lightweight app or chart
- You need simple quote updates
- Your system isn't executing real trades or orders
- You're building execution logic, bots, or signal models
- You care about market structure, order flow, or liquidity
- You want to compete in fast, algorithm-driven environments
Using Finage, you can start with Level 1 via REST for rapid prototyping, and then upgrade to Level 2 WebSocket feeds for full-featured trading logic—all with consistent symbol mapping and documentation.
Before integrating a Level 2 market data API into your application, it's important to understand the structure of the data being delivered. Unlike Level 1, which offers a single snapshot of best bid/ask, Level 2 APIs stream multiple price levels and associated volumes—in real time.
This section breaks down the core fields you’ll find in a Level 2 API response and how to handle them effectively in your application.
A robust Level 2 API—such as Finage’s WebSocket feed—provides bid and ask arrays that represent market depth. Each entry in these arrays contains:
- price: The price level of a bid or ask
- volume: The cumulative size of orders at that level
- side: Either bid or ask (sometimes implied by array structure)
- timestamp: Millisecond-accurate time of the update
json
{
"symbol": "BTCUSD",
"bids": [
{ "price": 68910.0, "volume": 1.8 },
{ "price": 68900.0, "volume": 3.2 }
],
"asks": [
{ "price": 68920.0, "volume": 1.0 },
{ "price": 68930.0, "volume": 2.4 }
],
"timestamp": 1717520945000
}
Field |
Type |
Description |
symbol |
string |
Trading pair or asset (e.g., BTCUSD) |
bids |
array |
List of current buy orders sorted from highest to lowest price |
asks |
array |
List of current sell orders sorted from lowest to highest price |
price |
float |
Specific price level in the order book |
volume |
float |
Total volume (e.g., BTC, ETH) at that price level |
timestamp |
integer |
Epoch timestamp in milliseconds when the update was recorded |
There are two common types of Level 2 update strategies:
- Full order book is sent at once (useful for initialization or slow-refresh dashboards)
- More bandwidth-heavy
- Easier to parse for simple applications
Delta (Incremental) Model
- Only changed price levels are sent (i.e., new, modified, or removed orders)
- Requires client-side order book reconstruction
- Used in high-frequency, low-latency systems
- Efficient and performant for trading bots
Finage WebSocket feeds deliver updates as real-time snapshots or deltas, depending on endpoint configuration.
- Always match updates by timestamp – Never rely on system time to sequence events
- Trim order book depth if you don’t need full depth (e.g., use top 10 levels)
- Use sorted arrays for bid (descending) and ask (ascending) for easy display
- Debounce updates in front-end apps to avoid unnecessary renders
- Log historical snapshots for backtesting and debugging
A well-structured Level 2 feed enables you to:
- Build real-time liquidity visualizations
- Construct price-impact-aware trading algorithms
- Implement depth-based alerts and signal engines
- Ensure data consistency across feeds and systems
Finage’s Level 2 APIs follow a clean, developer-friendly schema that simplifies real-time parsing and integration into event-driven platforms.
When working with Level 2 APIs, one of the most important architectural decisions is how to consume order book data: via snapshots or streaming updates. Each model offers advantages depending on the use case, and understanding the trade-offs is essential for designing stable, responsive trading or analytics systems.
This section explains both approaches and helps you determine which is right for your application.
A snapshot is a full view of the order book at a given moment. It provides:
- A complete list of all visible bid and ask levels
- Useful for initial loading, visualizations, and low-frequency updates
- Often accessed via REST endpoints or low-frequency WebSocket feeds
A retail trading dashboard wants to refresh the order book every 2 seconds for a user viewing a BTC/USD chart.
- Simple to implement
- No need for state management or complex merging logic
- Great for periodic visual updates or manual monitoring tools
- Can become outdated quickly in high-volume markets
- Bandwidth-intensive if polled too frequently
- Not suitable for execution logic or algorithmic trading
A streaming feed uses a WebSocket connection to push real-time updates whenever there are changes in the order book.
You receive:
- Incremental updates (delta model) or full refreshes at intervals
- Events such as new orders, order modifications, or cancellations
- Often combined with trade tick feeds for complete market microstructure view
An HFT bot adjusts its quoting strategy based on microsecond-level changes in liquidity depth and order flow.
- High-speed and low-latency
- Ideal for trading automation and market-making logic
- Efficient bandwidth usage via deltas
- Enables event-driven architecture
- Requires order book state management (tracking updates over time)
- More complex to implement (reconnect logic, order reconciliation)
- Needs solid handling of message ordering and missing data
Finage provides:
- REST endpoints for Level 2 snapshots, ideal for visualization and periodic polling
- WebSocket feeds for real-time order book streaming, including:
- Symbol subscriptions
- Tick-by-tick updates
- Normalized, exchange-synced depth messages
This flexibility allows you to start simple with snapshots, then scale up to streaming as your system matures or your use case demands tighter integration.
Once you’ve integrated Level 2 data into your system, the next challenge is turning raw depth feeds into something useful—whether that’s a trading signal, an execution decision, or a real-time visual display. In this section, we’ll cover how developers can transform order book data into actionable, interpretable outputs.
Even for systems that rely entirely on automation, visualizing the order book has benefits:
-Debugging trading logic
- Providing transparency in institutional dashboards
- Educating users on liquidity conditions
- Spotting market manipulation (e.g. spoofing, layering)
For trading platforms and retail apps, it also serves as a powerful user engagement tool, showing depth beyond basic price charts.
- Plots cumulative volume on both bid and ask sides
- X-axis = price; Y-axis = total size at that price or better
- Reveals large buy/sell walls, spread gaps, and skew
Example use:
- A trader sees a “wall” at $2,000 ETH and anticipates resistance.
- Color-coded display of depth across price levels over time
- Brighter colors indicate larger liquidity
- Can help identify hidden support/resistance zones or sudden volume shifts
Example use:
- A bot flags sudden liquidity disappearance at three adjacent ask levels—signaling a potential breakout.
- Tabular format with price levels in the center, bid sizes to the left, and ask sizes to the right
- Continuously updates as new depth information arrives
- Ideal for high-frequency or terminal-style interfaces
With Finage WebSocket Level 2 data, you can:
- Subscribe to one or more symbols using the WebSocket client
- Receive continuous updates with bid/ask levels and volumes
- Parse and structure the data into a usable format (arrays or maps)
- Feed it into your frontend visual framework (e.g. D3.js, Chart.js, TradingView libraries)
json
{
"symbol": "BTCUSD",
"bids": [
{ "price": 68850.0, "volume": 1.2 },
{ "price": 68840.0, "volume": 1.6 }
],
"asks": [
{ "price": 68860.0, "volume": 0.9 },
{ "price": 68870.0, "volume": 2.1 }
],
"timestamp": 1717520968000
}
This can be transformed into a real-time plot by:
- Merging into a live data structure
- Sorting by price (descending for bids, ascending for asks)
- Rendering a new frame at regular intervals (e.g., every 100ms)
Visualization is one side—decision-making is the other.
Bots consuming Level 2 data should:
- Maintain a rolling order book state in memory
- Track changes (e.g., increases or cancellations at key levels)
- Calculate metrics like:
- Order book imbalance (total bid vs total ask volume)
- Spread width
- Liquidity concentration near the mid-price
- Velocity of order entry/removal
These metrics can be used to:
- Trigger signals
- Adjust limit orders dynamically
- Cancel/reposition trades based on changing risk
text
[Finage WebSocket Feed]
↓
[Order Book Processor] ←→ [State Store]
↓
[Signal Engine] → [Bot Execution Logic]
↓
[Trade Logs & Monitoring]
Separating concerns (processing vs acting vs logging) allows for scalability, modularity, and fault tolerance.
Integrating real-time Level 2 data into your trading or analytics platform is straightforward with the Finage WebSocket API. Designed for developers, it delivers efficient, low-latency access to live order book data across multiple symbols, supporting both snapshots and delta updates.
In this section, you'll learn how to set up, subscribe, and consume Level 2 data from Finage with minimal friction.
Finage provides a dedicated WebSocket endpoint for real-time crypto depth data:
const socket = new WebSocket('wss://{ subdomain }.finage.ws: { port }/?token={ token }');
This establishes a persistent connection with the server, enabling continuous updates with no polling required.
After subscribing, your socket sends messages like:
After Connection:
1ST MESSAGE
{
"status_code": 200,
"message": "authorizing",
"id": "e0fb1b68-1905-48e3-9fd2-d482bf5e1f0a"
}
2ND MESSAGE
{
"status_code": 200,
"message": "connected to the adapter",
"id": "e0fb1b68-1905-48e3-9fd2-d482bf5e1f0a"
}
How to Subscribe
This method is used to subscribe to real-time price updates for the specified symbols.
{
"action": "subscribe",
"symbols": "DOGEUSD"
}
Example Response:
{
"s": "DOGEUSD",
"p": "0.09649316",
"q": "22434.12483106",
"dc": "1.4147",
"dd": "0.0014",
"t": 1680704192819
}
These updates reflect real-time changes to the order book and can be used to update your internal state or front-end visuals.
Finage may send full snapshots or delta-style updates, depending on your configuration. For production trading applications, implement:
- Order book merging logic
- Depth tracking for top N levels
- Update throttling (e.g., limit renders to 10–20 FPS for UI)
- Timestamp verification to prevent update misordering
WebSocket best practices with Finage:
- Use onclose and onerror events to trigger automatic reconnection
- Always re-send subscriptions after reconnecting
- Monitor feed latency with timestamps
- Optionally fall back to REST snapshot on disconnect
Example:
socket.onclose = () => {
setTimeout(() => {
connectToSocket(); // Custom reconnect logic
}, 3000);
};
Finage enforces rate limits and subscription quotas per API key. To avoid issues:
- Monitor usage in the Finage Dashboard
- Avoid subscribing to too many symbols at once (batch in chunks if needed)
- Keep connections alive only when actively processing data
- Developer-first documentation and structure
- Clean, normalized order book schema
- Support for major and minor crypto pairs
- Reliable infrastructure and high-frequency performance
Finage simplifies Level 2 integration, giving you a reliable pipeline for powering bots, dashboards, and institutional tools with true market depth.
Level 2 data isn't just a technical luxury—it's the foundation for a wide range of real-world trading strategies and platforms. Whether you're automating a market-making engine, designing execution logic for large trades, or building a real-time liquidity dashboard, Finage’s Level 2 API enables you to power complex systems with precision and confidence.
In this section, we walk through practical, high-impact use cases that benefit directly from order book depth data.
Market Making Bots
Market makers provide constant bid and ask quotes, profiting from the spread while minimizing inventory risk. They rely on Level 2 data to:
- Assess liquidity concentration near the mid-price
- Monitor order book imbalance to dynamically shift quotes
- Detect aggressive order flow and step out when needed
- Adjust quote sizes and position deltas based on volume depth
if (topAskVolume > topBidVolume * 1.5) {
shiftBidDown();
widenSpread();
}
When executing large trades, it’s essential to minimize slippage and avoid “eating through the book.” Level 2 data helps:
- Slice orders based on available depth
- Monitor impact per execution
- Identify low-liquidity zones to avoid
- Use VWAP/TWAP logic that reacts to real-time depth
A system wants to buy $100k worth of ETH. Rather than submitting a market order, it uses Level 2 to break the trade into five slices, each optimized for minimal impact.
Finage's depth feeds are ideal for powering user-facing visualizations that show:
- Top N levels of bid/ask liquidity
- Buy/sell wall detection
- Spread width and microstructure flow
- Live market sentiment (bid vs ask dominance)
These dashboards serve both professional and retail audiences looking for deeper transparency than standard charts provide.
Some strategies use order book behavior as a predictive signal rather than just a response input. For example:
- A sudden collapse in ask-side liquidity might suggest a pending breakout
- A large spoofing order that vanishes can signal manipulation
- Consistent pressure near a key bid level might suggest accumulation
These bots analyze Level 2 deltas and velocity to front-run moves before they appear on the price chart.
For fund managers and institutional desks, Level 2 data supports:
- Dynamic hedging strategies based on liquidity conditions
- Real-time risk-weighted order placement
- Monitoring thin-book conditions that increase tail risk
- Alerting when spread width exceeds thresholds
Arbitrage Engines
Arbitrage opportunities often disappear in seconds. Level 2 feeds enable systems to:
- Pre-check available volume at best price across exchanges
- Avoid executing a trade that can’t be matched on the opposite leg
- Prioritize trades based on depth-adjusted price advantage
[Finage Level 2 Feed]
↓
[Order Book Manager] → [Liquidity Model]
↓ ↓
[Bot Engine] [Execution Algo]
↓ ↓
[Trade Log] [Risk System]
Each layer receives structured, high-frequency order book updates—enabling low-latency, depth-aware decision making.
Finage gives you the depth, speed, and control to build all of these applications, with APIs designed for scale and reliability.
Level 2 data is only as valuable as the speed and consistency with which it’s delivered. In high-frequency trading environments, milliseconds matter, and even in mid-frequency or analytics use cases, lag, dropped updates, or malformed messages can lead to incorrect signals, failed executions, or distorted insights.
In this section, we explore the performance expectations around Level 2 data feeds—and how Finage is engineered to meet those demands.
Unlike static price feeds, Level 2 data is highly dynamic. Bids and asks are constantly updated, added, or removed. If your feed:
- Delivers stale data, you may execute against a phantom price
- Misses updates, your order book state falls out of sync
- Lags behind exchange action, you lose edge against competitors
This is especially critical for:
- Scalping or market-making bots
- Execution algorithms using dynamic spreads
- Arbitrage systems working across multiple venues
Finage’s Level 2 API uses a high-performance WebSocket architecture, optimized for low-latency streaming of market depth across crypto, forex, and equities.
Key features:
- Data delivery in under 50ms, depending on geographic proximity
- Distributed edge servers for regional optimization
- Event-driven delivery model (no polling required)
- Efficient JSON encoding to reduce payload size
- Support for thousands of concurrent subscriptions per client
This means your systems receive updates in real time, as they happen, not seconds later.
Finage supports:
-Up to 20–50 updates per second per symbol during high volume
-Incremental (delta) updates to reduce bandwidth load
-Optional full snapshots for clients who need order book resets or refreshing
Throughput is high enough to support:
- Dozens of symbols in parallel
- Real-time dashboards without throttling
- Multiple strategies consuming the same feed
To use Finage Level 2 effectively, systems should:
- Debounce visual updates (e.g., only render visuals every 100–250ms)
- Batch database writes instead of storing every update in real time
- Use in-memory data structures (e.g., maps or heaps) to track book state
- Log timestamps for every received message for sync validation
Finage is built with high availability in mind:
- 99.99% uptime SLAs
- Auto-scaling WebSocket servers under load
- Reconnect-friendly protocol (clients should auto-resubscribe on reconnect)
- REST backup endpoints available for fallback or initialization
This makes Finage suitable not just for retail-level apps, but also for production-grade institutional systems where performance is non-negotiable.
Your trading logic is only as good as the data infrastructure behind it. With Finage, developers and fintech teams get:
- Ultra-low latency delivery
- High-throughput capacity
- Event-driven streaming
- Global infrastructure coverage
- Proven reliability under load
Level 2 data has long been the domain of institutional traders and high-frequency algorithms—but today, with the right infrastructure, any developer or trading team can access the same real-time order book depth that drives elite strategies.
As markets become more automated, competitive, and liquidity-sensitive, understanding market microstructure is no longer optional—it’s a requirement. And that understanding begins with a high-quality, real-time Level 2 API.
Finage delivers a comprehensive, developer-focused solution for integrating Level 2 data across crypto, forex, and equities:
- Live streaming bid/ask levels with millisecond latency
- Optimized for bots, dashboards, and risk systems
- Supports delta updates and snapshots
- Scalable WebSocket and REST endpoints
- Global infrastructure for low-latency access
- High-throughput capabilities for multi-symbol operations
- Simple, consistent data schema
- Fast onboarding and reliable documentation
- Compatible with trading engines, charting libraries, and automation frameworks
- 99.99% uptime
- Auto-reconnect support
- Usage monitoring and alerting via dashboard
With Finage, developers can go beyond surface-level analytics and:
- Model market behavior more accurately
- Build liquidity-aware trading systems
- Optimize order execution based on real-time flow
- Create tools that visualize and explain true market dynamics
Whether you’re a quant team, fintech builder, or independent algo trader, Finage gives you the data layer you need to unlock the true signals beneath the price.
You can get your Real-Time and Historical Market Data with a free API key.
Build with us today!
Access stock, forex and crypto market data with a free API key—no credit card required.
Stay Informed, Stay Ahead
Discover company news, announcements, updates, guides and more