The blocks field allows us to retrieve details about the blocks from the Dogecoin network.
Here is an example that demonstrates how to retrieve blocks data:
query MyQuery {
bitcoin(network: dogecoin) {
blocks(options: {limit: 10, desc: "timestamp.iso8601"}) {
blockHash
blockSize
blockSizeBigInt
blockStrippedSize
blockVersion
blockWeight
chainwork
difficulty
height
timestamp {
iso8601
}
}
}
}
Filtering Blocks
Blocks can be filtered using the following arguments:
any:blockHash: Filter by block hashblockSize: Filter by block sizeblockStrippedSize: Filter by stripped size of blockblockVersion: Filter by version of the blockblockWeight: Filter by block weightdate: Filter by selecting time in range, list or just datedifficulty: Filter by difficulty of the networkheight: Filter by selecting height of the blockoptions: Filter returned data by ordering, limiting, and constraining it.time: Filter by selecting time in range, list or just timetransactionCount: Filter by transction count in the block
The following fields are available for the blocks:
any:blockHash: returns hash of blockblockSize: returns size of the blockblockSizeBigInt: returns size of the block inBigIntformatblockStrippedSize: returns stripped size of blockblockVersion: returns version of blockblockWeight: returns block weightchainwork: returns chainwork for Dogecoincount: returns aggregate count of blockscountBigInt: returns aggregate count of blocks inBigIntformatdate: returns date when block was mineddifficulty: returns difficultyexpression: performs arithematic operation on fields in the query and returns value of the operationheight: returns height of the blockmaximum: returns maximum of selected measurable fields of Dogecoin BlocksmedianTime: returns median timestamp for blockminimum: returns maximum of selected measurable fields of Dogecoin Blockstimestamp: returns block timestamptransactionCount: returns number of transactions in block