Skip to main content
Skip to content
Crypto Trading

Order Book Snapshots vs Deltas in 2027: A Capture and Replay Experiment

Compare order book snapshots and deltas with DN’s original 2027 replay experiment. Measure disclosed file sizes and see why a missing sequence breaks completeness.

A luminous layered data structure contains one clearly missing amber tile between otherwise continuous cyan layers.
Reading options: audio, text size & sections

What Matters

An order-book snapshot records a state; a delta records a change under a specified protocol. Deltas can reduce repeated information, but reconstruction depends on a valid starting state and an unbroken sequence. DN’s original four-state example uses fewer bytes as a seed plus changes and reproduces every state. Remove one update and completeness becomes unknown. Define the capture contract before choosing the database.

Evidence status — checked 28 November 2026: DN authored four fictional book states, serialized them in a declared JSON Lines format and executed a reconstruction check. The file sizes are actual measurements of those small local fixtures. They are not exchange-traffic observations, ArcticDB compression benchmarks or results from a live CCXT collector. This is the 2027 edition of the method.

A team wants to investigate how available liquidity changes around a trade. It can store a fresh copy of the book repeatedly, or record a starting copy followed by updates. The second option sounds efficient. The important question is whether a later reader can reconstruct the state the team believes it captured.

A smaller file can preserve the required information, discard it or leave its completeness impossible to establish. Storage size alone does not distinguish those outcomes. The data format, update meaning, sequence rules and capture depth all affect the answer.

This article starts with a small experiment so each dependency is visible. Once the representation is understood, the team can make a more informed decision about collection, recovery and long-term storage.

What is an order-book snapshot?

An order book describes bids and asks available in a particular market representation. A snapshot records the state supplied at one point. Its scope might be the best bid and ask, a fixed number of aggregated price levels or a more detailed set of individual orders. “Full” should always mean full within a declared scope.

The CCXT manual distinguishes price-aggregated level-two books from more detailed level-three representations. It also notes that available timestamps and depth behaviour can vary by exchange. A common library interface does not make every underlying feed carry the same information.

A sequence of snapshots can answer questions about the recorded states. It does not automatically capture every event between them. If you take a snapshot, wait and take another, an order may have appeared and disappeared during the gap. Identical endpoints would not prove that nothing happened in between.

That limitation comes from the capture schedule, not from the eventual choice of database. Storing the two snapshots more quickly or preserving them for longer cannot recover the unobserved intermediate event.

What does a delta mean?

A delta tells the reader how to change a prior state. The word does not identify a universal encoding. A message might give a replacement size at a price level, a quantity to add or subtract, or an event tied to an individual order. Applying the wrong interpretation changes the reconstructed book.

DN’s teaching protocol uses absolute replacement sizes. A positive size inserts or replaces a level. A zero size deletes a known level. The bid and ask sides remain separate, and each record has a contiguous sequence number. These rules are deliberately small enough to reproduce independently.

Real venue protocols may use different sequencing. For example, the official Binance Spot diff-depth documentation exposes first and final update identifiers within an event. A collector must follow the relevant venue’s snapshot, update and recovery rules. DN’s one-number-per-record format is an original explanation, not a replacement exchange client.

Before implementing a collector, write a few sample messages and their intended resulting states. This exposes ambiguity early: whether sizes are absolute, how deletion works, how duplicate messages are handled and what makes a sequence complete.

The experiment: four states, two representations

We authored a starting book for a fictional instrument called SYNTH/UNIT, then three updates. Each update changes two price levels. Independently specified full snapshots record the expected state after each step. This supplies four states against which reconstruction can be checked.

The first file contains all four complete states. The second contains the starting snapshot and the three delta records. Both use UTF-8 JSON Lines, sorted object keys, compact separators and one line-feed character after every record. No compression is applied.

RepresentationContentsMeasured bytesReconstruction result
Complete snapshotsAll four authored states1,010States stored directly
Seed plus deltasOne snapshot and three updates744All four reconstructed states match
Stream with an omitted updateSeed, sequence 2 and sequence 4580Completeness stops being proven at sequence 2

The complete delta representation uses 266 fewer bytes than the full-state representation in this fixture. That is a measured property of these particular records and encoding. It is not a universal saving rate, a compression ratio for ArcticDB or an estimate of a trading venue’s bandwidth.

The third file is smaller still because information is missing. Its lower byte count is not an efficiency improvement. The distinction between a compact complete representation and a compact incomplete one is the central result of the exercise.

What happens when sequence three disappears?

The starting snapshot has sequence one. The expected deltas are two, three and four. We remove the record with sequence number three, which is the second delta, and then deliver sequence four.

