BitcoinDatabase.com

Compliance & flows · Transaction tracing API

Bitcoin transaction tracing API and fund flow analysis

Tracing a Bitcoin transaction means walking the transaction graph: take an output, find the transaction that spent it, look at where that transaction sent the value, and repeat. On a public block explorer that is a manual click per hop, and a fund flow of any real length runs to dozens or hundreds of hops.

or try it below ↓

REST API · SQL · dashboards · address history from genesis

Query Console
btc
try:

Hit Run to query the Bitcoin blockchain.

Live from the chain for .

BTC

Balance trail

informational on-chain data · not financial advice

REST API · SQL · dashboards, one indexed dataset. Reading the chain ...

This Bitcoin transaction tracing API turns each hop into a call, which is what makes fund flow analysis repeatable. Give it a transaction ID or an address and get back the spending transactions, the inputs and outputs with amounts and addresses, and the confirmation and block height for each step, so your own code can expand a trail to whatever depth your investigation needs.

The part that makes a trace useful is what sits at the end of it. Because entity labels are indexed alongside the chain, a path that terminates at a known exchange deposit address, a mining pool payout or a service wallet comes back labeled instead of as an anonymous hash, which is usually the point at which an investigation stops being on-chain work and becomes a records request. You can also drop into SQL and traverse many hops in one recursive query rather than looping REST calls, then export the whole path as rows. Important limits, stated plainly: this is on-chain data and probabilistic clustering heuristics, not identity. We do not deanonymize individuals, we do not recover funds, and nothing here is legal advice or an accusation about any person or address. Regulated teams use it as evidence-gathering input to their own review.

REST API SQL DASHBOARDS WEBHOOKS CSV EXPORT

History from genesis queryable in seconds

On-chain data not financial advice

Why it works

What you get with Transaction tracing API

One call per hop, to any depth

Every output in our index carries a pointer to the transaction that spent it, so following the money is a lookup instead of a search. Trace forward from a source address or backward from a destination, branch across multiple outputs, and stop at the depth you choose. What takes an afternoon of clicking in an explorer becomes a loop your service runs in seconds.

Labeled endpoints, not bare hashes

A trail that ends at an exchange, a mining pool or a payment processor is worth far more than one that ends at an unattributed address. Entity labels are indexed with the chain, so the endpoints and intermediate hops that we can attribute come back named, and the ones we cannot are returned honestly as unlabeled rather than guessed at.

Multi-hop traversal in SQL

Some questions are graph questions: every path between two addresses under ten hops, or the total value that reached any exchange from a given source. Those are one recursive SQL query against the full indexed chain, not thousands of API round trips, and the result set exports straight to CSV for a case file or a report.

What it handles

The indexed Bitcoin chain, queryable your way

Look up an address, a transaction, a UTXO, the rich list or an on-chain metric, by REST API, SQL or dashboard. The same authoritative data, reconciled block-by-block against the canonical chain, without running a node.

  • Follow a Bitcoin transaction hop by hop from a starting txid
  • Expand every input and output with addresses, amounts and block height
  • Trace backward to find where funds originally came from
  • See which hops land at labeled exchanges, pools or services
  • Traverse many hops at once with a recursive SQL query
  • Detect peel chain and fan-out patterns across a fund flow
  • Export a full traced path as rows for a case file
  • Pin a trace to a block height so the result is reproducible
GET /v1/address/{addr} query result
200 · JSON
{
  "address": "bc1qxy2k…l0wdv8",
  "balance_btc": 68432.10,
  "balance_usd": 4612165420,
  "tx_count": 1284,
  "unspent_outputs": 37,
  "first_seen": "2014-02-09"
}
indexed from genesis · to the satoshi ✓ reconciled block-by-block

Why BitcoinDatabase

One platform, queryable three ways

Not a raw node to sync, not an indexer to build, and not five vendors to stitch together. The fully-indexed Bitcoin blockchain, available as a REST API, as SQL, and as dashboards, on one authoritative dataset.

REST API

Typed JSON for addresses, transactions, balances, UTXOs and metrics. Drop it into apps, wallets, explorers and agents with curl, Python or any HTTP client.

SQL access

Run SQL directly against the indexed Bitcoin dataset for ad-hoc analysis, cohorts and exports, the same data the API and dashboards read from.

Compliance-first

Informational on-chain data and analytics only. Entity labels and flow tracing are framed as tooling to support a regulated team's own review, not accusations.

Good questions

Questions about Transaction tracing API

