Get recent blocks

Retrieves a list of recently mined blocks.

GET
/extended/v1/block

Query Parameters

limit?Limit

max number of blocks to fetch

Default20
Rangevalue <= 30
offset?Offset

Result offset

Default0

Response Body

GET request that returns blocks

TypeScript Definitions

Use the response body type in TypeScript.

limitinteger
offsetinteger
totalinteger
resultsarray<Block>

Default Response

TypeScript Definitions

Use the response body type in TypeScript.

errorstring
message?string
[key: string]any
curl -X GET "https://api.hiro.so//extended/v1/block/?limit=20&offset=0"
fetch("https://api.hiro.so//extended/v1/block/?limit=20&offset=0")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.hiro.so//extended/v1/block/?limit=20&offset=0"

  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/v1/block/?limit=20&offset=0"

response = requests.request("GET", url)

print(response.text)
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "results": [
    {
      "canonical": true,
      "height": 0,
      "hash": "string",
      "block_time": 0,
      "block_time_iso": "string",
      "tenure_height": 0,
      "index_block_hash": "string",
      "parent_block_hash": "string",
      "burn_block_time": 0,
      "burn_block_time_iso": "string",
      "burn_block_hash": "string",
      "burn_block_height": 0,
      "miner_txid": "string",
      "execution_cost_read_count": 0,
      "execution_cost_read_length": 0,
      "execution_cost_runtime": 0,
      "execution_cost_write_count": 0,
      "execution_cost_write_length": 0,
      "txs": [
        "string"
      ],
      "parent_microblock_hash": "string",
      "parent_microblock_sequence": 0,
      "microblocks_accepted": [
        "string"
      ],
      "microblocks_streamed": [
        "string"
      ],
      "microblock_tx_count": {
        "property1": 0,
        "property2": 0
      }
    }
  ]
}
{
  "error": "string",
  "message": "string"
}