Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response.
Request
Path Params
blockHash
string
required
the block hash
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request GET '/block/'
Responses
🟢200successful operation
application/json
Body
hash
string
optional
The block hash
confirmations
integer<int64>
optional
The number of confirmations
strippedsize
integer<int64>
optional
The block stripped size
size
integer<int64>
optional
The block size
weight
integer<int64>
optional
The block weight
height
integer<int64>
optional
The block height (or index)
version
integer<int64>
optional
The block version
versionHex
string
optional
The block version (in hex)
merkleroot
string
optional
The block merkle root
tx
array[object (Transaction) {15}]
optional
The list of transactions in the block
amount
number<float>
optional
The transaction amount in BTC
fee
number<float>
optional
The amount of the fee in BTC. This is negative and only available for the send category of transactions.
confirmations
integer<int64>
optional
The number of confirmations
blockhash
string
optional
The block hash
blockindex
integer<int64>
optional
The index of the transaction in the block that includes it
blocktime
integer<int32>
optional
The time in seconds since epoch (1 Jan 1970 GMT)
txid
string
optional
The transaction id
txhash
string
optional
The transaction hash
version
integer
optional
size
integer
optional
vsize
integer
optional
locktime
integer
optional
time
integer<int32>
optional
The transaction time in seconds since epoch (1 Jan 1970 GMT)
timereceived
integer<int32>
optional
The time received in seconds since epoch (1 Jan 1970 GMT)
bip125-replaceable
enum<string>
optional
Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool