Meta Data
Asset Registry db
Esplora HTTP API
JSON over RESTful HTTP. Amounts are always represented in satoshis.
The blockstream.info public APIs are available at:
Bitcoin blockstream.info/api/ Bitcoin Testnet testnet/api
For example:
$ curl [curl](https://blockstream.info/api/blocks/tip/hash) api/blocks/tip/hashYou can also self-host the Esplora API server, which provides better privacy and security.## TransactionsGET /tx/:txidReturns information about the transaction.Available fields: txid, version, locktime, size, weight, fee, vin, vout and status (see transaction format for details).GET /tx/:txid/statusReturns the transaction confirmation status.Available fields: confirmed (boolean), block_height (optional) and block_hash (optional).GET /tx/:txid/hexGET /tx/:txid/rawReturns the raw transaction in hex or as binary data.GET /tx/:txid/merkleblock-proofReturns a merkle inclusion proof for the transaction using bitcoind's merkleblock format.Note: This endpoint is not currently available for Liquid/Elements-based chains.GET /tx/:txid/merkle-proofReturns a merkle inclusion proof for the transaction using Electrum's blockchain.transaction.get_merkle format.GET /tx/:txid/outspend/:voutReturns the spending status of a transaction output.Available fields: spent (boolean), txid (optional), vin (optional) and status (optional, the status of the spending tx).GET /tx/:txid/outspendsReturns the spending status of all transaction outputs.POST /txBroadcast a raw transaction to the network.The transaction should be provided as hex in the request body. The txid will be returned on success.## AddressesGET /address/:addressGET /scripthash/:hashGet information about an address/scripthash.Available fields: address/scripthash, chain_stats and mempool_stats.{chain,mempool}_stats each contain an object with tx_count, funded_txo_count, funded_txo_sum, spent_txo_count and spent_txo_sum.Elements-based chains don't have the {funded,spent}_txo_sum fields.GET /address/:address/txsGET /scripthash/:hash/txsGet transaction history for the specified address/scripthash, sorted with newest first.Returns up to 50 mempool transactions plus the first 25 confirmed transactions. You can request more confirmed transactions using :last_seen_txid(see below).GET /address/:address/txs/chain[/:last_seen_txid]GET /scripthash/:hash/txs/chain[/:last_seen_txid]Get confirmed transaction history for the specified address/scripthash, sorted with newest first.Returns 25 transactions per page. More can be requested by specifying the last txid seen by the previous query.GET /address/:address/txs/mempoolGET /scripthash/:hash/txs/mempoolGet unconfirmed transaction history for the specified address/scripthash.Returns up to 50 transactions (no paging).GET /address/:address/utxoGET /scripthash/:hash/utxoGet the list of unspent transaction outputs associated with the address/scripthash.Available fields: txid, vout, value and status (with the status of the funding tx).Elements-based chains have a valuecommitment field that may appear in place of value, plus the following additional fields: asset/assetcommitment, nonce/noncecommitment, surjection_proof and range_proof.GET /address-prefix/:prefixSearch for addresses beginning with :prefix.Returns a JSON array with up to 10 results.BlocksGET /block/:hashReturns information about a block.Available fields: id, height, version, timestamp, mediantime, bits, nonce, merkle_root, tx_count, size, weight, and previousblockhash. Elements-based chains have an additional proof field. See block format for more details.The response from this endpoint can be cached indefinitely.GET /block/:hash/headerReturns the hex-encoded block header.The response from this endpoint can be cached indefinitely.GET /block/:hash/statusReturns the block status.Available fields: in_best_chain (boolean, false for orphaned blocks), next_best (the hash of the next block, only available for blocks in the best chain).GET /block/:hash/txs[/:start_index]Returns a list of transactions in the block (up to 25 transactions beginning at start_index).The response from this endpoint can be cached indefinitely.GET /block/:hash/txidsReturns a list of all txids in the block.The response from this endpoint can be cached indefinitely.GET /block/:hash/txid/:indexReturns the transaction at index :index within the specified block.The response from this endpoint can be cached indefinitely.GET /block/:hash/rawReturns the raw block representation in binary.The response from this endpoint can be cached indefinitely.GET /block-height/:heightReturns the hash of the block currently at height.GET /blocks[/:start_height]Returns the 10 newest blocks starting at the tip or at start_height if specified.GET /blocks/tip/heightReturns the height of the last block.GET /blocks/tip/hashReturns the hash of the last block.## MempoolGET /mempoolGet mempool backlog statistics. Returns an object with:count: the number of transactions in the mempoolvsize: the total size of mempool transactions in virtual bytestotal_fee: the total fee paid by mempool transactions in satoshisfee_histogram: mempool fee-rate distribution histogramAn array of (feerate, vsize) tuples, where each entry's vsize is the total vsize of transactions paying more than feerate but less than the previous entry's feerate (except for the first entry, which has no upper bound). This matches the format used by the Electrum RPC protocol for mempool.get_fee_histogram.Example output:{ "count": 8134, "vsize": 3444604, "total_fee":29204625, "fee_histogram": [[53.01, 102131], [38.56, 110990], [34.12, 138976], [24.34, 112619], [3.16, 246346], [2.92, 239701], [1.1, 775272]]}In this example, there are transactions weighting a total of 102,131 vbytes that are paying more than 53 sat/vB, 110,990 vbytes of transactions paying between 38 and 53 sat/vB, 138,976 vbytes paying between 34 and 38, etc.GET /mempool/txidsGet the full list of txids in the mempool as an array.The order of the txids is arbitrary and does not match bitcoind's.GET /mempool/recentGet a list of the last 10 transactions to enter the mempool.Each transaction object contains simplified overview data, with the following fields: txid, fee, vsize and valueFee estimatesGET /fee-estimatesGet an object where the key is the confirmation target (in number of blocks) and the value is the estimated feerate (in sat/vB).The available confirmation targets are 1-25, 144, 504 and 1008 blocks.For example: { "1": 87.882, "2": 87.882, "3": 87.882, "4": 87.882, "5": 81.129, "6": 68.285, ..., "144": 1.027, "504": 1.027, "1008": 1.027 }Assets (Elements/Liquid only)GET /asset/:asset_idGet information about an asset.For the network's native asset (i.e. L-BTC in Liquid), returns an object with:asset_idchain_stats and mempool_stats, each with:tx_countpeg_in_countpeg_in_amountpeg_out_amountpeg_out_countburn_countburned_amountFor user-issued assets, returns an object with:asset_idissuance_txin: the issuance transaction inputtxidvinissuance_prevout: the previous output spent for the issuancetxidvoutstatus: the confirmation status of the initial asset issuance transactioncontract_hash: the contract hash committed as the issuance entropyreissuance_token: the asset id of the reissuance tokenchain_stats and mempool_stats, each with:tx_count: the number of transactions associated with this asset (does not include confidential transactions)issuance_count: the number of (re)issuance transactionsissued_amount: the total known amount issued (should be considered a minimum bound when has_blinded_issuances is true)burned_amount: the total amount provably burnedhas_blinded_issuances: whether at least one of the (re)issuances were blindreissuance_tokens: the number of reissuance tokensburned_reissuance_tokens: the number of reissuance tokens burnedIf the asset is available on the registry, the following fields are returned as well:contract: the full json contract json committed in the issuanceentity: the entity linked to this asset. the only available type is currently domain, which is encoded as { "domain": "foobar.com>" } (required)ticker: a 3-5 characters ticker associated with the asset (optional)precision: the number of decimal places for units of this asset (defaults to 0)name: a description for the asset (up to 255 characters)Example native asset:{ "asset_id": "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d", "chain_stats": {"tx_count": 54, "peg_in_count": 2, "peg_in_amount": 1600000000, "peg_out_count": 51, "peg_out_amount": 250490000, "burn_count":0, "burned_amount": 0 }, "mempool_stats": {"tx_count": 3, "peg_in_count": 0, "peg_in_amount": 0, "peg_out_count": 3, "peg_out_amount": 70020000, "burn_count": 0, "burned_amount": 0 }}Example user-issued asset:{ "asset_id": "d8a317ce2c14241192cbb3ebdb9696250ca1251a58ba6251c29fcfe126c9ca1f", "issuance_txin":{ "txid": "39affca34bd51ed080f89f1e7a5c7a49d6d9e4779c84424ae50df67dd60dcaf7", "vin": 0}, "issuance_prevout": { "txid": "0cdd74c540af637d5a3874ce8500891fd8e94ec8e3d5d436d86e87b6759a7674", "vout": 0 }, "reissuance_token": "eb8b210d42566699796dbf78649120fd5c9d9b04cabc8f480856e04bd5e9fc22", "contract_hash": "025d983cc774da665f412ccc6ccf51cb017671c2cb0d3c32d10d50ffdf0a57de", "status": { "confirmed": true, "block_height": 105, "block_hash": "7bf84f2aea30b02981a220943f543a6d6e7ac646d59ef76cff27dca8d27b2b67", "block_time": 1586248729 }, "chain_stats": { "tx_count": 1, "issuance_count": 1, "issued_amount": 0, "burned_amount": 0, "has_blinded_issuances": true, "reissuance_tokens": 0, "burned_reissuance_tokens": 0 }, "mempool_stats": { "tx_count": 0, "issuance_count": 0, "issued_amount": 0, "burned_amount": 0, "has_blinded_issuances": false, "reissuance_tokens": null, "burned_reissuance_tokens": 0 }}GET /asset/:asset_id/txsGET /asset/:asset_id/txs/mempoolGET /asset/:asset_id/txs/chain[/:last_seen]Get transactions associated with the specified asset.For the network's native asset, returns a list of peg in, peg out and burn transactions.For user-issued assets, returns a list of issuance, reissuance and burn transactions.Does not include regular transactions transferring this asset.GET /asset/:asset_id/supplyGET /asset/:asset_id/supply/decimalGet the current total supply of the specified asset.For the native asset (L-BTC), this is calculated as {chain,mempool}_stats.peg_in_amount - {chain,mempool}_stats.peg_out_amount - {chain,mempool}_stats.burned_amount.For issued assets, this is calculated as {chain,mempool}_stats.issued_amount - {chain,mempool}_stats.burned_amount.Not available for assets with blinded issuances.If /decimal is specified, returns the supply as a decimal according to the asset's divisibility. Otherwise, returned in base units.GET /assets/registryGet the list of issued assets in the asset registry.Query string parameters:start_index: the start index to use for paging. defaults to 0.limit: maximum number of assets to return. defaults to 25, maximum 100.sort_field: field to sort assets by. one of name, ticker or domain. defaults to ticker.sort_dir: sorting direction. one of asc or desc. defaults to asc.Assets are returned in the same format as in GET /asset/:asset_id.The total number of results will be returned as the x-total-results header.Transaction formattxidversionlocktimesizeweightfeevin[]txidvoutis_coinbasescriptsigscriptsig_asminner_redeemscript_asminner_witnessscript_asmsequencewitness[]prevout (previous output in the same format as in vout below)(Elements only)is_peginissuance (available for asset issuance transactions, null otherwise)asset_idis_reissuanceasset_idasset_blinding_nonceasset_entropycontract_hashassetamount or assetamountcommitmenttokenamount or tokenamountcommitmentvout[]scriptpubkeyscriptpubkey_asmscriptpubkey_typescriptpubkey_addressvalue(Elements only)valuecommitmentasset or assetcommitmentpegout (available for peg-out outputs, null otherwise)genesis_hashscriptpubkeyscriptpubkey_asmscriptpubkey_addressstatusconfirmed (boolean)block_height (available for confirmed transactions, null otherwise)block_hash (available for confirmed transactions, null otherwise)block_time (available for confirmed transactions, null otherwise)Block formatidheightversiontimestampbitsnoncedifficultymerkle_roottx_countsizeweightpreviousblockhashmediantime (median time-past)(Elements only)proofchallengechallenge_asmsolutionsolution_asm