Bitcoin Explorer API
Blocks, transactions and addresses for Bitcoin, Litecoin, Zcash, Decred and Monero as JSON, from the same indexes as this site. Every chain shares the same envelope and the same /status; what a transaction contains follows the chain's own model, which status.family names — see chain families.
Quick start
- Create an account and an API key at https://account.olenza.io. The same key works for Olenza Node RPC and the Explorer API.
- Send the key in the
X-API-Keyheader:
curl -H "X-API-Key: YOUR_KEY" https://explorer.olenza.io/api/v1/btc/status
An Authorization: Bearer YOUR_KEY header also works. Keys are never accepted in the URL: URLs end up in logs.
Machine-readable: OpenAPI 3.1 description · Full docs: olenza.io/docs (markdown)
Chains do not all work the same way
A Bitcoin transaction consumes outputs and creates new ones. A Monero transaction hides its amounts and recipients on purpose. Forcing both into one shape would mean lying about one of them, so this API has two shapes and /status says which one a chain answers with, in family:
family | Chains | What a transaction looks like | Addresses |
|---|---|---|---|
utxo | btc ltc zec dcr | Inputs and outputs, each with an amount and addresses | Balance, history, unspent outputs |
ring | xmr | Key images, the ring each input hides in, one-time output keys. Amounts appear only where the protocol makes them public | None. A Monero address never appears on the chain |
An endpoint a chain's family does not have answers 404 NOT_ON_THIS_CHAIN and says why. It is a fact about the chain, not a failure.
Basics
- Base URL:
https://explorer.olenza.io/api/v1/{chain}/…— chain isbtc(Bitcoin) orltc(Litecoin) orzec(Zcash) ordcr(Decred) orxmr(Monero). - Amounts are strings in the coin's smallest unit (for example zatoshi, litoshi). Divide by 10decimals —
decimalsis in/status. Strings, because some chains' totals do not fit a 64-bit integer and JavaScript loses precision above 253. - A field that does not apply to a chain is left out, never
null. On a Monero transaction a missing amount means hidden, not zero. - Paging:
pageandpage_size. GET, except the one endpoint that takes a secret (Monerooutputs/check, aPOST). Answers areapplication/json.
Limits
The API is free. Every call counts as one unit against your key's daily and monthly limits, whatever the endpoint, and once against the per-second rate limit. The Explorer API has its own limits, separate from Olenza Node: using up one does not touch the other. See limits.
Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the burst refills, not a timestamp), and — where daily and monthly limits apply — X-Quota-Daily-Remaining and X-Quota-Monthly-Remaining in units. Every response, success or error, also carries X-Request-Id — a unique id for the request; quote it if you need support. Calls the explorer fails to answer (5xx) are not counted, except 504 UPSTREAM_TIMEOUT, which counts like any call that runs past the time limit; a 404 for something that does not exist is an answer and counts.
Errors
{"error": {"reason": "NOT_FOUND", "message": "transaction not found"}}
| HTTP | reason | Meaning |
|---|---|---|
| 400 | BAD_REQUEST | Malformed height, hash, address or parameter. |
| 401 | MISSING_API_KEY, INVALID_API_KEY | No key, or not a valid key. |
| 403 | KEY_REVOKED, ACCOUNT_SUSPENDED, CHAIN_NOT_IN_PLAN | The key or account cannot use this. |
| 404 | NOT_FOUND | No such block, transaction or address. |
| 404 | CHAIN_NOT_FOUND, ENDPOINT_NOT_FOUND | Unknown chain or path. |
| 404 | NOT_ON_THIS_CHAIN | This chain's family has no such thing — see the table above. |
| 429 | RATE_LIMITED, DAILY_QUOTA_EXCEEDED, MONTHLY_QUOTA_EXCEEDED, KEY_DAILY_QUOTA_EXCEEDED, TOO_MANY_CONCURRENT, TOO_MANY_INVALID_KEYS | Slow down; Retry-After says for how long. |
| 503 | GATEWAY_BUSY | We are at capacity; retry after Retry-After seconds. |
| 502, 503, 504 | UPSTREAM_ERROR, SERVICE_UNAVAILABLE, UPSTREAM_TIMEOUT | Our side; not counted unless the call ran past the time limit. Retry shortly. |
Endpoints
These are the endpoints of the utxo family — pick another chain below to see another family's. Samples are live answers from Bitcoin, lists cut to two items. Show samples from: Bitcoin Litecoin Zcash Decred Monero
GET /{chain}/status
Chain tip, sync state, the coin's symbol and decimals, mempool size, and `family` — which shape this chain's answers take.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/status"
Sample response
{
"best_hash": "00000000000000000000d541103f1d49fd6b0e382efbbbabfc5b4093dea4b5c5",
"chain": "btc",
"decimals": 8,
"difficulty": 148364561003867.4,
"family": "utxo",
"height": 974850,
"in_sync": true,
"mempool_count": 2339,
"name": "Bitcoin",
"node_version": "/Satoshi:27.1.0/",
"symbol": "BTC"
}
GET /{chain}/blocks
Latest blocks, newest first.
limit— 1 to 25 (default 10)start— height to start from (default: the tip)
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/blocks?limit=2"
Sample response
[
{
"hash": "00000000000000000000d541103f1d49fd6b0e382efbbbabfc5b4093dea4b5c5",
"height": 974850,
"size": 3401936,
"time": 1793995281,
"tx_count": 928
},
{
"hash": "000000000000000000013d678d24d81221a0feb77b0b6abb0f30e0c9080b1b57",
"height": 974849,
"size": 2025964,
"time": 1793995294,
"tx_count": 2501
}
]
GET /{chain}/block/{height|hash}
One block's header and transaction count.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/block/974840"
Sample response
{
"bits": "1701e5ac",
"confirmations": 11,
"difficulty": 148364561003867.4,
"hash": "0000000000000000000196af917e27b5f70df2b35925f1918d8946857366bf02",
"height": 974840,
"merkle_root": "684bf47744d3d87b4f6645020d3aec150ad829c55b71e4dae52b8dace09233da",
"next_hash": "0000000000000000000168178c18d65e36393837da61b859446195da3d0706d9",
"nonce": "447039720",
"previous_hash": "0000000000000000000157bed2ccb8b9ea0951b7040479c74f18b4062894d024",
"size": 1525434,
"time": 1793991435,
"tx_count": 2585,
"version": 624091136
}
GET /{chain}/block/{height|hash}/txs
A block's transactions, in block order.
page— page number, from 1 (default 1)page_size— 1 to 50 (default 25)
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/block/974840/txs?page_size=1"
Sample response
{
"page": 1,
"total_pages": 2585,
"tx_count": 2585,
"txs": [
{
"block_hash": "0000000000000000000196af917e27b5f70df2b35925f1918d8946857366bf02",
"block_height": 974840,
"coinbase": true,
"confirmations": 11,
"time": 1793991435,
"txid": "2571424dc55f6a1f382f151c8afca185517beb650a8fd49279a20b78484710d2",
"value_out": "316145131",
"vin": [
{
"n": 0,
"vout": 0
}
],
"vout": [
{
"addresses": [
"1PuJjnF476W3zXfVYmJfGnouzFDAXakkL4"
],
"n": 0,
"value": "316145131"
},
{
"n": 1,
"type": "nulldata",
"value": "0"
}
],
"vsize": 344
}
]
}
GET /{chain}/tx/{txid}
One transaction with every input resolved: input values and addresses, total in, fee.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/tx/e86ca56fb0f04074b185777918fcc5308bef062e4067cc4944086e3f22c44b22"
Sample response
{
"block_hash": "0000000000000000000196af917e27b5f70df2b35925f1918d8946857366bf02",
"block_height": 974840,
"confirmations": 11,
"fee": "6976",
"size": 837,
"time": 1793991435,
"txid": "e86ca56fb0f04074b185777918fcc5308bef062e4067cc4944086e3f22c44b22",
"value_in": "71899991",
"value_out": "71893015",
"version": 2,
"vin": [
{
"addresses": [
"1FsUAfT335XzjkmuHUGFdFsDcCmTL7oVX2"
],
"n": 0,
"sequence": 4294967293,
"txid": "79407f445e02a65742aba9abe268b08cd5151a73b71cc2c29b3d16baa38c5087",
"value": "71899991",
"vout": 24
}
],
"vout": [
{
"addresses": [
"12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo"
],
"n": 0,
"script_hex": "76a9140fc1458a872c85379d44d26be1c8e1f2e62ce8c688ac",
"value": "12123"
},
{
"addresses": [
"bc1qlxwv4xhuymu00fhklwc8a97ky04k7mt6mcsym9"
],
"n": 1,
"script_hex": "0014f99cca9afc26f8f7a6f6fbb07e97d623eb6f6d7a",
"value": "15583"
}
],
"vsize": 837
}
GET /{chain}/address/{address}
Balance, total received and sent, transaction count.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/address/12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo"
Sample response
{
"address": "12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo",
"balance": "76649",
"received": "876726",
"sent": "800077",
"tx_count": 48
}
GET /{chain}/address/{address}/txs
An address's transactions, newest first.
page— page number, from 1 (default 1)page_size— 1 to 50 (default 25)
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/address/12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo/txs?page_size=1"
Sample response
{
"page": 1,
"total_pages": 48,
"tx_count": 48,
"txs": [
{
"block_hash": "0000000000000000000196af917e27b5f70df2b35925f1918d8946857366bf02",
"block_height": 974840,
"confirmations": 11,
"fee": "6976",
"size": 837,
"time": 1793991435,
"txid": "e86ca56fb0f04074b185777918fcc5308bef062e4067cc4944086e3f22c44b22",
"value_in": "71899991",
"value_out": "71893015",
"version": 2,
"vin": [
{
"addresses": [
"1FsUAfT335XzjkmuHUGFdFsDcCmTL7oVX2"
],
"n": 0,
"sequence": 4294967293,
"txid": "79407f445e02a65742aba9abe268b08cd5151a73b71cc2c29b3d16baa38c5087",
"value": "71899991",
"vout": 24
}
],
"vout": [
{
"addresses": [
"12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo"
],
"n": 0,
"script_hex": "76a9140fc1458a872c85379d44d26be1c8e1f2e62ce8c688ac",
"value": "12123"
},
{
"addresses": [
"bc1qlxwv4xhuymu00fhklwc8a97ky04k7mt6mcsym9"
],
"n": 1,
"script_hex": "0014f99cca9afc26f8f7a6f6fbb07e97d623eb6f6d7a",
"value": "15583"
}
],
"vsize": 837
}
]
}
GET /{chain}/address/{address}/utxo
Unspent outputs of an address — at most 1000, the largest first when there are more; count says how many there are.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/address/12SJfdMU9D4zCcsUB6vixN53FDS8dhmZfo/utxo"
Sample response
{
"count": 4,
"truncated": false,
"utxos": [
{
"confirmations": 11,
"height": 974840,
"txid": "e86ca56fb0f04074b185777918fcc5308bef062e4067cc4944086e3f22c44b22",
"value": "12123",
"vout": 0
},
{
"confirmations": 274,
"height": 974577,
"txid": "db6da6b40f08dd6a341bb01c61332faf1b877488dbd728850cb5ead015028c54",
"value": "16104",
"vout": 2
}
]
}
GET /{chain}/mempool
Transactions waiting to be mined: `count` and `bytes` (virtual bytes where `vsize` is true), then one page of `txs`, each with `size`, `fee` in the smallest unit and `time` it arrived, newest first (`order`: `newest`, or `node` when a very large pool is listed in the node's own order). On Decred each also has `type`: regular, ticket, vote, revocation, treasury_add, treasury_spend. Zcash answers `txids` only, without paging.
page— page number, from 1 (default 1)page_size— 1 to 50 (default 25)
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/mempool"
Sample response
{
"bytes": 1039797,
"count": 2346,
"listed": 2346,
"order": "newest",
"page": 1,
"total_pages": 94,
"txids": [
"38546403566a89df582cc29752202f06d41d147bdfb1059f3a6d5b6c3c112a98",
"65b7b0f321032c6db675afb868d44404497c74ab693bd2a8dbb91c6930e257e4"
],
"txs": [
{
"fee": "467",
"size": 138,
"time": 1793995909,
"txid": "38546403566a89df582cc29752202f06d41d147bdfb1059f3a6d5b6c3c112a98"
},
{
"fee": "1230",
"size": 245,
"time": 1793995909,
"txid": "65b7b0f321032c6db675afb868d44404497c74ab693bd2a8dbb91c6930e257e4"
}
],
"vsize": true
}
GET /{chain}/search/{query}
What a height, hash, txid or address is: block, tx, address or none.
curl -H "X-API-Key: YOUR_KEY" "https://explorer.olenza.io/api/v1/btc/search/974840"
Sample response
{
"hash": "0000000000000000000196af917e27b5f70df2b35925f1918d8946857366bf02",
"height": 974840,
"kind": "block"
}