Interchain API
  1. Block
Interchain API
Bitcoin
  • Overview
  • Bitcoin
  • Ethereum
  • Transaction
    • Get transaction by hash.
      GET
  • Block
    • Get block by hash.
      GET
    • Get block by hash.
      GET
  • Chain
    • Returns various state info regarding block chain processing.
      GET
  • Memory Pool
    • Returns various information about the TX mempool.
      GET
    • Returns transactions in the TX mempool.
      GET
    • Returns headers.
      GET
    • Returns Unspent Transaction (TX) Outputs
      GET
  1. Block

Get block by hash.

GET
/block/notxdetails/{blockHash}.{format}
block
Last modified:2024-05-27 22:00:31
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
format
enum<string> 
required
The expected format
Allowed values:
jsonbinhex
Default:
json

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/notxdetails/.'

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
Allowed values:
yesnounknown
time
integer <int32>
optional
The block time
mediantime
integer <int32>
optional
The block median time
nonce
integer <int32>
optional
The block nonce
bits
string 
optional
difficulty
number <float>
optional
chainwork
string 
optional
Example
{
  "hash": "string",
  "confirmations": 0,
  "strippedsize": 0,
  "size": 0,
  "weight": 0,
  "height": 0,
  "version": 0,
  "versionHex": "string",
  "merkleroot": "string",
  "tx": [
    {
      "amount": 0,
      "fee": 0,
      "confirmations": 0,
      "blockhash": "string",
      "blockindex": 0,
      "blocktime": 0,
      "txid": "string",
      "txhash": "string",
      "version": 0,
      "size": 0,
      "vsize": 0,
      "locktime": 0,
      "time": 0,
      "timereceived": 0,
      "bip125-replaceable": "yes"
    }
  ],
  "time": 0,
  "mediantime": 0,
  "nonce": 0,
  "bits": "string",
  "difficulty": 0,
  "chainwork": "string"
}
🟠400Invalid hash
🟠404Block not found
Previous
Get block by hash.
Next
Returns various state info regarding block chain processing.
Built with