# Bitcoin Wallet & Transaction Tracer - Fund Flow Graph (`centorprat/bitcoin-wallet-transaction-tracer`) Actor

Give Bitcoin addresses or transaction ids. Reads the public blockchain (keyless) and returns a follow-the-money brief: balance, total received/sent, ranked senders & recipients, a multi-hop fund-flow graph, and behavioural patterns. Read-only, agent-callable.

- **URL**: https://apify.com/centorprat/bitcoin-wallet-transaction-tracer.md
- **Developed by:** [Centor Prat](https://apify.com/centorprat) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $17.00 / 1,000 address or transaction traceds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bitcoin Wallet & Transaction Tracer — Fund Flow Graph

Follow the money on the public Bitcoin blockchain. Give one or more Bitcoin **addresses** (or **transaction ids**) and get back a structured "where did the funds come from / where did they go" brief: balance and lifetime totals, the ranked **senders and recipients**, a **multi-hop fund-flow graph**, and behavioural **patterns** (consolidation, peeling, high-velocity, dormant). Keyless, read-only, public ledger only — agent-callable.

For compliance / AML analysts, on-chain researchers, journalists, and AI agents doing blockchain investigation at scale.

### What it does

- Reads the **public** Bitcoin ledger via keyless explorer APIs (Blockstream Esplora, with mempool.space fallback) — no API key, no login.
- Builds a per-address wallet summary and nets out who funded it and where it sent funds.
- Expands the top counterparties into a **multi-hop flow graph** (nodes + directed, valued edges) so you can see the path of funds, not just one transaction.
- Flags behavioural patterns an analyst looks for.

| Output field | Meaning |
|---|---|
| `balanceBtc` / `balanceSats` | current balance |
| `totalReceivedBtc` / `totalSentBtc` | lifetime in / out |
| `txCount` / `txsAnalyzed` | total txs vs the most-recent window analysed |
| `topSenders[]` / `topRecipients[]` | counterparties ranked by value (address + BTC) |
| `flowGraph` | `nodes[]` + `edges[]` (`from`, `to`, `direction`, `valueBtc`, `hop`) |
| `patterns[]` | consolidation / peeling-chain / high-velocity / dormant signals |
| `signal` | active / idle / emptied / unused / not-found |
| (tx mode) `inputs[]` / `outputs[]` / `feeBtc` | full transaction breakdown |

### Why not just ask an AI agent?

An agent can look up one address balance. It **can't** cheaply fetch dozens of transactions, net the counterparties by value across them, walk the top counterparties out several hops into a consistent graph, and detect peeling/consolidation patterns — deterministically, every time. That bounded graph traversal and aggregation at scale is exactly what this actor does for you.

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `addresses` | array of strings | one of these | Bitcoin addresses (bc1… / 1… / 3…). |
| `transactionIds` | array of strings | one of these | Transaction ids (64 hex) to break down. |
| `hops` | integer (1–3) | | Fund-flow graph depth. 1 = direct counterparties. |
| `maxCounterparties` | integer (1–10) | | Top senders/recipients kept per address. |
| `webhookUrl` | string | | POST the finished traces here as JSON. |

**Example input**

```json
{
  "addresses": ["1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"],
  "hops": 1,
  "maxCounterparties": 5
}
```

### Output

One record per address / transaction. **Example output** (trimmed, real run):

```json
{
  "id": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
  "type": "address",
  "signal": "active",
  "balanceBtc": 57.66512665,
  "totalReceivedBtc": 57.66512665,
  "totalSentBtc": 0.0,
  "txCount": 66959,
  "txsAnalyzed": 27,
  "uniqueSenders": 18,
  "topSenders": [
    {"address": "bc1pge0tgdp5c9wmjlq3ge694fne4jterr773u9amv0m4jum2cxa255s3r7k2j", "valueBtc": 0.00189895}
  ],
  "flowGraph": {
    "nodeCount": 4, "edgeCount": 3, "hops": 1,
    "edges": [
      {"from": "bc1pge0tgdp...255s3r7k2j", "to": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "direction": "in", "valueBtc": 0.00189895, "hop": 1}
    ]
  },
  "patterns": [],
  "disclaimer": "Public blockchain data only. Traced flows and patterns are signals to review, not proof of ownership, identity, or wrongdoing."
}
```

### Use cases

- **AML / compliance triage** — see an address's counterparties and flow before onboarding or paying it.
- **Incident response** — trace where stolen/scammed funds moved across hops.
- **Journalism & research** — document the public money trail of a wallet or transaction.
- **AI investigation agents** — one call returns a structured flow graph to reason over.

### Ready-made tasks

- [Bitcoin Address Trace - Where Did the Funds Go?](https://apify.com/centorprat/bitcoin-wallet-transaction-tracer/examples/bitcoin-address-trace)

### For AI agents / MCP

Every public Apify actor is callable through the Apify MCP server.

```
https://mcp.apify.com/?tools=actors,docs,centorprat/bitcoin-wallet-transaction-tracer
```

Loads as the tool `centorprat--bitcoin-wallet-transaction-tracer`. Claude Code:

```
claude mcp add apify -- npx -y @apify/actors-mcp-server --actors centorprat/bitcoin-wallet-transaction-tracer
```

### Alerts / scheduling

Set `webhookUrl` and schedule the actor to re-trace a watched address — the fresh brief is POSTed to Make/Zapier/your endpoint, so you're notified when a wallet moves funds.

### FAQ

**Which chains?** Bitcoin (mainnet). Addresses in bech32 (`bc1…`) and base58 (`1…`, `3…`), plus transaction ids.

**Does it need an API key?** No — it reads public explorer APIs anonymously.

**How many transactions does it analyse?** The most recent ~25–50 per address (a brief, not a full re-index); `txsAnalyzed` and a `note` tell you when an address has more history than the window.

**How deep can it trace?** Up to 3 hops, bounded for speed (a safety cap on nodes per trace).

**Does it identify who owns an address?** No. It reports only public on-chain flows and patterns as **signals to review** — never an identity or an accusation of wrongdoing.

**Is this legal?** It reads the public Bitcoin ledger, which is open by design. No private data, no keys, no deanonymisation.

**Values in BTC or satoshis?** Both — `*Btc` fields and `*Sats` fields.

**How fast?** A couple of seconds for 1 hop; a few seconds for deeper graphs.

**Cost?** Pay-per-event, one charge per address/transaction successfully traced. Invalid/not-found inputs aren't billed.

### Data & attribution

All data is the public Bitcoin blockchain, read via the keyless Blockstream Esplora API (mempool.space fallback). No keys, no personal data. Results are computed signals, not financial, legal, or compliance advice.

### Related actors

- [Crypto Address Risk & AML Screener](https://apify.com/centorprat/crypto-address-risk-aml-screener)
- [Sanctions & Watchlist Screening](https://apify.com/centorprat/sanctions-watchlist-screening)

# Actor input Schema

## `addresses` (type: `array`):

Bitcoin addresses to trace (bc1... / 1... / 3...). One wallet brief per address.

## `transactionIds` (type: `array`):

Bitcoin transaction ids (64 hex chars) to break down into inputs/outputs and fee.

## `hops` (type: `integer`):

How many hops to expand the fund-flow graph (1 = direct counterparties, up to 3). More hops = deeper trace, a few seconds longer.

## `maxCounterparties` (type: `integer`):

How many top senders/recipients (by value) to keep per address.

## `webhookUrl` (type: `string`):

If set, the finished traces are POSTed here as JSON when the run completes.

## Actor input object example

```json
{
  "addresses": [
    "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  ],
  "hops": 1,
  "maxCounterparties": 5
}
```

# Actor output Schema

## `traces` (type: `string`):

One brief per address or transaction: balances, total received/sent, ranked senders and recipients, a multi-hop fund-flow graph (nodes + edges), behavioural patterns, and a signal. All from the public blockchain.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "addresses": [
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
    ],
    "hops": 1,
    "maxCounterparties": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("centorprat/bitcoin-wallet-transaction-tracer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "addresses": ["1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"],
    "hops": 1,
    "maxCounterparties": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("centorprat/bitcoin-wallet-transaction-tracer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "addresses": [
    "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  ],
  "hops": 1,
  "maxCounterparties": 5
}' |
apify call centorprat/bitcoin-wallet-transaction-tracer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,centorprat/bitcoin-wallet-transaction-tracer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/V2BGeObuxSYrTChmw/builds/bAeoLcTUFhTUyiqXQ/openapi.json
