Skip to main content

tickvault

Full-depth crypto order book archives, honest about their own gaps.

There is no good free source of full-depth crypto order book history. Everything free is top-of-book, resampled to bars, or carries undocumented gaps that quietly poison a backtest. This reads the archives produced by tickvault, which publish their gap statistics on the front page.

pip install tickvault-ob

tickvault-ob on PyPI, tickvault when you import it. The plain name normalises to tick-vault under PEP 503, and that belongs to an unrelated Dukascopy tick downloader, so the distribution carries a suffix and the import does not.

Not published yet. Until the first release tag, build it from a checkout of the repository with cd bindings && maturin develop --release.

Ten lines to a plot

import tickvault

archive = tickvault.open("./archive")
bars = archive.bars("kraken", "BTC-USD", bar_seconds=60, frame="polars")
print(bars.select("start", "open", "high", "low", "close", "volume"))

start, end = archive.span_ns("kraken", "BTC-USD")
book = archive.book_at("kraken", "BTC-USD", end)
print(book.mid, book.spread, book.imbalance(depth=10))

archive.plot_book("kraken", "BTC-USD", end, show=True)

Nine lines, and no date to look up first. A test runs exactly this block against a real archive on every commit, so it cannot rot into an example that no longer works.

Two things to know

None means the data cannot answer, and never zero.

>>> bars["volume"][0] is None
True

An aggregated feed shows a price level shrinking and never says whether it traded or was cancelled, so the traded volume of a Kraken or Coinbase bar is not something the data contains. Zero would claim nothing traded. Only an order-by-order feed reports executions, and only Bitstamp offers one without an API key, so volume is a real number there and None on the other five.

Same rule elsewhere: a one-sided book has no mid, and an empty one has no imbalance.

Suspect data is labelled, not hidden.

book = archive.book_at("kraken", "BTC-USD", when)
if book.suspect:
    print(book.origin, book.suspect_rows)   # why, and how much

Every Tick carries suspect too, and plot_book writes it on the chart. The recorder knows which stretches of time it could not vouch for; this hands that through rather than quietly averaging over it.

Replaying

for tick in archive.replay("kraken", "BTC-USD"):
    if tick.mid is not None:
        strategy.on_book(tick.at_ns, tick.bid, tick.ask)

speed=0 is as fast as the archive reads, which is what a backtest wants. speed=1 preserves the recorded gaps, so a burst that arrived in one millisecond is delivered as one millisecond of work. That is the difference between testing whether a strategy works and whether it can keep up.

Exact numbers

The float properties above are conveniences. The archive holds prices as exact integers counting 1e-9 units, and that is what you get from Arrow:

batch = book.to_arrow()          # price and qty are int64, nothing rounded
price = batch["price"][0].as_py() / 10**9

Bars are floats: a bar's mid is already a truncated midpoint, so exactness has run out by then.

What the venues can prove

>>> for v in tickvault.capabilities():
...     print(v["venue"], v["detects_loss"], v["validation"])
coinbase True Counter { step: 1, restart_floor: 0 }
kraken True Checksum { depth: 10 }
okx True Chained
bybit True Counter { step: 1, restart_floor: 1 }
binance-us True UpdateIdRange
bitstamp False MonotonicTimestamp

Bitstamp's aggregated feed carries no sequence number, update id or checksum, so a lost message on it is undetectable by any means. It says so rather than reporting itself as clean. Its order-by-order feed chains every event, and recording it that way makes it the best validated of the six.

Each entry also carries blind_spots: the things that venue cannot see, in plain terms.

Licence

MIT or Apache-2.0, at your option.

Metadata

Release files for tickvault-ob 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tickvault-ob 0.1.1
File Size Uploaded
tickvault_ob-0.1.1.tar.gz 453.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tickvault-ob 0.1.1
File
tickvault_ob-0.1.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
tickvault_ob-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
tickvault_ob-0.1.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
tickvault_ob-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 24.7 MB

Release files / tickvault_ob-0.1.1.tar.gz

Download URL tickvault_ob-0.1.1.tar.gz
Size 453.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6a9d580bbbdd816a197fa5b6222d8634eb71d9cfe891e72b83265d3e0bb0846e
BLAKE2b-256 checksum
How to use checksums
51d723c01b3d83e81cce3e2fb8b446a48864836e788d0229361c72c24a696455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / tickvault_ob-0.1.1-cp39-abi3-win_amd64.whl

Download URL tickvault_ob-0.1.1-cp39-abi3-win_amd64.whl
Size 5.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
28164b9f6f0d554026923b8ed7a1b839758eaafe0cf3e1db6716b0107fce9869
BLAKE2b-256 checksum
How to use checksums
803e709cea06b187b3ea3b085087e4e030cb4d0f33d4eafcc5e3d1bcc191f0e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / tickvault_ob-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tickvault_ob-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.7 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
565a9e2b62349f43eeafc933a4c0f58574c5ef29ad877ea7b52381640fd6328e
BLAKE2b-256 checksum
How to use checksums
b40b8ed40fe313423a910d3e68cbc7eb42ac377763c3001dbb62a9311e6c222c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / tickvault_ob-0.1.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL tickvault_ob-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Size 5.8 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
721d9cd5ec528d94be070c2066e85cb9eb3f0eca438d723643589f6fa0a64dd1
BLAKE2b-256 checksum
How to use checksums
b751eb4daf9f491956222410ca06db251a6a560632fbdca4ae7e84dd63983ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release files / tickvault_ob-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL tickvault_ob-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 6.2 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
764b873e9ae7128420f316b8a9e2eb66eb1bdef4b1e39e7911131b5446ecdb27
BLAKE2b-256 checksum
How to use checksums
fd68037710e9d403f19b342953c8f16c71eaa1c8ff8d6e3fdaca43c158dafa57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page