
What Is the Difference Between Level 1 Market Data and Market Depth? Bid/Ask Prices, Sizes, and Order Book Levels Explained
Learn the difference between Level 1 market data and market depth, including bid/ask prices, quantities, order book levels, and how to choose the right market data API.
When developing a real-time market data page, many developers initially need only to display the latest price of a stock. As the product evolves, however, it may also need to show the best bid, best ask, bid and ask sizes, and even five or ten levels of order book data. At that point, developers often discover that their original market data feed does not provide everything the application needs.
This brings us to two concepts that are frequently confused: Level 1 market data and Market Depth.
Both relate to bid and ask quotes, but they provide different levels of information. Level 1 focuses on the best available bid and ask, while market depth goes further by showing buy and sell orders across multiple price levels. Understanding the difference helps developers determine which fields a real-time market data API should provide and how many order book levels the frontend actually needs to display.
What Does Level 1 Market Data Show?
Level 1 market data generally refers to the best available quotes in the market: the current highest bid (Best Bid), the lowest ask (Best Ask), and their corresponding quantities.
For example, a stock might currently have the following quotes:
| Quote Field | Price | Quantity |
|---|---|---|
| Best Bid | 100.00 | 1,200 |
| Best Ask | 100.05 | 900 |
The Best Bid is the highest price a buyer is currently willing to pay. The Best Ask is the lowest price a seller is currently willing to accept. The difference between these two prices is known as the Bid-Ask Spread.
In this example, the spread is 0.05.
For a real-time market data page, this information is often enough to display the best bid, best ask, trading direction, and spread. Users can quickly understand the current quoting situation without needing to inspect every order in the market.
One important distinction is that the latest traded price is not necessarily the same as the best bid or best ask. The latest traded price represents the price of the most recent completed transaction, while the best bid and best ask reflect the current top-of-book quotes. These values may be the same, but they can also differ.
The exact fields included in Level 1 data can also vary between data providers. Some sources may include the latest traded price and trading volume as well. Therefore, when integrating an API, developers should not rely solely on the Level 1 label. They should inspect the actual response structure and confirm which fields are available.
What Additional Information Does Market Depth Provide?
If Level 1 displays only the best bid and best ask, market depth provides additional bid and ask quotes at the second, third, and subsequent price levels.
For example, consider the following hypothetical order book data:
| Bid Level | Bid Price | Bid Quantity | Ask Level | Ask Price | Ask Quantity |
|---|---|---|---|---|---|
| Bid 1 / Ask 1 | 100.00 | 1,200 | Ask 1 | 100.05 | 900 |
| Bid 2 / Ask 2 | 99.95 | 2,400 | Ask 2 | 100.10 | 1,500 |
| Bid 3 / Ask 3 | 99.90 | 1,800 | Ask 3 | 100.15 | 2,100 |
As the example shows, Level 1 requires only the first bid and ask levels. Market depth, on the other hand, provides additional price levels and their corresponding quantities.
This is particularly important when developing an order book interface.
For example, seeing a bid quantity of 1,200 at the best bid does not mean there are no other buy orders at lower prices. Looking at the second and third bid levels helps users understand how orders are distributed across lower price ranges.
However, market depth does not necessarily reveal every individual order in the market. Common multi-level order book data displays aggregated quantities at each price level. It is not the same as individual order-level information, often referred to as Level 3 data.
Another distinction worth understanding is the difference between order book quantity and trading volume. Order book quantity represents the amount of buy or sell orders available at a particular price level. Trading volume, by contrast, represents transactions that have already taken place. Developers should not treat order book quantities as cumulative trading volume.
Which Should You Choose When Integrating a Real-Time Market Data API?
The choice mainly depends on what the application needs to display.
If you are developing a standard stock quote card that only needs the latest traded price, best bid, best ask, and spread, Level 1 data will generally be sufficient.
If you are developing a trading terminal, order book monitoring page, or quantitative analysis tool that needs to observe order distribution across multiple price levels, you will need market depth data.
Taking AllTick as an example, its WebSocket depth subscription interface returns bid and ask order book data through bids and asks. The corresponding prices and quantities are represented by price and volume. Developers can use the returned arrays to build either a Level 1 quote view or a multi-level order book.
For example, to subscribe to five levels of order book data for Tencent Holdings (700.HK), a Hong Kong-listed stock, you can use the following subscription message:
{
"cmd_id": 22002,
"seq_id": 123,
"trace": "depth-700-hk",
"data": {
"symbol_list": [
{
"code": "700.HK",
"depth_level": 5
}
]
}
}After receiving a depth update, you can extract the best bid and ask from the returned arrays or render all available price levels directly:
function parseOrderBook(data) {
const normalize = (levels) => {
return (Array.isArray(levels) ? levels : []).map(
(item, index) => ({
level: index + 1,
price: item.price ?? null,
quantity: item.volume ?? null
})
);
};
const bids = normalize(data.bids);
const asks = normalize(data.asks);
return {
bestBid: bids[0] ?? null,
bestAsk: asks[0] ?? null,
bids,
asks
};
}There is one important detail to keep in mind: do not assume that every instrument provides five or ten levels of market depth. AllTick allows developers to specify the subscription depth through the depth_level parameter. If this field is omitted, only one level is returned by default. If the requested depth exceeds the number of levels actually available, the API returns the levels that can be provided.
The maximum depth listed in the current official documentation also varies by market:
| Market Type | Maximum Order Book Depth |
|---|---|
| Hong Kong stocks | 10 levels |
| Shanghai and Shenzhen A-shares | 5 levels |
| Cryptocurrencies | 5 levels |
| US stocks | 1 level |
| Forex, precious metals, crude oil | 1 level |
Therefore, even when an application requests five levels, it does not mean every market will return five levels. The official documentation also notes that some CFD indices do not provide the volume field. When developing applications that support multiple markets, the implementation should allow quantity fields to be empty.
For continuously updating market data pages, receiving depth updates through WebSocket is generally more suitable than repeatedly sending HTTP requests. If the page also needs to display the latest traded price, the corresponding Tick data should be connected separately. The best bid or best ask should not be used as a substitute for the latest traded price.
Don't Choose Market Data Based Only on the Number of Levels
Level 1 and market depth address different information requirements.
Level 1 allows users to quickly understand the best available bid and ask, while market depth provides additional visibility into order distribution across different price levels. For applications that only need to display prices, integrating a multi-level order book may introduce unnecessary data processing. For applications that require order book analysis, Level 1 alone may not provide enough information.
Before development begins, it is better to identify the required display fields, the number of order book levels needed, and the actual depth supported by the target market. The appropriate API can then be selected based on those requirements.
AllTick provides both REST and WebSocket market data interfaces. For applications that need to continuously receive changes in bid and ask orders, developers can refer to the WebSocket Depth Subscription Documentation to review the subscription protocol, the depth_level parameter, and the response fields. The official AllTick API documentation can also help developers choose the appropriate market data integration method for their specific requirements.