canonical: https://jentic.com/apis/blockchain.com/blockchain

# Blockchain Data API

Jentic publishes the only available OpenAPI specification for Blockchain Data API, keeping it validated and agent-ready. The Blockchain.com Data API exposes read-only access to the Bitcoin network, returning raw block, transaction, and address records along with mempool state, mining pool stats, network difficulty, and historical chart data. It also includes a fiat exchange ticker that converts between BTC and major currencies. Authentication is optional - endpoints are publicly accessible, with a query-string api_code unlocking higher rate limits.

## For AI agents

Look up Bitcoin blocks, transactions, addresses, balances, exchange rates, and network statistics directly from the Blockchain.com data feed.

## Scope

Does not broadcast transactions, manage wallets, or execute trades - use for read-only Bitcoin blockchain data and exchange rate lookup only.

## Capabilities

- Fetch raw block, transaction, or address records by hash, height, or wallet identifier
- Resolve a Bitcoin address to its current balance, total received, and total sent
- Stream the unconfirmed transaction pool to monitor pending mempool activity
- Convert between BTC and fiat currencies using the live exchange ticker
- Query network statistics including hash rate, difficulty, and block count
- Pull historical chart data for metrics like market price, transaction volume, and miner revenue
- List active Bitcoin mining pools and their relative share of recent blocks

## Use cases

### Wallet balance lookup

Resolve a Bitcoin wallet address to its current balance, total received, and total sent without running a full node. The Blockchain Data API serves this via a single GET on /rawaddr/{address} or the lightweight /q/addressbalance/{address} endpoint, which returns the value in satoshis. This is suitable for portfolio dashboards, custody reconciliation, and treasury monitoring where on-chain state must be checked at most every block.

Example prompt: Call GET /rawaddr/{address} for a given Bitcoin address and return the final_balance in BTC along with the most recent five transaction hashes.

### Fiat-to-BTC conversion

Convert between BTC and major fiat currencies using a live exchange ticker. The /ticker endpoint returns 15m, last, buy, sell, and 24h prices for currencies including USD, EUR, GBP, and JPY, while /tobtc converts a fiat amount to its equivalent in BTC at the current rate. Use this to price products in BTC at checkout, generate invoices, or compute fiat-denominated portfolio values.

Example prompt: Call GET /tobtc?currency=USD&value=100 to convert 100 USD to BTC at the current exchange rate and return the BTC amount.

### Mempool and transaction monitoring

Watch the unconfirmed transaction pool to detect incoming payments before they are mined into a block. The /unconfirmed-transactions endpoint streams pending transactions, and /rawtx/{hash} returns the full transaction record once a hash is known. This pattern supports zero-confirmation payment notifications, fraud detection, and on-chain analytics dashboards.

Example prompt: Poll GET /unconfirmed-transactions every 30 seconds and alert when a transaction with output address bc1q... appears.

### Network statistics for analytics

Pull current and historical Bitcoin network metrics - hash rate, difficulty, block count, average transaction fees, and miner revenue. The /stats endpoint returns a single snapshot, while /charts/{chartName} returns time-series data for over 30 named metrics. Use this to populate research dashboards, write market commentary, or feed quantitative trading models.

Example prompt: Call GET /charts/hash-rate?timespan=1year and return the daily hash rate values formatted as a CSV.

### AI agent on-chain research

Let an AI agent answer Bitcoin research questions by combining address, transaction, and statistic endpoints through Jentic. The agent searches Jentic for the right operation by intent (e.g. 'check a Bitcoin address balance'), loads the schema, and executes the call with the api_code held in your Jentic One instance. No node operation, no manual auth handling, no docs reading.

Example prompt: Search Jentic for 'check a Bitcoin address balance', load the schema for the matching Blockchain.com operation, and execute it for address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /rawaddr/{address} | Get balance and transactions for a Bitcoin address |
| GET | /rawtx/{hash} | Fetch a transaction by hash |
| GET | /rawblock/{hash} | Fetch a block by hash |
| GET | /latestblock | Return the most recent block |
| GET | /unconfirmed-transactions | Stream pending mempool transactions |
| GET | /ticker | Get live BTC prices in major fiat currencies |
| GET | /tobtc | Convert a fiat amount to BTC at the current rate |
| GET | /charts/{chartName} | Return historical time-series for a named network metric |