The checker has a proven state at sequence two. It expects three and receives four. It reports incomplete reconstruction with last proven sequence two, expected next sequence three and received sequence four. It does not assume that the absent update represented zero change.

Continuing to apply subsequent updates may produce a plausible-looking book. Plausibility is weaker than completeness. A level changed by the missing record could remain wrong until a later message happens to replace it, and a later replacement would not reconstruct the missing historical state.

A later authoritative snapshot can provide a new starting point under its protocol. That may restore knowledge of the current state within the snapshot’s scope. It does not fill in every state between the gap and the new snapshot. Preserve the gap in the historical record so subsequent analysis knows where the evidence stops.

Order-book snapshot and delta replay

Encode a declared complete teaching stream as full states or a seed plus changes. Then omit one known update and inspect the last reconstructable state. This format is original; it is not an exchange protocol or ArcticDB benchmark.

Works in your browser with your inputs. No account, data subscription or broker connection is required.

Replay reconstructs every baseline state through declared sequence 4.

Full-state representation (UTF-8 bytes)
1010
Complete seed-and-delta representation (bytes)
744
Full minus seed-and-delta bytes
266
Received replay stream (bytes)
744
Last proven sequence
4
Completeness against declared baseline
Complete
Last proven sidePrice stringSize string
Bid100.002.000
Bid99.904.000
Bid99.803.750
Bid99.703.000
Bid99.602.000
Bid99.501.000
Ask100.201.500
Ask100.303.000
Ask100.404.000

Sizes replace or insert a price level; zero deletes it. This is a declared teaching protocol. Real exchanges can use different update ranges, checksums, sequence rules and recovery steps.

Byte counts use UTF-8 JSON Lines with sorted object keys, compact separators and one LF after every record, without compression. The full-state baseline is derived from the entered complete stream; it is not an independent live-market truth source.

The initial data are authored. These counts are not ArcticDB layout/compression, exchange bandwidth or storage-price measurements. Missing changes cannot be assumed to mean no change.

The initial result is a worked example. Changing an input changes the stated scenario, not an exchange account or a verified market result.

Set the omitted sequence to zero to retain the complete stream, or to three to remove the second delta. The supplied baseline stream must itself have consecutive sequence numbers. A zero-size update deletes the named price level if it is present; deleting a level that is already absent leaves the book unchanged.

Why this does not measure executable liquidity

Reconstructing a quoted book answers a data question. It does not establish that a hypothetical order would have received the displayed quantity. An execution model needs additional assumptions about arrival time, competing orders, cancellations, replenishment and the way the order changes the book.

Even perfect reconstruction within a price-aggregated feed may not reveal an individual order’s queue position. Aggregation can preserve total size at a price while omitting the ordering of participants at that price. DN’s queue-position experiment explains why that distinction affects simulated fills.

Similarly, a replay that allows several hypothetical orders to consume the same recorded quantity can overstate what the assumed environment makes available. The liquidity-consumption article examines that separate modelling question. This article’s result is narrower: the declared change records reproduce the authored states when complete.

Choose the capture contract around the research question

A useful capture specification starts with the question. A periodic spread summary and a detailed event-replay investigation require different evidence. Collecting the deepest available feed does not help if the system cannot preserve its sequence or explain the observations it missed.

Capture choiceQuestion to settle
Instrument identityWhich venue, market, contract and unit does each record describe?
Depth and aggregationWhich levels or orders are represented, and what lies outside that scope?
Snapshot scheduleWhich states are observed directly, and when can a new seed be obtained?
Update semanticsAre quantities replacements, increments or order-level events?
Sequence and gap policyHow are missing, duplicated, stale or out-of-order records identified?
Clocks and provenanceWhich timestamp belongs to the venue, receipt and storage process?
Recovery recordWhere does reconstruction stop, and what evidence establishes a new starting state?

Keep event time and receipt time distinct when both are available. A record received late can still describe an earlier event. Conversely, a local receipt timestamp does not reveal an absent venue timestamp. Unknown fields should remain unknown rather than being assigned a convenient substitute without a label.

Specify the treatment of duplicates and out-of-order arrivals before claiming successful replay. The small DN fixture requires contiguous records in order; it does not implement every real feed’s buffering or recovery logic. A venue-specific collector needs tests drawn from that venue’s documented contract.

Snapshots and deltas have different operational costs

Storing repeated snapshots duplicates unchanged levels, but it makes each stored state easier to inspect in isolation. A delta representation can avoid that repetition while adding a dependency on earlier records. These are design trade-offs rather than a universal winner.

