Skip to main content

booktop

A live order book in your terminal. Like htop, but for markets.

PyPI CI Python MIT

booktop streaming the live BTC-USD order book from Coinbase

uvx booktop          # or: pipx run booktop

That's it: no account, no API key, no config. You're watching the real BTC-USD order book, every quote and every trade, as it happens.

What you're looking at

  • Depth ladder. Asks above, bids below, best prices meeting at the spread. The shaded bars are cumulative size, so the ladder doubles as a depth chart: walls show up as bars that suddenly jump.
  • Flashes. A size turns yellow the moment it changes, so you can see where the action is.
  • Trade tape. Every fill, colored by the side that crossed the spread. Unusually large trades get a ◆.
  • Book imbalance. How much resting size sits on the bid versus the ask near the top of the book.
  • Flow. Aggressive buying versus selling volume over the last 60 seconds.
  • Mid-price sparkline of the last few minutes.

Usage

booktop                      # BTC-USD on Coinbase
booktop ETH                  # any pair: ETH, SOL-USD, DOGE-USD, ...
booktop SOL -x kraken        # Kraken (every book update is checksum-verified)
booktop --demo               # a synthetic market, works offline
Key
space pause
z group price levels (1×, 10×, 100×, 1000× the tick)
[ ] replay speed
q quit

Replay a real NASDAQ trading day

booktop replaying AAPL from NASDAQ's Dec 30, 2019 TotalView-ITCH feed at 20x

NASDAQ publishes full-depth TotalView-ITCH 5.0 files for free. booktop rebuilds any stock's order book from one and plays the session back at whatever speed you like:

pip install "booktop[itch]"
booktop --itch 12302019.NASDAQ_ITCH50.gz AAPL --speed 20

Download a day from https://emi.nasdaq.com/ITCH/Nasdaq%20ITCH/ (a few GB). The first run indexes the symbol with fastitch and caches it, so after that, replays start in seconds. Executions are attributed to the aggressor by tracing each resting order back through its replaces, so the tape colors and the flow gauge reflect who actually crossed the spread.

Correctness

  • Kraken: every book message is checked against the exchange's CRC32 checksum. On a mismatch, booktop drops the book and resubscribes, so what you see is never silently wrong. The header shows a running count of verified updates.
  • Coinbase: trades are shown from the aggressor's side (Coinbase reports the maker's).
  • Both feeds reconnect automatically with backoff and rebuild from a fresh snapshot.
  • Tests replay messages recorded from the real Kraken and Coinbase feeds.

Install

pipx install booktop         # or: uv tool install booktop / pip install booktop

Python 3.10+, any terminal with true color (most modern ones). Built with Textual.

Contributing

Ideas welcome, especially more venues (Binance, Bybit, OKX, Bitstamp), multi-symbol tiling, a heatmap view of liquidity over time, and order-flow alerts.

git clone https://github.com/ArkaKhorchidian/booktop && cd booktop
pip install -e ".[test]" && pytest

License

MIT. Not affiliated with Coinbase, Kraken or Nasdaq. Market data is displayed as received and is not investment advice.

Metadata

Release files for booktop 0.1.0

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

Source distribution (sdist)

Source distribution for booktop 0.1.0
File Size Uploaded Provenance Actions
booktop-0.1.0.tar.gz 21.8 kB With provenance Details for booktop-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for booktop 0.1.0
File Interpreter ABI Platform Actions
booktop-0.1.0-py3-none-any.whl Python 3 none any Details for booktop-0.1.0-py3-none-any.whl

Total release size: 41.5 kB

Release files / booktop-0.1.0.tar.gz

Download URL booktop-0.1.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
edbb7d31c9272e6dff92259e56ec59422865c258fd05805ecc0ea7eb576b340a
BLAKE2b-256 checksum
How to use checksums
bc24031467908b613ce60b17dc98d7977cf75eb5c1fb7c33177b966ad5e89fd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / booktop-0.1.0-py3-none-any.whl

Download URL booktop-0.1.0-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69a623e3cb0602ca2400fbf0e8897b10ab79a15a9f4ddf7183da70b1c2418019
BLAKE2b-256 checksum
How to use checksums
3f9772833dc07cec74aa525946e878faa6da4377eb50581b0f0799dac1b0f55c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for booktop 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for booktop-0.1.0.tar.gz

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 Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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