Yes. Every Bitcoin transaction since 2009 is recorded on a public ledger, and each output records which transaction later spent it, so the flow of value from one address to the next is fully visible to anyone. What the chain does not record is identity. Tracing shows you where value moved, not who moved it.
Start from a transaction ID or address, list its outputs, then find the transaction that spent each output and repeat for as many hops as you need. In practice you also group addresses that appear as co-inputs, watch for the change output, and check each hop against entity labels to see where the path reaches a regulated service.
Not from the blockchain alone. On-chain data links addresses to other addresses, never to a legal identity. Attribution normally happens off-chain, when a trail reaches a service that collects customer identification and a law enforcement or legal process compels that record. We supply the on-chain half only.
There is no fixed hop limit. Each hop is a lookup against the indexed chain, so depth is a question of how much you want to retrieve, not a product cap. Long traces are usually better run in SQL, where a single recursive query walks many hops and returns the whole path at once.
No. It is the underlying Bitcoin data layer: the transaction graph, entity labels and query access that tracing tools are built on. There is no case management, no report builder and no risk verdict. Compliance vendors, exchange investigation teams and researchers use it to build or supplement their own tracing workflow.
You can trace up to and away from a mixing service, but not reliably through it. A CoinJoin or mixer is designed to break the link between a specific input and a specific output, so a trace that enters one usually ends there. Our data shows the path and the point where it reaches the service, without asserting a link the chain does not support.
Check two things the chain gives you for free. The number of transactions you collected for an address over a block range must equal the change in its transaction count between those heights, and the net flow you summed must equal the change in its balance. On 22 September 2026 we traced 237 transactions for one exchange wallet and both checks matched to the satoshi.
Often because of paging, not the chain. Explorers page an address history by the last transaction ID seen, and two providers can order transactions inside the same block differently. A script of ours that alternated hosts on retry duplicated 65 transactions and skipped 71 while still looking plausible, and it was off by 741 BTC. Page from one source and deduplicate by transaction ID.
BitcoinDatabase starts at $49 a month on Developer with one year of history over REST, and Growth at $199 a month adds full address history from 2009 over REST and SQL over the indexed chain, which is where multi-hop tracing across a block range becomes one query. Investigation platforms that add case management and attribution usually quote through sales rather than a public price list.
It should not, and forgetting this is the single most common error in on-chain flow numbers. Most Bitcoin transactions send the bulk of their value straight back to the sender as change. We measured one block where raw output volume was 10,285.76 BTC but only 2,113.47 BTC, about 20.55 percent, actually left the sender, an overstatement of 4.87 times. Six days earlier the same method gave 17.03 times on a different block.
Partly, and by design. CoinJoin and PayJoin deliberately break the common input ownership assumption that most clustering relies on, so inputs in one transaction no longer imply a single owner. Mixers, exchange hot wallets and Lightning channels all break the chain of custody in different ways. Flow analysis stays useful, but treat it as evidence to weigh, not proof.
Flow analysis follows value between addresses; clustering groups addresses believed to share an owner. You generally need both, because tracing address by address produces noise once change addresses proliferate, and clustering is what collapses that back into entities. Clustering is heuristic, so its output carries uncertainty that then propagates into any flow number built on top of it.
It is used as evidence, but it is not self-proving. The chain shows that outputs moved; it does not show who controlled the keys, whether a transfer was a payment or an internal rebalance, or whether an address label is correct. Courts and regulators treat it as one input alongside subpoenaed exchange records. Anyone presenting a flow diagram as proof of intent is overstating what the data supports.
Yes. US agencies including the FBI and IRS Criminal Investigation follow Bitcoin flows on the same public ledger with the same clustering techniques, usually through commercial tooling. The step that turns a trace into a name is off chain: legal process served on the exchange where the funds landed, which holds the identity records collected at signup.
Traced, almost always. Recovered, much less often. The coins stay visible forever, so a competent trace usually shows where they went, and funds that reach a compliant exchange can sometimes be frozen while law enforcement acts. Anyone promising guaranteed recovery for an upfront fee is a second scam. We provide on-chain data and do not recover funds.
All the way to where the coins were mined. Nothing in the protocol expires or prunes history, so a coin created in 2011 can be followed across every hop it has taken. The practical limit is fan-out: trace backward far enough and each hop branches into more parents until the paths stop meaning anything.

Explore more

More ways to query Bitcoin with BitcoinDatabase

Stop running a node. Just query Bitcoin.

Run your first query now and get on-chain data back by REST API, SQL or dashboard, with address history back to the genesis block over REST. Informational on-chain data only, not financial advice.

See pricing

History from genesis over REST · SQL · dashboards · addresses, transactions, UTXOs, metrics