| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
JSON over RESTful HTTP. Amounts are always represented in satoshis.
The blockstream.info public APIs are available at:
For example:
$ curl https://blockstream.info/api/blocks/tip/hashYou can also self-host the Esplora API server, which provides better privacy and security.
Returns information about the transaction.
Available fields: txid, version, locktime, size, weight, fee, vin, vout and status (see transaction format for details).
Returns the transaction confirmation status.
Available fields: confirmed (boolean), block_height (optional) and block_hash (optional).
Returns the raw transaction in hex or as binary data.
Returns a merkle inclusion proof for the transaction using bitcoind's merkleblock format.
Note: This endpoint is not currently available for Liquid/Elements-based chains.
Returns a merkle inclusion proof for the transaction using Electrum's blockchain.transaction.get_merkle format.
Returns the spending status of a transaction output.
Available fields: spent (boolean), txid (optional), vin (optional) and status (optional, the status of the spending tx).
Returns the spending status of all transaction outputs.
Broadcast a raw transaction to the network.
The transaction should be provided as hex in the request body. The txid will be returned on success.
Broadcast a package of raw transactions to the network.
A transaction package is a group of related transactions that may depend on each other (e.g., a child transaction spending outputs from an unconfirmed parent transaction). This is useful for CPFP (Child Pays For Parent) and other scenarios where transactions need to be evaluated together.
The request body should contain a JSON array of transaction hex strings.
Example request body:
["02000000...", "02000000..."]Returns a JSON object containing the package acceptance result. On success, returns information about each transaction in the package.
Note: This endpoint requires Bitcoin Core 28.0 or later.
Get 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 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 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 unconfirmed transaction history for the specified address/scripthash.
Returns up to 50 transactions (no paging).
Get 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.
Search for addresses beginning with :prefix.
Returns a JSON array with up to 10 results.
Returns 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.
Returns the hex-encoded block header.
The response from this endpoint can be cached indefinitely.
Returns 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).
Returns a list of transactions in the block (up to 25 transactions beginning at start_index).
Note: The start_index value must be a multiple of 25.
The response from this endpoint can be cached indefinitely.
Returns a list of all txids in the block.
The response from this endpoint can be cached indefinitely.
Returns the transaction at index :index within the specified block.
The response from this endpoint can be cached indefinitely.
Returns the raw block representation in binary.
The response from this endpoint can be cached indefinitely.
Returns the hash of the block currently at height.
Returns the 10 newest blocks starting at the tip or at start_height if specified.
Returns the height of the last block.
Returns the hash of the last block.
Get mempool backlog statistics. Returns an object with:
count: the number of transactions in the mempool
vsize: the total size of mempool transactions in virtual bytes
total_fee: the total fee paid by mempool transactions in satoshis
fee_histogram: mempool fee-rate distribution histogram
An 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 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 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 value
Get 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 }
Returns the daemon's getblocktemplate template-mode response for mining.
This endpoint is available only when electrs is started with --enable-mining-rest.
Successful responses are cached internally for up to 15 seconds and invalidated when electrs indexes a new chain tip. Responses include Cache-Control: no-store.
Get information about an asset.
For the network's native asset (i.e. LBTC in Liquid), returns an object with:
For user-issued assets, returns an object with:
If the asset is available on the registry, the following fields are returned as well:
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 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 the current total supply of the specified asset.
For the native asset (LBTC), 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 the list of issued assets in the asset registry.
Query string parameters:
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.
| Back | FazBrowse Home | New Git URL |