Hiro Burn Blocks API

Read-only endpoints to obtain burn block details

OpenAPI Specification

hiro-burn-blocks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Signer Metrics Accounts Burn Blocks API
  description: Welcome to the API reference overview for the Signer Metrics API.
  version: 1.0.3
servers:
- url: https://api.hiro.so/
  description: mainnet
- url: https://api.testnet.hiro.so/
  description: testnet
tags:
- name: Burn Blocks
  description: Read-only endpoints to obtain burn block details
paths:
  /extended/v2/burn-blocks/:
    get:
      operationId: get_burn_blocks
      summary: Get burn blocks
      tags:
      - Burn Blocks
      description: Retrieves a list of recent burn blocks
      parameters:
      - schema:
          minimum: 0
          default: 20
          maximum: 30
          title: Limit
          type: integer
        in: query
        name: limit
        required: false
        description: Results per page
      - schema:
          minimum: 0
          default: 0
          title: Offset
          type: integer
        in: query
        name: offset
        required: false
        description: Result offset
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  limit:
                    type: integer
                    example: 20
                  offset:
                    type: integer
                    example: 0
                  total:
                    type: integer
                    example: 1
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        burn_block_time:
                          description: Unix timestamp (in seconds) indicating when this block was mined.
                          type: integer
                        burn_block_time_iso:
                          description: An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
                          type: string
                        burn_block_hash:
                          description: Hash of the anchor chain block
                          type: string
                        burn_block_height:
                          description: Height of the anchor chain block
                          type: integer
                        stacks_blocks:
                          description: Hashes of the Stacks blocks included in the burn block
                          type: array
                          items:
                            type: string
                        avg_block_time:
                          description: Average time between blocks in seconds. Returns 0 if there is only one block in the burn block.
                          type: integer
                        total_tx_count:
                          description: Total number of transactions in the Stacks blocks associated with this burn block
                          type: integer
                      required:
                      - burn_block_time
                      - burn_block_time_iso
                      - burn_block_hash
                      - burn_block_height
                      - stacks_blocks
                      - avg_block_time
                      - total_tx_count
                required:
                - limit
                - offset
                - total
                - results
        4XX:
          description: Default Response
          content:
            application/json:
              schema:
                title: Error Response
                additionalProperties: true
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
  /extended/v2/burn-blocks/{height_or_hash}:
    get:
      operationId: get_burn_block
      summary: Get burn block
      tags:
      - Burn Blocks
      description: Retrieves a single burn block
      parameters:
      - schema:
          anyOf:
          - type: string
            enum:
            - latest
          - pattern: ^(0x)?[a-fA-F0-9]{64}$
            title: Burn block hash
            description: Burn block hash
            examples:
            - 0000000000000000000452773967cdd62297137cdaf79950c5e8bb0c62075133
            type: string
          - title: Burn block height
            description: Burn block height
            examples:
            - 777678
            type: integer
        in: path
        name: height_or_hash
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  burn_block_time:
                    description: Unix timestamp (in seconds) indicating when this block was mined.
                    type: integer
                  burn_block_time_iso:
                    description: An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
                    type: string
                  burn_block_hash:
                    description: Hash of the anchor chain block
                    type: string
                  burn_block_height:
                    description: Height of the anchor chain block
                    type: integer
                  stacks_blocks:
                    description: Hashes of the Stacks blocks included in the burn block
                    type: array
                    items:
                      type: string
                  avg_block_time:
                    description: Average time between blocks in seconds. Returns 0 if there is only one block in the burn block.
                    type: integer
                  total_tx_count:
                    description: Total number of transactions in the Stacks blocks associated with this burn block
                    type: integer
                required:
                - burn_block_time
                - burn_block_time_iso
                - burn_block_hash
                - burn_block_height
                - stacks_blocks
                - avg_block_time
                - total_tx_count
        4XX:
          description: Default Response
          content:
            application/json:
              schema:
                title: Error Response
                additionalProperties: true
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
  /extended/v2/burn-blocks/{height_or_hash}/blocks:
    get:
      operationId: get_blocks_by_burn_block
      summary: Get blocks by burn block
      tags:
      - Burn Blocks
      description: Retrieves a list of blocks confirmed by a specific burn block
      parameters:
      - schema:
          minimum: 0
          default: 20
          maximum: 30
          title: Limit
          type: integer
        in: query
        name: limit
        required: false
        description: Results per page
      - schema:
          minimum: 0
          default: 0
          title: Offset
          type: integer
        in: query
        name: offset
        required: false
        description: Result offset
      - schema:
          anyOf:
          - type: string
            enum:
            - latest
          - pattern: ^(0x)?[a-fA-F0-9]{64}$
            title: Burn block hash
            description: Burn block hash
            examples:
            - 0000000000000000000452773967cdd62297137cdaf79950c5e8bb0c62075133
            type: string
          - title: Burn block height
            description: Burn block height
            examples:
            - 777678
            type: integer
        in: path
        name: height_or_hash
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  limit:
                    type: integer
                    example: 20
                  offset:
                    type: integer
                    example: 0
                  total:
                    type: integer
                    example: 1
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        canonical:
                          description: Set to `true` if block corresponds to the canonical chain tip
                          type: boolean
                        height:
                          description: Height of the block
                          type: integer
                        hash:
                          description: Hash representing the block
                          type: string
                        block_time:
                          description: Unix timestamp (in seconds) indicating when this block was mined.
                          type: integer
                        block_time_iso:
                          description: An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
                          type: string
                        tenure_height:
                          description: The tenure height (AKA coinbase height) of this block
                          type: integer
                        index_block_hash:
                          description: The only hash that can uniquely identify an anchored block or an unconfirmed state trie
                          type: string
                        parent_block_hash:
                          description: Hash of the parent block
                          type: string
                        parent_index_block_hash:
                          description: Index block hash of the parent block
                          type: string
                        burn_block_time:
                          description: Unix timestamp (in seconds) indicating when this block was mined.
                          type: integer
                        burn_block_time_iso:
                          description: An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
                          type: string
                        burn_block_hash:
                          description: Hash of the anchor chain block
                          type: string
                        burn_block_height:
                          description: Height of the anchor chain block
                          type: integer
                        miner_txid:
                          description: Anchor chain transaction ID
                          type: string
                        tx_count:
                          description: Number of transactions included in the block
                          type: integer
                        execution_cost_read_count:
                          description: Execution cost read count.
                          type: integer
                        execution_cost_read_length:
                          description: Execution cost read length.
                          type: integer
                        execution_cost_runtime:
                          description: Execution cost runtime.
                          type: integer
                        execution_cost_write_count:
                          description: Execution cost write count.
                          type: integer
                        execution_cost_write_length:
                          description: Execution cost write length.
                          type: integer
                      required:
                      - canonical
                      - height
                      - hash
                      - block_time
                      - block_time_iso
                      - tenure_height
                      - index_block_hash
                      - parent_block_hash
                      - parent_index_block_hash
                      - burn_block_time
                      - burn_block_time_iso
                      - burn_block_hash
                      - burn_block_height
                      - miner_txid
                      - tx_count
                      - execution_cost_read_count
                      - execution_cost_read_length
                      - execution_cost_runtime
                      - execution_cost_write_count
                      - execution_cost_write_length
                required:
                - limit
                - offset
                - total
                - results
        4XX:
          description: Default Response
          content:
            application/json:
              schema:
                title: Error Response
                additionalProperties: true
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
externalDocs:
  url: https://github.com/hirosystems/signer-metrics-api
  description: Source Repository