Skip to main content

Bitcoin Coinpath API

Coinpath walks Bitcoin fund flows between addresses — forward to see where funds went, backward to see where they came from. Use it for AML investigations, source-of-funds verification, exchange deposit tracing, and mapping transaction paths across wallets.

Endpoint

Bitcoin GraphQL queries are served at https://graphql.bitquery.io.

Trace outbound fund flow from a Bitcoin address

Returns direct recipients of an address with USD amounts, block heights, and transaction hashes. The seed option controls the starting point for repeated runs when you want consistent samples. Run query.

{
bitcoin(network: bitcoin) {
coinpath(
initialAddress: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"}
date: {after: "2023-10-10"}
options: {limit: 10, asc: "block.height", seed: 10}
) {
amount(in: USD)
block {
height
}
sender {
address
}
receiver {
address
}
transaction {
hash
}
currency {
name
address
}
}
}
}

For multi-hop tracing, add depth: {lteq: N} (typically 3–5; deeper for forensic work). Switch direction with options: {direction: inbound} to walk backward instead.

Track all incoming fund paths to a Bitcoin address

Use the receiver filter to see who sent BTC to a specific wallet. Returns sender addresses, USD amounts, and transaction hashes — the standard "who funded this wallet?" query.

query ($network: BitcoinNetwork!) {
bitcoin(network: $network) {
coinpath(
date: {after: "2023-10-10"}
options: {limit: 10, desc: "block.height"}
receiver: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"}
) {
amount(in: USD)
block {
height
}
sender {
address
}
receiver {
address
}
transaction {
hash
}
}
}
}

Swap receiver for sender to trace outflows instead, or add initialAddress to find paths between two specific addresses.

Verify a path between two specific Bitcoin addresses

Combine initialAddress and receiver to check whether BTC moved from address A to address B — useful for chain-of-custody verification and direct flow auditing.

query ($network: BitcoinNetwork!) {
bitcoin(network: $network) {
coinpath(
date: {after: "2023-10-10"}
options: {limit: 10, desc: "block.height"}
receiver: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"}
initialAddress: {is: "bc1pu349c0fvmqnv5s0aj3aracrsvn696hzhuyyukn6r5c9h03y88plql53h5h"}
) {
amount(in: USD)
block {
height
}
sender {
address
}
receiver {
address
}
transaction {
hash
}
}
}
}

Raise limit for more rows and add depth: {lteq: N} to follow multi-hop paths between the two addresses.

Video tutorial: tracing Bitcoin fund flows