> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getBlockOrCandidateByHash

> Returns block or candidate block data for a given hash.



## OpenAPI

````yaml openapi-getBlockOrCandidateByHash POST /
openapi: 3.0.0
info:
  title: Quai JSON RPC API
  version: 1.0.0
servers:
  - url: https://rpc.quai.network/cyprus1
security: []
paths:
  /:
    post:
      summary: quai_getBlockOrCandidateByHash
      description: Returns block or candidate block data for a given hash.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
components:
  schemas:
    Request:
      type: object
      required:
        - jsonrpc
        - method
        - params
        - id
      properties:
        jsonrpc:
          type: string
          example: '2.0'
          enum:
            - '2.0'
        method:
          type: string
          description: The name of the method to be invoked.
          example: quai_getBlockOrCandidateByHash
          enum:
            - quai_getBlockOrCandidateByHash
        params:
          type: array
          description: >-
            The block hash, true/false. true returns complete transaction
            information and false returns the hash of the transaction
          items:
            type: string
          maxItems: 1
          minItems: 1
          example:
            - '0x0000085526a97d1b4e1613e3aa7dd01f9cef01525d242a42f203355e8c7dfcb6'
            - false
        id:
          type: integer
          description: A unique identifier for the request.
          example: 1
    Response:
      type: object
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        result:
          type: object
          properties:
            hash:
              type: string
              description: The hash of the block.
            header:
              type: object
              properties:
                baseFeePerGas:
                  type: string
                  description: The base fee per gas for the block.
                efficiencyScore:
                  type: string
                  description: >-
                    The ratio of entropy reduced by the block to the entropy
                    reduced by the uncles in this block. An estimate of how much
                    work was wasted by the block.
                etxEligibleSlices:
                  type: string
                  description: >-
                    A 256 bit hex encoded indicator of which other zones are
                    eligible to recieve external transactions in this block. The
                    value of each bit is 1 if the corresponding zone is
                    eligible, 0 if not.
                etxRollupRoot:
                  type: string
                  description: >-
                    Hash of all external transactions emitted since the previous
                    coincident block.
                etxSetRoot:
                  type: string
                  description: >-
                    The hash of all of the external transactions in the state
                    trie.
                evmRoot:
                  type: string
                  description: The root hash of the EVM Ledger state trie.
                exchangeRate:
                  type: string
                  description: The exchange rate of Quai and Qi for this block.
                expansionNumber:
                  type: string
                  description: >-
                    The number of dynamic shard expansions that have occurred
                    since genesis.
                extraData:
                  type: string
                  description: Arbitrary hex-encoded extra data included in this block.
                gasLimit:
                  type: string
                  description: The maximum gas allowed in this block.
                gasUsed:
                  type: string
                  description: The total used gas by all transactions in this block.
                interlinkRootHash:
                  type: string
                  description: >-
                    Hash of the block hashes of the most recent interlink blocks
                    at each level of the hierarchy.
                manifestHash:
                  type: array
                  description: >-
                    Hash of all of the blocks confirmed in subordinate chains to
                    this block since the last coincident block.
                  items:
                    type: string
                number:
                  type: array
                  description: Integer block numbers at each level of the hierarchy.
                  items:
                    type: string
                outboundEtxsRoot:
                  type: string
                  description: >-
                    Hash of all outbound external transactions emitted in this
                    block.
                parentDeltaEntropy:
                  type: array
                  description: >-
                    The change in entropy since the previous coincident block in
                    each level of the hierarchy.
                  items:
                    type: string
                parentHash:
                  type: array
                  description: >-
                    The hash of the parent block for each level of the
                    hierarchy.
                  items:
                    type: string
                parentEntropy:
                  type: array
                  description: >-
                    Total entropy reduced since genesis prior to this block in
                    each level of the hierarchy.
                  items:
                    type: string
                parentUncledDeltaEntropy:
                  type: array
                  description: >-
                    The entropy reduction of uncles since the previous
                    coincident block in all subordinate chains to this block for
                    each level of the hierarchy.
                  items:
                    type: string
                primeTerminusHash:
                  type: string
                  description: >-
                    The hash of the most recent prime block the shard this block
                    was included in.
                quaiStateSize:
                  type: string
                  description: The size of the Quai Ledger state at this block.
                receiptsRoot:
                  type: string
                  description: Receipt trie root hash of the block.
                secondaryCoinbase:
                  type: string
                  description: >-
                    The secondary coinbase address of the miner of this block.
                    Only transaction fees are paid to this address.
                size:
                  type: string
                  description: The size of the block header in bytes.
                stateLimit:
                  type: string
                  description: The total number of bytes of state allowed in this block.
                stateUsed:
                  type: string
                  description: >-
                    The number of bytes used in the state trie within this
                    block.
                thresholdCount:
                  type: string
                  description: >-
                    The number of prime blocks since the uncle rate has crossed
                    the rate threshold for dynamic expansion. Specification
                    denoted by Quai Improvement Proposal 8.
                transactionsRoot:
                  type: string
                  description: The root of the transaction trie of the block.
                uncleHash:
                  type: string
                  description: The hash of the uncles data in the block.
                uncledEntropy:
                  type: string
                  description: The entropy reduced by all uncles included in this block.
                utxoRoot:
                  type: string
                  description: The root hash of the UTXO ledger state trie.
            interlinkHashes:
              type: array
              description: The hashes of the interlink blocks.
              items:
                type: string
            outboundEtxs:
              oneOf:
                - type: array
                  description: >-
                    The hashes of the outbound external transactions included in
                    the block.
                  items:
                    type: string
                - type: array
                  description: >-
                    The full representation of each outbound external
                    transaction included in the block.
                  items:
                    type: object
                    properties:
                      blockHash:
                        type: string
                        description: >-
                          The hash of the block this external transaction was
                          included in.
                      blockNumber:
                        type: string
                        description: >-
                          The number of the block this external transaction was
                          included in.
                      from:
                        type: string
                        description: The sender of the external transaction.
                      gas:
                        type: string
                        description: The gas limit of the external transaction.
                      hash:
                        type: string
                        description: The hash of the external transaction.
                      input:
                        type: string
                        description: The input data included in the external transaction.
                      to:
                        type: string
                        description: The recipient of the external transaction.
                      transactionIndex:
                        type: string
                        description: >-
                          The index of the external transaction in the block
                          among all transactions in the block.
                      value:
                        type: string
                        description: The value sent in this transaction.
                      type:
                        type: string
                        description: >-
                          The type of the transaction that spawned this external
                          transaction.
                      accessList:
                        type: array
                        description: The access list of the transaction.
                      originatingTxHash:
                        type: string
                        description: >-
                          The hash of the transaction that spawned this external
                          transaction.
                      etxIndex:
                        type: string
                        description: >-
                          The index of the external transaction among the other
                          external transactions in the block.
                      etxType:
                        type: string
                        description: >-
                          The type of the external transaction. (0: External, 1:
                          Coinbase, 2: Conversion)
            size:
              type: string
              description: The size of the block in bytes.
            subManifest:
              type: array
              description: The sub-manifests of the block.
              items:
                type: string
            totalEntropy:
              type: string
              description: The total entropy of the block.
            transactions:
              oneOf:
                - type: array
                  description: The hashes of the transactions included in the block.
                  items:
                    type: string
                - type: array
                  description: >-
                    The full representation of the transactions included in the
                    block.
                  items:
                    type: object
            uncles:
              type: array
              description: The uncles of the block.
              items:
                type: object
                properties:
                  coinbase:
                    type: string
                    description: The address of the account that mined this uncle block.
                  difficulty:
                    type: string
                    description: The difficulty for the uncle block.
                  headerHash:
                    type: string
                    description: The header hash of the uncle block.
                  location:
                    type: string
                    description: The 4 byte zone location identifier of the uncle block.
                  mixHash:
                    type: string
                    description: The ProgPOW mix hash of the uncle block.
                  nonce:
                    type: string
                    description: The random number used in the valid proof-of-work.
                  number:
                    type: string
                    description: The number of the uncle block.
                  parentHash:
                    type: string
                    description: >-
                      The hash of the parent block this uncle was mined on top
                      of.
                  primeTerminusNumber:
                    type: string
                    description: >-
                      The number of the most recent prime block the shard this
                      uncle was included in.
                  time:
                    type: string
                    description: Timestamp for when the uncle block was collated.
                  txHash:
                    type: string
                    description: >-
                      The hash of one or more transactions worked and included
                      in the uncle.
                  workShare:
                    type: boolean
                    description: Inidcator of whether the uncle block is a work share.
            woHeader:
              type: object
              description: The work object header.
              properties:
                coinbase:
                  type: string
                  description: The address of the account that mined this block.
                difficulty:
                  type: string
                  description: The difficulty achieved by this block.
                headerHash:
                  type: string
                  description: The hash of the work object header data.
                location:
                  type: string
                  description: The 4 byte zone location identifier of the block.
                lock:
                  type: string
                  description: >-
                    The duration that the block rewards for this block are
                    locked.
                mixHash:
                  type: string
                  description: The ProgPOW mix hash of this block.
                nonce:
                  type: string
                  description: The random number used in the valid proof-of-work.
                number:
                  type: string
                  description: The block number.
                parentHash:
                  type: string
                  description: The hash of the parent block this block was mined on.
                primaryCoinbase:
                  type: string
                  description: >-
                    The primary coinbase of the miner of this block. Determines
                    whether block rewards are paid out in Quai or Qi.
                primeTerminusNumber:
                  type: string
                  description: >-
                    The number of the most recent prime block the shard that
                    this block was included in.
                timestamp:
                  type: string
                  description: Timestamp for when this block was collated.
                txHash:
                  type: string
                  description: >-
                    The hash of one or more transactions worked and included in
                    the block.
            workShares:
              type: array
              description: The work shares of the block.
          example:
            hash: '0x44d0080caa510ebbfd94a0b5458f55cf3ef1aae1c927a569e3f7b1d62d14050d'
            header:
              baseFeePerGas: '0x0'
              efficiencyScore: '0x0'
              etxEligibleSlices: >-
                0x0100000000000000000000000000000000000000000000000000000000000000
              etxRollupRoot: >-
                0xefedf4a872a58cf75c151b07c899e1935e715b8e96d1d7a3762098baee6a190c
              etxSetRoot: >-
                0x5081c74207b8b250b6b737c59304da6e96bff3e43efe22ec1a371054222d278c
              evmRoot: >-
                0xe5a3e7e3027f0a3a476cc34c569743c285333bc3d1af49b0b513e26cbafed117
              exchangeRate: '0x38d7ea4c68000'
              expansionNumber: '0x0'
              extraData: '0xd78776302e31392e3088676f312e32332e31856c696e7578'
              gasLimit: '0x2625a00'
              gasUsed: '0x0'
              interlinkRootHash: >-
                0x41af39c27ae9ec516256273dac73e49f77e7f73ba2cdf0c4ee430e41949688dc
              manifestHash:
                - >-
                  0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
                - >-
                  0x1a32d49ac346152143b3c26b75fa1c65307e6cce31a3cb8ef249fbd8b31cca18
                - >-
                  0x2318f6ff55c995c83b0ecc2bea5c55bbfca985ca9a11aeaed17dcadcc4816789
              number:
                - '0x4c'
                - '0xc4'
              outboundEtxsRoot: >-
                0xab8fa086bb1bbd363ffb25d03b3fc1dd7ec367638be6e2d6ff27ddbb8d131fc7
              parentDeltaEntropy:
                - '0x0'
                - '0x0'
                - '0x231a26aae7abbbd2f4'
              parentEntropy:
                - '0x323a62e45b6837238b24'
                - '0x323a62e45b6837238b24'
                - '0x325dd12ce93390b9fdb1'
              parentHash:
                - >-
                  0x80bb9de7b8d1e21d9afec56855152d00def1cc7c7647083cbbaebad3d51afe53
                - >-
                  0x80bb9de7b8d1e21d9afec56855152d00def1cc7c7647083cbbaebad3d51afe53
              parentUncledDeltaEntropy:
                - '0x0'
                - '0x0'
                - '0x0'
              primeTerminusHash: >-
                0x80bb9de7b8d1e21d9afec56855152d00def1cc7c7647083cbbaebad3d51afe53
              quaiStateSize: '0xad2d'
              receiptsRoot: >-
                0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
              secondaryCoinbase: '0x00A3E45AA16163F2663015B6695894D918866d19'
              size: '0x2a9'
              stateLimit: '0x2625a00'
              stateUsed: '0x0'
              thresholdCount: '0x0'
              transactionsRoot: >-
                0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
              uncleHash: >-
                0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
              uncledEntropy: '0x0'
              utxoRoot: >-
                0x877d9ced2cc8b0fc3108ec5b5a3f09a49d8a70d190bfeeb6d7b482a4d42fc31c
            interlinkHashes: []
            outboundEtxs:
              - blockHash: >-
                  0x44d0080caa510ebbfd94a0b5458f55cf3ef1aae1c927a569e3f7b1d62d14050d
                blockNumber: '0x15e'
                from: '0x0003e45Aa16163f2663015B6695894D918866D19'
                gas: '0x5208'
                hash: >-
                  0xa46b006daf696c20b4cd11232a5dc58a284293d9537357380377dd89141a7ad3
                input: '0x01'
                to: '0x0003e45Aa16163f2663015B6695894D918866D19'
                transactionIndex: '0x0'
                value: '0xf4240'
                type: '0x1'
                accessList: []
                originatingTxHash: >-
                  0x0000a437f4296823f1a95d3f380ac388b9795c84d8d9cc85314618cfeff53d66
                etxIndex: '0x0'
                etxType: '0x1'
            size: '0x437'
            subManifest: []
            totalEntropy: '0x32844728974bc93b6760'
            transactions: []
            uncles: []
            woHeader:
              difficulty: '0x520e7944b'
              headerHash: >-
                0x5de47cfcca055b0a2eea531e7edd14f8b4f8221a7f9b2cc3d80d3b73cfd51a97
              location: '0x0000'
              lock: '0x1'
              mixHash: >-
                0x4d9e77f36ee76199dee28ee5cebfbd08783a62d1f4c66173212c4b0e7babb6da
              nonce: '0xa85880000063d6e1'
              number: '0x15e'
              parentHash: >-
                0x9115a437f4296823f1a95d3f380ac388b9795c84d8d9cc85314618cfeff53d66
              primaryCoinbase: '0x0003e45Aa16163f2663015B6695894D918866D19'
              primeTerminusNumber: '0x4b'
              timestamp: '0x66fd8176'
              txHash: >-
                0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
            workshares: []
          description: The block data for the corresponding number.
        id:
          type: integer
          example: 1

````