A locked quote is a market condition where the best bid price equals the best ask price, temporarily removing the bid-ask spread.
In normal market conditions, the best bid is lower than the best ask, creating a positive bid-ask spread. A locked quote happens when those two prices become equal, meaning buyers are willing to buy at the same price sellers are willing to sell.
Locked quotes can appear briefly because of exchange rules, latency, market data timing, routing behavior, or differences between venues. In consolidated or normalized market data, locked quotes may also appear when quotes from multiple sources are combined and timestamped in a common stream.
For order book analytics, a locked quote is important because it affects spread calculations, quote-quality monitoring, replay validation, and market microstructure analysis. Systems that process real-time or historical order book data should detect locked quotes and distinguish them from crossed quotes, where the best bid is higher than the best ask.
Locked quotes matter because they indicate a zero-spread market state. If not handled correctly, they can distort spread metrics, liquidity models, best bid and offer calculations, and execution simulations.
They are especially relevant when analyzing high-frequency quote data, reconstructing historical order books, comparing exchange feeds, or validating normalized market data across venues.
A locked quote may be caused by simultaneous updates to bid and ask levels, market data latency, exchange matching rules, venue fragmentation, or the order in which quote updates are received and processed.
In replay or historical analysis, locked quotes may also appear when updates are applied out of order or when quote carry-forward logic combines stale and fresh quote states.
A locked quote has a best bid equal to the best ask. A crossed quote has a best bid greater than the best ask.
Locked quotes produce a zero spread, while crossed quotes produce a negative spread. Crossed quotes often require additional validation because they may indicate stale data, sequencing issues, aggregation artifacts, or temporary market dislocations.
Market data systems should detect locked quotes explicitly and decide whether to store, flag, filter, or analyze them depending on the use case.
For auditing and replay workflows, the original quote state should usually be preserved. For analytics, locked quotes may be included, excluded, or marked separately so spread statistics and execution models remain interpretable.
Suppose an order book shows:
The quote is locked because the best bid equals the best ask. The spread is zero.
If the best bid were 50,001.00 USD and the best ask were 50,000.00 USD, the quote would be crossed instead of locked.
CoinAPI Market Data API provides normalized exchange market data, including quotes and order book data that can be used to identify locked quote conditions. Developers can analyze best bid and ask prices, monitor spread behavior, compare venues, and validate quote streams in real time or historically.
When combined with order book replay, snapshots, and incremental updates, CoinAPI data can help detect whether locked quotes are genuine market states or artifacts caused by timing, sequencing, or reconstruction logic.