Skip to main content
POST
/
finalized-stream
curl --compressed -X POST 'https://portal.sqd.dev/datasets/bitcoin-mainnet/finalized-stream' \ -H 'Content-Type: application/json' \ -d '{ "type": "bitcoin", "fromBlock": 880000, "toBlock": 880000, "fields": { "block": { "number": true, "timestamp": true }, "input": { "transactionIndex": true, "inputIndex": true, "txid": true, "vout": true, "prevoutValue": true, "prevoutScriptPubKeyType": true, "prevoutScriptPubKeyAddress": true } }, "inputs": [{ "prevoutScriptPubKeyType": ["witness_v1_taproot"] }] }'
[
  {
    "header": {
      "number": 880000,
      "hash": "00000000000000000000a3b049e5e4e16c539c9a0b3c7d8f1e2a4b6c8d0e1f2a",
      "parentHash": "00000000000000000000b4c150f6f5f27d640a0b1c4d8e9f2f3b5c7d9e1f0a3b",
      "timestamp": 1738000000
    },
    "transactions": [],
    "inputs": [
      {
        "transactionIndex": 1,
        "inputIndex": 0,
        "txid": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
        "vout": 0,
        "prevoutValue": 50000,
        "prevoutScriptPubKeyType": "witness_v1_taproot",
        "prevoutScriptPubKeyAddress": "bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297"
      },
      {
        "transactionIndex": 2,
        "inputIndex": 0,
        "txid": "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3",
        "vout": 1,
        "prevoutValue": 125000,
        "prevoutScriptPubKeyType": "witness_v1_taproot",
        "prevoutScriptPubKeyAddress": "bc1pxyz0987654321abcdefghijklmnopqrstuvwxyz012345678901234"
      }
    ],
    "outputs": []
  }
]

Documentation Index

Fetch the complete documentation index at: https://beta.docs.sqd.dev/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Data query to filter and retrieve blocks

fromBlock
integer<int64>
default:880000
required

The number of the first block to fetch. If unsure how far into the past this can go consult /metadata

type
enum<string>
default:bitcoin
Available options:
bitcoin
toBlock
integer<int64>
default:880000

The number of the last block to fetch (inclusive)

parentBlockHash
string

Expected hash of the parent of the first requested block

includeAllBlocks
boolean
default:true

If true, includes blocks with no matching data

fields
object

Field selector. See the HTTP 200 response description for details on fields that aren't self-explanatory

transactions
object[]

Transaction data requests. An empty object matches all transactions

inputs
object[]

Input data requests. Filter by prevout address, type, or coinbase status

outputs
object[]

Output data requests. Filter by address or script type

Response

A stream of finalized blocks in JSON lines format, optionally gzipped. Never returns blocks above the finalized head.

header
object
required
transactions
object[]
inputs
object[]
outputs
object[]