Skip to content

Execution

Crypto liquidity resilience: how a book refills

A hypothetical book regains its spread at 80 ms, touches 90% depth at 160 ms and passes a persistence check at 600 ms. Each measures a different recovery.

Ivory ceramic plates curve around a gap, with a separated lime-edged plate on a near-black surface.
Illustration for execution; examples in this article are educational.

Crypto order book resiliency measures how displayed liquidity recovers after a trade or cancellation depletes it. Fix the venue, side, price window and baseline, then track depth, spread and elapsed time after the shock. Measure the first recovery and whether it persists. Refilled depth describes observed orders; it does not guarantee the price or quantity available when your order arrives.

A narrow spread can return while most nearby quantity is still missing. A depth threshold can be touched and immediately lost. To describe a book as recovered, attach the measurement rule and its clock to the claim.

Define what has to recover

Here, resilience means the replenishment of displayed liquidity after a shock. It does not require the token price to return to its earlier value. Lo and Hall distinguish liquidity replenishment from price recovery and study shocks caused by both market orders and cancellations. Their evidence concerns Australian equities; it does not supply a recovery speed for a crypto venue. See their original resiliency research.

Choose the affected side. A market buy consumes asks; a market sell consumes bids. Track each side separately before considering an aggregate, because an intact bid side can conceal depleted asks in a combined total.

Next choose a depth window. It might contain the best five prices or every eligible price within a specified band. Five levels can span different price distances before and after a shock. A price band makes distance explicit, but you must state whether its reference remains fixed or moves with the midpoint.

Use a fixed reference when asking whether quantity returned near the original prices. Use a moving reference when asking about liquidity around current quotes. These answer different questions. If prices leave a fixed window, record the displacement rather than interpreting every missing unit as unwillingness to provide liquidity.

The order book imbalance guide explains why window choice changes a snapshot's meaning. Resilience adds the next question: how does that precisely defined quantity evolve after depletion?

Normalize depth and keep two clocks

Set the pre-shock depth to an index of 100. For each later observation, calculate the depth index as 100 times current selected depth divided by pre-shock selected depth. This makes a 30-unit book and a 300-unit book comparable in relative recovery, while retaining their different absolute capacities.

A single pre-shock snapshot is a transparent baseline for a worked example. For research, a predeclared median from a preceding window may be less sensitive to one unusual order. Freeze that baseline before the shock; later observations must not rewrite it. A zero or incomplete baseline cannot support a usable ratio.

Record both elapsed milliseconds and an event index. Define event zero as the first reconstructed state after the selected shock. For this worksheet, count each subsequent accepted state that changes selected depth or a best quote. Keep a batch as one observation when its internal ordering is unavailable. The event index aligns shocks by their place in a sequence; elapsed time shows how long a trader actually waited.

Xu and colleagues examine spread and depth on a best-limit-update clock, normalized around effective market orders, using Chinese stock data. That is an example of a declared event definition, not evidence that crypto books recover after the same number of updates. See the study's measurement method.

An incoming network message is not automatically one matching-engine order. Binance's documented Spot diff-depth stream has 100 ms or 1,000 ms update speeds. A collector using it must label an observation-based clock accordingly. A faster publishing schedule can produce more observations without establishing faster economic replenishment.

Follow one hypothetical shock through recovery

Consider a fictional ABC/USDT spot book. The best bid remains 99.90 USDT. Before the shock, asks contain 40 ABC at 100.10, 30 at 100.20 and 30 at 100.40. The midpoint is 100.00.

Hold the reference midpoint fixed and measure asks from 100.00 through 100.50, inclusive: a 50-basis-point band above that reference. Baseline depth is 100 ABC. No other asks occupy the band.

At event zero, a hypothetical market buy consumes the first 70 ABC, removing the first two ask levels. Then the following complete sequence occurs. Times, quantities and events are invented for this example; no unlisted events occur.

EventElapsed timeAsk depth, ABCDepth indexSpread, USDT
Before shockBefore1001000.20
0: buy removes 700 ms30300.50
1: add 20 at 100.1080 ms50500.20
2: add 40 at 100.20160 ms90900.20
3: cancel 35 at 100.20220 ms55550.20
4: add 40 at 100.30400 ms95950.20
5: add 5 at 100.40600 ms1001000.20

The arithmetic is directly auditable. The shock removes 70% of baseline depth. Subsequent net changes are +20, +40, −35, +40 and +5 ABC, leaving 100 ABC at the final observation.

Three definitions give three recovery times

The spread returns to its original 0.20 USDT at event 1, only 80 ms after the shock. Yet selected depth is still half its baseline. Calling the entire book repaired from the spread alone hides that shortage.