## Key resources

- **Blocks** — Retrieve raw block data by hash or height, list blocks for a day or pool, and query the latest block
- **Transactions** — Fetch raw transaction records by hash and stream unconfirmed mempool transactions
- **Addresses** — Look up balance, transaction history, total received and total sent for a Bitcoin address or multi-address group
- **Exchange Rates** — Get live BTC ticker prices in major fiat currencies and convert fiat amounts to BTC
- **Charts** — Pull historical time-series data for over 30 network metrics including hash rate, difficulty, and price
- **Query** — Lightweight single-value endpoints for difficulty, block count, address balance, and other quick lookups

## Why Jentic

- **Setup:** Wiring the Blockchain.com Data API by hand means handling the optional api_code query parameter and the read-only Bitcoin and rate endpoints yourself. Through Jentic you install once, import Blockchain.com from the API Directory, store the api_code once, and your agent calls it.
- **Permission scoping:** The Blockchain.com data endpoints put the address, hash, or chart name in the URL path (/rawaddr/{address}, /rawtx/{hash}) and are read-only, so scope the agent to the lookups it needs, such as reading an address, a transaction, or the ticker. You choose that set, and there are no write, broadcast, or wallet operations to grant.
- **Credential handling:** Your optional Blockchain.com api_code is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'check a Bitcoin address balance' or 'get the current BTC ticker', and Jentic returns the matching Blockchain.com operation with its input schema so the agent calls the right endpoint without browsing the docs site.

## Related APIs

- **Blockfrost** — Blockfrost provides equivalent on-chain data access for Cardano rather than Bitcoin
- **Blockchain Data API** — Same API - listed for self-reference
- **Blynk** — IoT device platform - pair with Blockchain Data API when building hardware that reacts to on-chain events

## FAQ

### Why is there no official OpenAPI spec for Blockchain Data API?

Blockchain.com does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Blockchain Data API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Blockchain Data API use?

Authentication is optional. Endpoints are publicly accessible, but you can pass an api_code as a query-string parameter to unlock higher rate limits. When called through Jentic, the api_code is stored in your Jentic One instance and injected at execution time, so the agent never sees the raw value.

### Can I look up Bitcoin address balances with this API?

Yes. Call GET /rawaddr/{address} for a full address record including balance, total received, total sent, and transactions, or GET /q/addressbalance/{address} for just the satoshi balance. Both accept legacy, SegWit, and bech32 addresses.

### What are the rate limits for the Blockchain Data API?

The unauthenticated tier is throttled at the IP level, with documented guidance of roughly 1 request per 10 seconds for the heavier raw endpoints. Requesting an api_code from Blockchain.com support raises this limit; the exact ceiling depends on the tier granted.

### How do I monitor incoming Bitcoin payments through Jentic?

Search Jentic for 'monitor unconfirmed Bitcoin transactions', load the schema for the matching /unconfirmed-transactions operation, and execute it on a polling loop. The Jentic SDK call is await client.execute(ExecutionRequest(...)) and returns a list of pending transactions you can filter by output address.

### Does this API support querying historical Bitcoin charts?

Yes. Call GET /charts/{chartName} with names like hash-rate, difficulty, market-price, transactions-per-second, or miners-revenue. Use the timespan parameter (e.g. 30days, 1year, all) to control the window returned.

### Is the Blockchain Data API free?

Yes, basic access is free and unauthenticated. Higher rate limits require an api_code, which Blockchain.com issues on request - there is no published paid tier as of this spec.

### Can I limit what my agent is allowed to do with the Blockchain Data API?

Yes. Because you run Jentic One yourself, your own rules decide which operations the agent may call, so you can grant only the read-only lookups it needs, such as reading an address with GET /rawaddr/{address}, a transaction with GET /rawtx/{hash}, or the exchange ticker with GET /ticker. Every endpoint here is read-only with the address, hash, or chart name in the URL path, and there are no write, broadcast, or wallet operations to hand over. Your optional api_code is held by your own instance and injected at execution time, so the agent never sees the raw value and only reaches the operations you have allowed.
