Query the chain · Cost basis
Bitcoin cost basis API for cost basis distribution and URPD
The on-chain cost basis of a bitcoin is the price it last moved at: the value it carried the day it was created as an unspent output. Roll that up across the whole supply and you get the cost basis distribution, a histogram of how many coins last changed hands at each price level, sometimes called the UTXO realized price distribution or URPD. The Bitcoin cost basis API computes it from the fully-indexed chain. BitcoinDatabase timestamps every UTXO to the block it was created in, values it against historical market data, and buckets the supply into cost basis bands so you can see where coins were acquired.
Pull the current distribution over REST for a chart, or run SQL to band the supply your own way, measure how much supply sits above or below a price, or join cost basis against realized price and other metrics you already query here. Because the UTXOs, their timestamps and the price series live in one schema, every band traces back to the exact coins behind it rather than a black-box aggregate. This is informational on-chain data and analytics for research, not a valuation, a trading signal, or investment advice.
REST API · SQL · dashboards · indexed from genesis
Hit Run to query the fully-indexed Bitcoin blockchain.
BTC
30-day trend
informational on-chain data · not financial advice
Indexed from genesis queryable in seconds
On-chain data not financial advice
Why it works
What you get with cost basis
Supply by cost basis band
Bucket the whole circulating supply by the price each coin last moved at, so you can read the cost basis distribution (URPD) directly: how much supply sits at each price level, computed from timestamped UTXOs on the indexed chain.
Above or below any price
Ask how much of the supply is in profit or loss relative to a given price, or how much last moved inside a price range, as a single query rather than reconstructing the whole UTXO set and a price feed yourself.
Trace every band to its coins
A distribution is only useful if you can check it. Because cost basis, UTXOs and prices share one schema, every band drills down to the individual outputs behind it, so an analyst can audit a cluster instead of trusting a chart.
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.
- Query the cost basis distribution (URPD) of the supply
- Band circulating supply by acquisition price
- Measure supply in profit or loss at a given price
- Join cost basis against realized price and MVRV
- Trace any cost basis band to its underlying UTXOs
{
"address": "bc1qxy2k…l0wdv8",
"balance_btc": 68432.10,
"balance_usd": 4612165420,
"tx_count": 1284,
"unspent_outputs": 37,
"first_seen": "2014-02-09"
}
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 our SDKs.
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 cost basis
Explore more
More ways to query Bitcoin with BitcoinDatabase
Bitcoin API
Query addresses, transactions and balances across the whole indexed chain in one call.
Learn moreBitcoin block explorer API
Power an explorer with blocks, transactions and addresses, no node to maintain.
Learn moreBitcoin address lookup
Look up any Bitcoin address: balance, full history and UTXOs in one query.
Learn moreStop running a node. Just query Bitcoin.
Run your first query now and get on-chain data back by REST API, SQL or dashboard, indexed from the genesis block. Informational on-chain data only, not financial advice.
Indexed from genesis · REST · SQL · dashboards · addresses, transactions, UTXOs, metrics