Suppose the depth rule is first reaching 90% of baseline. Its threshold is 90 ABC, first met at event 2 after 160 ms. That crossing does not persist: 35 ABC cancel 60 ms later.

Now require at least 90 ABC for 200 continuous milliseconds. Under the example's complete event history, event 4 begins a qualifying run at 400 ms. Event 5 confirms 200 ms above the threshold at 600 ms. Record both the run's start and its confirmation time; a decision at 400 ms could not yet know the hold would pass.

These thresholds are illustrative measurement choices. They are not recommended trading parameters or a universal definition of adequate liquidity.

Also distinguish baseline recovery from replacement of the depleted amount. At event 2, depth is 90% of baseline, but only 60 of the lost 70 ABC have returned. The replenished fraction is 60 ÷ 70, approximately 85.7%. A report saying “90% replenished” would confuse two denominators.

Replacement quantity does not establish a fill

The final book has the original total depth, but a different distribution. Only 20 ABC sit at 100.10, compared with 40 before the shock. More quantity rests farther away. Equal band totals need not imply equal execution costs for the same order size. Use a size-specific depth calculation when that is the actual decision.

Visible additions also need careful attribution. Coinbase Exchange's Level 2 specification says an update's size replaces the level total, and zero removes that level. Adding each reported size onto the previous total would manufacture apparent replenishment. Aggregate changes alone also need not reveal every submission, execution and cancellation that occurred between observations.

Coinbase's batch channel publishes batches every 50 ms, with a time field tied to the most recent message in the batch. Consequently, a detected threshold crossing inherits the feed's timing limits. Do not assign an exact earlier crossing time by interpolating through unobserved states. For batched data, label persistence as holding across observed states; shorter reversals inside a batch may remain unresolved.

Replenishment may involve hidden quantity. Kraken documents iceberg orders whose visible portion can be refreshed from a hidden remainder as it fills. That implementation shows why a returning quantity need not represent a new independent supplier. It does not let an observer recover the hidden total from the displayed increase.

Finally, other orders can trade or cancel before yours arrives. A recovered public total is evidence about the observed state, not a reservation. For passive execution, the limit-order queue guide explains a separate uncertainty: aggregate depth does not identify precisely how much quantity is ahead of your order.

Build a recovery record that can fail honestly

A useful worksheet should make an invalid observation visibly different from a slow recovery.

FieldMeasurement policy to save
Market and sideVenue, symbol, product and affected bid or ask side
Units and coverageBase units or declared notional; complete requested band
Window and baselineBounds, fixed or moving reference, pre-shock sampling rule
Shock definitionTrade or withdrawal evidence; minimum depletion rule
Observation clockEligible state changes or received batches; timestamps and receive times
Recovery testTarget depth, spread condition, hold duration and timeout
IntegritySnapshot validity, continuity checks and unresolved gaps
ResultFirst crossing, persistence confirmation, or explicit incomplete status

Reconstruct the venue's book according to its actual feed contract before calculating anything. If collection loses continuity, mark that event's recovery time unavailable. A later snapshot cannot reveal whether an apparent hold was broken during the gap.

Specify what happens after another qualifying shock. You might terminate the original event and classify it as interrupted, or study overlapping shocks separately. Continuing the same clock without a rule can make a second depletion look like ordinary slow recovery.

Keep events that fail to recover within the observation horizon. Label them “not observed by timeout,” retain the horizon, and report their share beside recovery-time summaries. Removing them leaves a sample made only of successful recoveries. A median of recovered events alone cannot describe the full population.

For comparisons, hold the feed, window, shock-size bucket and recovery policy constant. Report absolute depth alongside its index. A small book returning to 100% can still contain less executable quantity than a larger book at 60%.

Connect recovery to the decision being tested

In an execution rehearsal, a recovery condition can be one eligibility check before reconsidering another order slice. Recheck current prices, size-specific depth, fees and observation age at that decision time. Historical recovery does not lock today's book or establish a profitable waiting interval.

Portfolio constraints remain separate. The gross versus net exposure calculation shows why offsetting positions can retain substantial gross exposure even when a net figure looks small. A replenishing book does not change those position sizes by itself.

Likewise, a proxy hedge's basis risk concerns how different instruments move together. Both books can replenish while the hedge relationship weakens. Keep that relationship test separate from either venue's recovery measurement.

Start with one recorded shock and preserve the before-state, every accepted update, the chosen band and the crossing timestamps. Reproduce the first crossing, then deliberately introduce a cancellation or data gap. The record is useful when it can distinguish a durable observed refill, a fleeting threshold touch and an outcome the data cannot establish.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.