A hybrid design can retain periodic seeds and the changes between them. The useful seed frequency depends on how quickly a reader needs to start replay, the cost of producing a seed and the consequences of losing a segment. DN’s four-state example does not identify an optimum for a production system.

Compression, schema design and numerical representation can change byte counts substantially. So can depth, update frequency and the number of levels changed per message. Benchmark those choices using representative permitted data if storage performance is the actual question. Do not multiply our 266-byte difference into an annual saving without a workload model.

Retention is another decision. A complete stream kept for too short a period may fail a later research need; a very long archive of an incomplete stream still lacks the missing evidence. DN’s data-placement and retention guide starts after the representation and required evidence have been defined.

Where CCXT and ArcticDB fit

CCXT provides interfaces to venue data and trading operations. ArcticDB provides a DataFrame-oriented storage system. They address different parts of a possible research workflow. Neither repository name specifies the capture depth, sequence validity or provenance of a dataset someone stores.

The inspected ArcticDB README describes its storage interfaces and version-dependent licensing context. This experiment uses ordinary local files and does not test ArcticDB’s layout, compression or deployment terms. Readers evaluating a commercial route should inspect its actual version and access conditions, as discussed in DN’s research-to-execution cost guide.

The practical contribution of the repositories is to make parts of a possible system inspectable. The research team still has to define the evidence it wants the system to preserve. Choosing that contract first makes later software comparisons more meaningful.

Methodology and a practical next step

DN’s runner serializes the authored full states and the seed-plus-delta stream, measures the resulting byte lengths and compares every reconstructed state with an independently specified expected snapshot. It then removes sequence three and checks that the gap is reported with the correct last proven and next expected sequence values.

The original input, runner, three serialized files and executed result record are included in the evidence pack. File hashes identify the exact artifacts that produced the quoted measurements. The protocol uses decimal strings for its authored levels and discloses insertion, replacement, deletion and ordering rules.

No network collection, exchange account, CCXT runtime or storage-engine benchmark was involved. There are no latency, uptime, trading-profit or general compression claims. The experiment demonstrates representation and reconstruction using a controlled, inspectable example.

Before commissioning a larger collector, request a sample seed, a short update sequence, the reconstructed states and a deliberate gap test. The DN Research Desk can scope a review of that evidence and the collection specification. A small, repeatable record of what the system preserves is a useful foundation for deciding what to build next.

Download the dated source and scenario record (JSON) · Download the reproducible calculation pack (ZIP).

Frequently asked questions

What is the difference between an order-book snapshot and a delta?

A snapshot records a state within its declared depth and aggregation. A delta describes how to change a prior state under a particular protocol. Reconstructing states from deltas requires a valid seed and the required updates.

Are order-book deltas always smaller than snapshots?

No universal size result follows. DN’s four-state fixture uses 1,010 bytes as complete snapshots and 744 as a seed plus three deltas in one disclosed encoding. Depth, changed levels, metadata and compression affect other workloads.

What does a sequence gap mean in this example?

After sequence two, the checker expects three. Receiving four after three was omitted means completeness is no longer established beyond two. It does not treat the missing record as zero change.

Can a new snapshot recover the missing history?

It may establish a new current state within its scope under the relevant protocol. It does not reconstruct every unobserved state between the gap and that snapshot.

Does the experiment benchmark CCXT or ArcticDB?

No. It uses original local files and independent reconstruction code. The repositories provide context; no exchange collector, CCXT runtime or ArcticDB storage engine was executed.

Does a reconstructed book establish that an order would fill?

No. Reconstruction establishes the represented data state. Fill simulation additionally needs assumptions about timing, priority, cancellations, replenishment and how hypothetical orders consume liquidity.

Continue your research

Primary sources and evidence

  • CCXT order-book documentation. Order-book structure, aggregation and venue-specific timestamp/depth qualifications. Checked 2026-11-28.
  • Binance Spot WebSocket stream documentation. A concrete primary-source example of diff-depth events carrying first and final update identifiers; DN does not reproduce this protocol. Checked 2026-11-28.
  • ArcticDB pinned README. DataFrame storage context and version-specific access/licensing references; not evidence for the original file-size results. Checked 2026-11-28.

Editorial disclosure: This research explains documented capabilities and original worked examples. Inclusion does not imply endorsement, a commercial relationship or verified trading performance. No placement in this article was purchased.

Corrections and updates: Send source-backed corrections to press@decentralised.news. This 2027 edition was checked on 28 November 2026; documentation, permissions and product availability can change.

Get the most talked about stories directly in your inbox

Join the Decentralised News briefing for independent crypto, DeFi and AI analysis. No spam, unsubscribe anytime.