Bitcoin Block

Returns 5 blocks on Bitcoin, sorted by height, highest first: height, block hash, block size, block weight, block version, block stripped size, difficulty and 2 more fields.

By Stanton · saved 22 July 2023 · Bitquery API v1

What it returns

The query

query($network: BitcoinNetwork!,
      $limit: Int!,
			$timeFormat: String!) {
  bitcoin(network: $network) {
    blocks(options: {limit: $limit, desc: "height"}) {
      height
      blockHash
      blockSize
      blockWeight
      blockVersion
      blockStrippedSize
      difficulty
      transactionCount
      timestamp {
        time (format: $timeFormat)
      }
    }
  }
}

Variables

{"network":"bitcoin","limit":5,"timeFormat":"%Y-%m-%d %H:%M:%S"}

Similar queries