Get Block
Get a block object given a block ID or block height.
Request:
- requestType is getBlock
- block is the block ID (optional)
- height is the block height (optional if block provided)
- timestamp is the timestamp (in seconds since the genesis block) of the block (optional if height provided)
- includeTransactions is true to include transaction details (optional)
- includeExecutedPhased is true to include approved and executed phased transactions (optional)
- requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
- requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)
Note: block overrides height which overrides timestamp.
Response:
- previousBlockHash (S) is the 32-byte hash of the previous block
- payloadLength (N) is the length (in bytes) of all transactions included in the block
- totalAmountTQT (S) is the total amount (in TQT) of the transactions in the block
- generationSignature (S) is the 32-byte generation signature of the generating account
- generator (S) is the generating account number
- generatorPublicKey (S) is the 32-byte public key of the generating account
- baseTarget (S) is the base target for the next block generation
- payloadHash (S) is the 32-byte hash of the payload (all transactions)
- generatorRS (S) is the Reed-Solomon address of the generating account
- nextBlock (S) is the next block ID
- numberOfTransactions (N) is the number of transactions in the block
- blockSignature (S) is the 64-byte block signature
- transactions (A) is an array of transaction IDs or transaction objects (if includeTransactions provided, refer to Get Transaction for details)
- executedPhasedTransactions (A) is an array of transaction IDs or transaction objects (if includeExecutedPhased provided, refer to Get Transaction for details)
- version (N) is the block version
- totalFeeTQT (S) is the total fee (in TQT) of the transactions in the block
- previousBlock (S) is the previous block ID
- cumulativeDifficulty (S) is the cumulative difficulty for the next block generation
- block (S) is the block ID
- height (N) is the zero-based block height
- timestamp (N) is the timestamp (in seconds since the genesis block) of the block
- lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
- requestProcessingTime (N) is the API request processing time (in millisec)