Get block
Retrieves a single block.
Path Parameters
Response Body
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
Set to true
if block corresponds to the canonical chain tip
Height of the block
Hash representing the block
Unix timestamp (in seconds) indicating when this block was mined.
An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
The tenure height (AKA coinbase height) of this block
The only hash that can uniquely identify an anchored block or an unconfirmed state trie
Hash of the parent block
Index block hash of the parent block
Unix timestamp (in seconds) indicating when this block was mined.
An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
Hash of the anchor chain block
Height of the anchor chain block
Anchor chain transaction ID
Number of transactions included in the block
Execution cost read count.
Execution cost read length.
Execution cost runtime.
Execution cost write count.
Execution cost write length.
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
curl -X GET "https://api.hiro.so//extended/v2/blocks/latest"
fetch("https://api.hiro.so//extended/v2/blocks/latest")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//extended/v2/blocks/latest"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.hiro.so//extended/v2/blocks/latest"
response = requests.request("GET", url)
print(response.text)
{
"canonical": true,
"height": 0,
"hash": "string",
"block_time": 0,
"block_time_iso": "string",
"tenure_height": 0,
"index_block_hash": "string",
"parent_block_hash": "string",
"parent_index_block_hash": "string",
"burn_block_time": 0,
"burn_block_time_iso": "string",
"burn_block_hash": "string",
"burn_block_height": 0,
"miner_txid": "string",
"tx_count": 0,
"execution_cost_read_count": 0,
"execution_cost_read_length": 0,
"execution_cost_runtime": 0,
"execution_cost_write_count": 0,
"execution_cost_write_length": 0
}
{
"error": "string",
"message": "string"
}