getblock

If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
If verbosity is 1, returns an Object with information about block .
If verbosity is 2, returns an Object with information about block and information about each transaction.

Arguments:

  1. "blockhash" (string, required) The block hash
  2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: bitcoin-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"getblock","params":["00000000000000000000e16f42aa65970c1e0be9063b4898806d9e31aee4e005"]}'

Response

{
  "result": {
    "hash": "00000000000000000000e16f42aa65970c1e0be9063b4898806d9e31aee4e005",
    "confirmations": 3310,
    "strippedsize": 516810,
    "size": 727669,
    "weight": 2278099,
    "height": 594411,
    "version": 536870912,
    "versionHex": "20000000",
    "merkleroot": "21a99a2f7113b9216a17c5e8b77be7040e80947ebb1cdf7bd01b68cb2674be06",
    "tx": [
      "512122116d8995293482628319a2ef9489e0be81bf4d6db309627ce529d1320b",
      "6ad1c7d2bb310fd53f9dbd1598628d3aff7177f918c3ab48f6ed592ee34ccb6d",
      "36e0519e974e4b17249beda8a1248570b4f54dfdc412e4b43b9b9184219ccf34",
      ...
    ],
    "time": 1568237210,
    "mediantime": 1568235054,
    "nonce": 198326882,
    "bits": "171a213e",
    "difficulty": 10771996663680.4,
    "chainwork": "0000000000000000000000000000000000000000086c1770c32dfe7ee9d60be4",
    "nTx": 1898,
    "previousblockhash": "0000000000000000000e40c9133bbc4332987857a9e2e3f1d1d02c4ac614daeb",
    "nextblockhash": "00000000000000000004f0c30e22cb43d425014eac9a39abc90ac961e0a73afd"
  },
  "error": null,
  "id": 1
}