Blockbook API
Blockbook is our advanced blockchain indexer that provides enhanced querying capabilities for detailed blockchain data analysis.
For some enpoint this API serapate the response into to types of Blockchains:
- Utxo: those that have an UTXO data structure like Bitcoin, Dogecoin, Litecoin, etc.
- Account base: those that have a account base data structure like Ethereum, Optimism, Polygon, etc.
API Structure
Access our Blockbook API through our unified endpoint:
https://api.jetnodes.com/blockbook/<network>/<endpoint>
<network>
: network identifier are listed on the table below for every blockchain we support.<endpoint>
: each edpoint is describe in detail below.
# Example
https://api.jetnodes.com/blockbook/eth/api/v2/address/0xaa364c1A348f9517009207A1601E0a73C1Cd530b
# Some endpoint have some optional query parameters
https://api.jetnodes.com/blockbook/eth/api/v2/address/0xaa364c1A348f9517009207A1601E0a73C1Cd530b?page=1&pageSize=10
Authentication
You must include your API key in the header of the request:
api-key: YOUR-API-KEY
Supported Networks
Blockchain | Network | Type | Description |
---|---|---|---|
Bitcoin | btc | Utxo | Bitcoin mainnet network |
Bitcoin Testnet | btc-testnet | Utxo | Bitcoin testnet network |
Get Status
This endpoint returns current status of the Blockbook API and connected backend (full node).
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/status \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"blockbook": {
"coin": "Bitcoin",
"host": "blockbook",
"version": "0.4.0",
"gitCommit": "3d9ad91",
"buildTime": "2019-05-17T14:34:00+00:00",
"syncMode": true,
"initialSync": false,
"inSync": true,
"bestHeight": 577261,
"lastBlockTime": "2019-05-22T18:03:33.547762973+02:00",
"inSyncMempool": true,
"lastMempoolTime": "2019-05-22T18:10:10.27929383+02:00",
"mempoolSize": 17348,
"decimals": 8,
"dbSize": 191887866502,
"about": ""
},
"backend": {
"chain": "main",
"blocks": 577261,
"headers": 577261,
"bestBlockHash": "0000000000000000000ca8c902aa58b3118a7f35d093e25a07f17bcacd91cabf",
"difficulty": "6704632680587.417",
"sizeOnDisk": 250504188580,
"version": "180000",
"subversion": "/Satoshi:0.18.0/",
"protocolVersion": "70015",
"timeOffset": 0,
"warnings": ""
}
}
Get Block Hash
Blockbook always follows the main chain of the node it is attached to. If there is a rollback-reorg in the nodes, Blockbook will also do rollback. When you ask for block by height, you will always get the main chain block. If you ask for block by hash, you may get the block from another fork but it is not guaranteed (the node may not keep it).
Required parameters
- Name
block_height
- Type
- number
- Description
The height of the block that you want.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/block-index/{block_height} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"blockHash": "ed8f3af8c10ca70a136901c6dd3adf037f0aea8a93fbe9e80939214034300f1e"
}
Get transaction
Get transaction returns "normalized" data about transaction, which has the same general structure for all supported coins. It does not return coin specific fields (for example information about Zcash shielded addresses).
Response type are diferent base on blockchain type and transaction status:
- Utxo:
- Confirmed
- Unconfirmed
- Account base
Required parameters
- Name
tx_id
- Type
- string
- Description
The ID of the transaction you want to query.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/tx/{tx_id} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"txid": "9e2bc8fbd40af17a6564831f84aef0cab2046d4bad19e91c09d21bff2c851851",
"version": 1,
"vin": [
{
"txid": "f124e6999bf67e710b9e8a8ac4dbb08a64aa9c264120cf98793455e36a531615",
"vout": 2,
"sequence": 4294967295,
"n": 0,
"addresses": [
"DDhUv8JZGmSxKYV95NLnbRTUKni9cDZD3S"
],
"isAddress": true,
"value": "55795108999999",
"hex": "473...2c7ec77bb982"
}
],
"vout": [
{
"value": "55585679000000",
"n": 0,
"hex": "76a914feaca9d9fa7120c7c587c00c639bb18d40faadd388ac",
"addresses": [
"DUMh1rPrXTrCN2Z9EHsLPg7b78rACHB2h7"
],
"isAddress": true
},
{
"value": "209329999999",
"n": 1,
"hex": "76a914ea8984be785868391d92f49c14933f47c152ea0a88ac",
"addresses": [
"DSXDQ6rnwLX47WFRnemctoXPHA9pLMxqXn"
],
"isAddress": true
}
],
"blockHash": "78d1f3de899a10dd2e580704226ebf9508e95e1706f177fc9c31c47f245d2502",
"blockHeight": 2647927,
"confirmations": 1,
"blockTime": 1553088212,
"size": 234,
"vsize": 153,
"value": "55795008999999",
"valueIn": "55795108999999",
"fees": "100000000",
"hex": "0100000...0011000"
}
Get Address
Retrieve the balance and transaction history for a given blockchain address. The endpoint returns a list of transactions sorted by block height (newest blocks first).
Required parameters
- Name
address
- Type
- string
- Description
The blockchain address you want to query.
Optional query parameters
- Name
page
- Type
- number
- Description
The page number of returned transactions, starting at 1. If the specified page is out of range, the closest available page is returned.
default = 1
- Name
pageSize
- Type
- number
- Description
The number of transactions returned per page.
default = 1000 (maximum)
- Name
from
- Type
- number
- Description
The starting block height to filter transactions. Returns transactions with a block height greater than or equal to this value.
default = -- (no filter)
- Name
to
- Type
- number
- Description
The ending block height to filter transactions. Returns transactions with a block height less than or equal to this value.
default = -- (no filter)
- Name
details
- Type
- details option
- Description
Determines the level of detail included in the response. See options below.
default = txids
- Name
contract
- Type
- string
- Description
Filters the response to include only transactions that affect a specified contract address (only applicable to coins supporting contracts). Use in conjunction with
details=contract
.
default = -- (no filter)
- Name
secondary
- Type
- fiat identifier
- Description
Specifies a fiat currency (e.g., usd) so that token and total balances are also returned in that currency, alongside crypto values.
default = -- (none)
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/address/{address} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"page": 1,
"totalPages": 1,
"itemsOnPage": 1000,
"address": "bc1qyncxumvj67lnz75tdzaug6cq5pv24dzmcg3hec",
"balance": "45038",
"totalReceived": "2084387",
"totalSent": "2039349",
"unconfirmedBalance": "0",
"unconfirmedTxs": 0,
"txs": 80,
"txids": [
"373d003c7ffb2ea6345419fa9df4edf7916c5508d4cbe40962efad2a596b54c4",
"5304275cdb572084c7fe753669e76b2a2f0fb6dd61d683e6e909a9ffcf27882b",
// ...
]
}
Details Parameter Options
- basic: Returns only the address balances without any transaction details.
- tokens: Returns basic balance information plus the tokens associated with the address (applicable for select coins).
- tokenBalances: Returns basic balance information plus tokens along with their current balances.
- txids (default): Returns tokenBalances along with a list of transaction IDs. This response supports pagination and block height filters.
- txslight: Returns tokenBalances plus a list of transactions with limited details (only essential index data). Supports pagination and block filters.
- txs: Returns tokenBalances plus a full list of transaction details. Supports pagination and block filters.
- contract: Returns only transactions that affect the specified contract address (for coins that support contracts).
Get Xpub
Returns balances and transactions of an xpub or output descriptor, applicable only for Bitcoin-type coins.
Blockbook supports BIP44, BIP49, BIP84 and BIP86 (Taproot) derivation schemes, using either xpubs or output descriptors (see https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md)
-
Xpubs
Blockbook expects xpub at level 3 derivation path, i.e. m/purpose'/coin_type'/account'/. Blockbook completes the change/address_index part of the path when deriving addresses. The BIP version is determined by the prefix of the xpub. The prefixes for each coin are defined by fields
xpub_magic
,xpub_magic_segwit_p2sh
,xpub_magic_segwit_native
in the trezor-common library. If the prefix is not recognized, Blockbook defaults to BIP44 derivation scheme. -
Output descriptors
Output descriptors are in the form
<type>([<path>]<xpub>[/<change>/*])[#checksum]
, for examplepkh([5c9e228d/44'/0'/0']xpub6BgBgses...Mj92pReUsQ/<0;1>/*)#abcd
Parameters
type
andxpub
are mandatory, the rest is optionalBlockbook supports a limited set of
types
:*BIP44:
pkh(xpub)
*BIP49:sh(wpkh(xpub))
*BIP84:wpkh(xpub)
*BIP86 (Taproot single key):tr(xpub)
Parameterchange
can be a single number or a list of change indexes, specified either in the format<index1;index2;...>
or{index1,index2,...}
. If the parameterchange
is not specified, Blockbook defaults to<0;1>
.
The returned transactions are sorted by block height, newest blocks first.
Required parameters
- Name
xpub|descriptor
- Type
- string
- Description
It can be an xpub or a descriptor that follows the format described above.
Optional query parameter
- Name
page
- Type
- number
- Description
The page number of returned transactions, starting at 1. If the specified page is out of range, the closest available page is returned.
default = 1
- Name
pageSize
- Type
- number
- Description
The number of transactions returned per page.
default = 1000 (maximum)
- Name
from
- Type
- number
- Description
The starting block height to filter transactions. Returns transactions with a block height greater than or equal to this value.
default = -- (no filter)
- Name
to
- Type
- number
- Description
The ending block height to filter transactions. Returns transactions with a block height less than or equal to this value.
default = -- (no filter)
- Name
details
- Type
- details option
- Description
Determines the level of detail included in the response. See options below.
default = txids
- Name
tokens
- Type
- tokens option
- Description
specifies what tokens (xpub addresses) are returned by the request. See options below.
default = nonzero
- Name
secondary
- Type
- default = -- (none)
- Description
Specifies a fiat currency (e.g., usd) so that token and total balances are also returned in that currency, alongside crypto values.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/xpub/{xpub} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"page": 1,
"totalPages": 1,
"itemsOnPage": 1000,
"address": "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz",
"balance": "12706308",
"totalReceived": "12926308",
"totalSent": "220000",
"unconfirmedBalance": "0",
"unconfirmedTxs": 0,
"txs": 22,
"addrTxCount": 22,
"txids": [
"4a556c81e88d30f99f56a0df1d28de0f22d3d6a1342bc0bbe882a5201fe2b9ff",
"633342b714fc709fac8c426755000fb941f247ea0d7defdaf1ba6d14f10f6819",
// ...
],
"usedTokens": 19,
"tokens": [
{
"type": "XPUBAddress",
"name": "1EfgV2Hr5CDjXPavHDpDMjmU33BA2veHy6",
"path": "m/44'/0'/0'/0/0",
"transfers": 3,
"decimals": 8,
"balance": "10665",
"totalReceived": "110665",
"totalSent": "100000"
},
{
"type": "XPUBAddress",
"name": "1CcEugXu9Yf9Qw5cpB8gHUK4X9683WyghM",
"path": "m/44'/0'/0'/0/2",
"transfers": 1,
"decimals": 8,
"balance": "8747",
"totalReceived": "8747",
"totalSent": "0"
},
// ...
]
}
Details Parameter Options
- basic: Returns only the address balances without any transaction details.
- tokens: Returns basic balance information plus the tokens associated with the address (applicable for select coins).
- tokenBalances: Returns basic balance information plus tokens along with their current balances.
- txids (default): Returns tokenBalances along with a list of transaction IDs. This response supports pagination and block height filters.
- txs: Returns tokenBalances plus a full list of transaction details. Supports pagination and block filters.
Tokens Parameter Options
- nonzero: return only addresses with nonzero balance
- used: return addresses with at least one transaction
- derived: return all derived addresses
Get Utxo
Returns array of unspent transaction outputs of address or xpub, applicable only for Bitcoin-type coins. By default, the list contains both confirmed and unconfirmed transactions. The query parameter confirmed=true disables return of unconfirmed transactions. The returned utxos are sorted by block height, newest blocks first. For xpubs or output descriptors, the response also contains address and derivation path of the utxo.
Unconfirmed utxos do not have field height, the field confirmations has value 0 and may contain field lockTime, if not zero.
Coinbase utxos have field coinbase set to true, however due to performance reasons only up to minimum coinbase confirmations limit (100). After this limit, utxos are not detected as coinbase.
Required parameters
- Name
address|xpub|descriptor
- Type
- string
- Description
It can be an address, xpub or a descriptor that follows the format described on the previous enpoints.
Optional query parameter
- Name
confirmed
- Type
- true|false
- Description
The page number of returned transactions, starting at 1. If the specified page is out of range, the closest available page is returned.
default = 1
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/utxo/{xpub} \
-H "api-key: {YOUR-API-KEY}" \
Response
[
{
"txid": "4a556c81e88d30f99f56a0df1d28de0f22d3d6a1342bc0bbe882a5201fe2b9ff",
"vout": 0,
"value": "1000",
"height": 764532,
"confirmations": 118043,
"address": "18RtYUqcNDRjvbB8gg2hwxCYkWwuFcURJp",
"path": "m/44'/0'/0'/1/1"
},
{
"txid": "633342b714fc709fac8c426755000fb941f247ea0d7defdaf1ba6d14f10f6819",
"vout": 0,
"value": "1400",
"height": 763853,
"confirmations": 118722,
"address": "17BvBPGypT4nt1xc5QpdSDkQb54xoUuQkD",
"path": "m/44'/0'/0'/0/7"
},
// ...
]
Get Block
Returns information about block with transactions, subject to paging.
Required parameters
- Name
block_height|block_hash
- Type
- number | string
- Description
It can be the block height or the block hash that you want to query.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/block/{block_height} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"page": 1,
"totalPages": 1,
"itemsOnPage": 1000,
"hash": "0xe7bed1a92c0615e6fb29f3613554deee4a64338b482b27f00d5b6bf366f7421a",
"previousBlockHash": "0xe7bd03919bf9810593dc73733440c3046a3ee5f26de6f2ba23e27fcc9c22002d",
"nextBlockHash": "0x7269b79f18ea299e797662a4304f2881f7b89c686588c61e9243463600c02c82",
"height": 21809919,
"confirmations": 30,
"size": 54615,
"time": 1739115671,
"version": 0,
"merkleRoot": "",
"nonce": "0x0000000000000000",
"bits": "",
"difficulty": "0x0",
"txCount": 140,
"txs": [
{
"txid": "0x4edcd91a5c868f8e588bb9a85a9f167d3c34c23982a7032133e5c6597e67c638",
"vin": [
{
"n": 0,
"addresses": [
"0xA794401988f9e484e03eB55a8E80db15968A38bE"
],
"isAddress": true
}
],
"vout": [
{
"value": "0",
"n": 0,
"addresses": [
"0x51C72848c68a965f66FA7a88855F9f7784502a7F"
],
"isAddress": true
}
],
"blockHash": "0xe7bed1a92c0615e6fb29f3613554deee4a64338b482b27f00d5b6bf366f7421a",
"blockHeight": 21809919,
"confirmations": 30,
"blockTime": 1739115671,
"value": "0",
"fees": "31111400277636796",
"tokenTransfers": [
{
"type": "ERC20",
"from": "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
"to": "0x51C72848c68a965f66FA7a88855F9f7784502a7F",
"contract": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"value": "71322543536563854929"
},
// ...
],
"ethereumSpecific": {
"status": 1,
"nonce": 9755,
"gasLimit": 198253,
"gasUsed": 152503,
"gasPrice": "204005168932",
"data": "0x122067ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088e6a0c2ddd26feeb64f039a2c41296fcb3f56400000000000000000000000000000000000000000000000000000002c1c494588000000000000000000000000000000000000000000000003ddcb4eeeeade800000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000067a8cc9f00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000014a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000",
"parsedData": {
"methodId": "0x122067ed",
"name": ""
}
}
},
// ...
]
}
Send Transaction
Send a transaction to the blockchain. It submit the transaction and returns the transaction id.
Required parameters
- Name
transaction_hex
- Type
- string
- Description
It can be the block height or the block hash that you want to query.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/sendtx/{transaction_hex} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"result": "7c3be24063f268aaa1ed81b64776798f56088757641a34fb156c4f51ed2e9d25"
}
Optional
You can send a POST request hex tx data in request body. The '/' symbol at the end is mandatory.
Tickers List
Returns a list of available currency rate tickers (secondary currencies) for the specified date, along with an actual data timestamp.
Required query parameters
- Name
timestamp
- Type
- string
- Description
Should be a valid Unix timestamp.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/tickers-list/?timestamp={timestamp} \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"ts": 1739131382,
"available_currencies": [
"btc",
"cad",
"chf",
"clp",
"cny",
"czk",
"dkk",
"eth",
"eur",
"usd",
// ...
]
}
Tickers
Returns currency rate for the specified currency and date. If the currency is not available for that specific timestamp, the next closest rate will be returned. All responses contain an actual rate timestamp.
The '/' symbol at the end is required.
Optional query parameters
- Name
currency
- Type
- currency identifier
- Description
Filter response to one currency.
- Name
timestamp
- Type
- Unix timestamp
- Description
Query for an especific timestamp.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/tickers/ \
-H "api-key: {YOUR-API-KEY}" \
Response
{
"ts": 1739131740,
"rates": {
"aed": 9645.11,
"ars": 2782832,
"aud": 4189.01,
"bdt": 320440,
"bhd": 994.43,
"bmd": 2625.95,
// ...
}
}
Balance History
Returns a balance history for the specified XPUB or address. Query parameters from and to are required. By default balance its return in range of 1 hour. Adjust groupBy query parameter to modify this range.
Required parameters
- Name
XPUB|address
- Type
- string
- Description
Address or Xpub that you want to query
Required query parameters
- Name
from
- Type
- Unix timestamp
- Description
if specified, the response will contain secondary (fiat) rate at the time of transaction. If not, all available currencies will be returned.
- Name
to
- Type
- Unix timestamp
- Description
Return balance until this timestamp.
Optional query parameters
- Name
fiatcurrency
- Type
- Currecy identifier
- Description
Will only return balance in this currency.
- Name
groupBy
- Type
- number
- Description
An interval in seconds, to group results by. Default is 3600 seconds.
Request
curl -G https://api.jetnodes.com/blockbook/{network}/api/v2/balancehistory/{address}?from={dateFrom}&to={dateTo} \
-H "api-key: {YOUR-API-KEY}" \
Response
[
{
"time": 1736463600,
"txs": 5,
"received": "0",
"sent": "29169115585289000",
"sentToSelf": "0",
"rates": {
"aed": 11853.404,
"ars": 3345541,
"aud": 5213.3545,
"bdt": 393612.34,
"bhd": 1216.4753,
"bmd": 3227.17,
// ...
}
},
{
"time": 1736467200,
"txs": 16,
"received": "0",
"sent": "349645302475106326",
"sentToSelf": "0",
"rates": {
"aed": 11823.737,
"ars": 3337167.5,
"aud": 5200.306,
"bdt": 392627.2,
"bhd": 1213.4307,
"bmd": 3219.0928,
// ...
}
},
// ...
]