Documentation

Everything you need to use TDB data: what you receive, how files are organised, and how to reach the API and the live stream.

Delivery

  • Data API (subscription): every daily file of both nodes since the start of collection, in your console and through the REST API, for as long as you subscribe.
  • Pro (subscription): the Data API plus the live stream, a WebSocket that forwards the events of both nodes as they are collected (beta).
  • Archive (one-time): the daily files of one calendar month, both nodes. Every file of a purchased month stays available in your account.
  • Research access: the files of one node (tb-node1-eu), for data older than about two months.

A day is published once it is final: the collector completes some rows (fees, inclusion of exchange transfers) for three days, so the files of day D appear on day D+3, around 01:00 UTC. They are not changed afterwards, except to correct an error, which we announce.

Data contents

Each node runs Bitcoin Core and a TDB collector that records every change to its mempool. Each node and each day give nine tables, the same as in the evaluation samples. Every row starts with node_id; times are UTC with millisecond precision (truncated), amounts are in satoshis.

TableOne row perMain columns
transactionstransaction first seen that daytxid, first_seen_utc, present_at_start, vsize, fee_sat, n_in, n_out, total_out_sat
outputsoutput of those transactionstxid, vout, address, value_sat, script_type
mempool_eventsmempool eventtxid, event (A entry, R removal without confirmation), ts_utc, mempool_seq
blocksblock received that dayhash, height, block_time (miner's time), received_utc (our node), n_tx, status
block_transactionstransaction of those blocksblock_hash, txid, position
block_eventsblock eventhash, event (C connected, D disconnected), ts_utc
exchange_transfersoutput paying a known exchange addresstxid, vout, exchange, value_sat, first_seen_utc, included_utc, delay_ms, label_source_url
collection_gapscollection gap overlapping the daykind, start_utc, end_utc, duration_ms, lost_messages
clockclock reading (every minute)ts_utc, state, clock_offset_us, clock_source

The fee rate is fee_sat / vsize (sat/vB). The lead of a transaction over its block is blocks.received_utc − transactions.first_seen_utc, joining through block_transactions; exclude present_at_start = 1, whose first-seen time is not reliable. Files from both regions can be merged on txid. Exchange labels come from public address lists; each label carries its source.

The field-by-field dictionary, with units and definitions, comes with the free sample day: ask for it through the contact form.

Files

One Parquet file (zstd) per table, node and UTC day:

tdb_mempool_<YYYY-MM-DD>_<node_id>_<table>.parquet
tdb_mempool_2026-11-12_tb-node1-eu_transactions.parquet

Nodes: tb-node1-eu (Germany) and tb-node2-useast (US East). Open them with any Parquet reader:

import pandas as pd
tx = pd.read_parquet("tdb_mempool_2026-11-12_tb-node1-eu_transactions.parquet")
tx["fee_rate"] = tx.fee_sat / tx.vsize

API keys

Create a key in your console (Live stream & API keys page). The key is shown once only: store it safely. Two keys at most per account, each can be revoked at any time. Send it in the Authorization header:

Authorization: Bearer tdb_live_…

REST API

CallReturns
GET /v1/files?month=YYYY-MMThe files of that month included in your plan
GET /v1/files/download?key=…A redirect to a download link valid for 10 minutes
GET /v1/statusWhich nodes are feeding the live stream (public)
{"month": "2026-11",
 "files": [{"key": "daily/tb-node1-eu/2026-11/tdb_mempool_2026-11-12_tb-node1-eu_transactions.parquet",
            "node_id": "tb-node1-eu", "date": "2026-11-12", "table": "transactions", "size": 61000000}]}
import requests
H = {"Authorization": "Bearer tdb_live_…"}
base = "https://tradingbox.fr"
files = requests.get(f"{base}/v1/files", params={"month": "2026-11"}, headers=H).json()["files"]
for f in files:
    if f["table"] != "transactions":
        continue
    r = requests.get(f"{base}/v1/files/download", params={"key": f["key"]}, headers=H)
    open(f["key"].rsplit("/", 1)[-1], "wb").write(r.content)

Limit: 600 requests per minute. Errors: 401 invalid key, 404 file not in your plan, 429 too many requests.

Live stream

With the Pro plan, connect to wss://tradingbox.fr/v1/stream with your key in the Authorization header. Clients that cannot set headers (browsers) send {"type": "auth", "api_key": "…"} as their first message, within 10 seconds. Two simultaneous connections per account.

MessageContent
helloSent once after authentication, with the status of each node
event{"type": "event", "node_id": "…", "data": {…}}, one per mempool or block event
heartbeatEvery 15 seconds without traffic
errorSent just before the server closes the connection

Mempool events ("kind": "mempool") carry event (A or R), txid, ts_utc, mempool_seq, present_at_start, vsize, fee_sat, n_in, n_out and total_out_sat; they are sent about 2 seconds after the node records them, once the fee is known. Block events ("kind": "block") carry event (C or D), hash, height, n_tx and ts_utc. id increases by one per event and per node and kind: a jump means you missed events.

{"type": "event", "node_id": "tb-node2-useast",
 "data": {"id": 48211907, "kind": "mempool", "event": "A", "txid": "9f2c…", "ts_utc": "2026-11-12T14:03:07.412Z",
          "mempool_seq": 50211, "present_at_start": 0, "vsize": 141, "fee_sat": 564, "n_in": 1, "n_out": 2,
          "total_out_sat": 1250000}}

Close codes: 4401 invalid key, 4403 no active Pro subscription or key revoked (checked every minute), 4429 too many connections, 4008 client too slow, reconnect. The stream is in beta: no uptime commitment yet, so reconnect automatically and rely on the daily files as the reference.

Quality reports

Every day gets a public report: coverage per node, clock offset and every collection gap with its cause. Read them on the quality page, or as JSON at /quality/<YYYY-MM-DD>?format=json.

Licence marking

Each file you download is a copy marked for your account: its Parquet metadata holds the licence name, a licensee identifier and the issue date. The data itself is identical for every customer. Downloads are logged. Terms of use: data licence.