> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomaestro.org/llms.txt
> Use this file to discover all available pages before exploring further.

> Get all transactions included in a specific Bitcoin block by height or hash with detailed transaction data.

# Transactions by Block



## OpenAPI

````yaml bitcoin/blockchain-indexer-api/openapi.json get /blocks/{height_or_hash}/transactions
openapi: 3.0.3
info:
  title: Bitcoin - Blockchain Indexer API
  description: >-
    This API provides core indexer endpoints with support for Bitcoin
    metaprotocols by delivering real-time, rollback-protected access to
    Bitcoin's UTXO data, enabling developers to build responsive and reliable
    blockchain applications without managing complex infrastructure.


    #### Key Features:

    - **Real-Time Data with Rollback Protection:** Ensures data accuracy by
    handling chain reorganizations gracefully, providing live data without
    sacrificing integrity.

    - **Comprehensive UTXO Indexing:** Specialized pipelines extract, match, and
    process on-chain information, including handling rollbacks, to provide
    accurate and up-to-date data.


    #### Key Benefits for Developers:

    By abstracting the complexities of blockchain data retrieval and processing,
    Maestro's Bitcoin Indexer API empowers developers to focus on building
    innovative applications with confidence in fast and reliable access to
    historical chain data.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v0.2.0
servers:
  - url: https://xbt-mainnet.gomaestro-api.org/v0
    description: Bitcoin Mainnet
  - url: https://xbt-testnet.gomaestro-api.org/v0
    description: Bitcoin Testnet
security:
  - api-key: []
paths:
  /blocks/{height_or_hash}/transactions:
    get:
      tags:
        - Blocks
      summary: Transactions by Block
      description: >-
        Returns a list of all transaction hashes included in the specified
        block. Supports pagination for blocks with a large number of
        transactions.
      operationId: txs_by_block
      parameters:
        - name: height_or_hash
          in: path
          description: Block height or block hash
          required: true
          schema:
            type: string
          example: '878011'
        - name: count
          in: query
          description: The max number of transactions per page
          required: false
          schema:
            allOf:
              - type: integer
                default: 100
                minimum: 0
            nullable: true
        - name: cursor
          in: query
          description: >-
            Pagination cursor string, use the cursor included in a page of
            results to fetch the next page
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Requested data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTxsByBlock'
              example:
                data:
                  - fees: '0'
                    inputs: []
                    metaprotocols:
                      - inscriptions
                    outputs:
                      - address: >-
                          bc1p8k4v4xuz55dv49svzjg43qjxq2whur7ync9tm0xgl5t4wjl9ca9snxgmlt
                        inscriptions: 0
                        runes: 0
                        satoshis: '546'
                        script_pubkey: >-
                          51203daaca9b82a51aca960c1491588246029d7e0fc49e0abdbcc8fd17574be5c74b
                        spending_tx: null
                        vout: 0
                      - address: >-
                          bc1qwzrryqr3ja8w7hnja2spmkgfdcgvqwp5swz4af4ngsjecfz0w0pqud7k38
                        inscriptions: 3519
                        runes: 0
                        satoshis: '314010406'
                        script_pubkey: >-
                          00207086320071974eef5e72eaa01dd9096e10c0383483855ea6b344259c244f73c2
                        spending_tx: >-
                          1179ebbad0019e5743f25c86148f51b70bc705e76392ce1195205b7fb0d3f8d5
                        vout: 1
                      - address: null
                        inscriptions: 0
                        runes: 0
                        satoshis: '0'
                        script_pubkey: >-
                          6a24aa21a9edf17f948f3b2f268b144bd8677617399ea639a55f0e849ba5e6f35af26cc39904
                        spending_tx: null
                        vout: 2
                      - address: null
                        inscriptions: 0
                        runes: 0
                        satoshis: '0'
                        script_pubkey: >-
                          6a2d434f5245012e50087fb834747606ed01ad67ad0f32129ab431e6d18fda214e5b9f350ffc7b6cf3058b9026e765
                        spending_tx: null
                        vout: 3
                    sats_per_vb: 0
                    total_inputs: 0
                    total_outputs: 4
                    tx_hash: >-
                      a306a1cb42f0e703219e0c2abb8cca08c85c8a3a55d4c0a119d62156a4cf435e
                    tx_index: 0
                    volume: '314010952'
                  - fees: '30300'
                    inputs:
                      - address: >-
                          bc1q5yw0e7hq42zwshvvq3sy2z07n7lg72elhdt8s577egxe2agm3xnq9nekyr
                        inscriptions: 0
                        runes: 0
                        satoshis: '94253892'
                        script_pubkey: >-
                          0020a11cfcfae0aa84e85d8c04604509fe9fbe8f2b3fbb567853deca0d95751b89a6
                        txid: >-
                          65ff8bb5ab3feeeb1cdd47a200fc3d54ac70e4e4b1ca1c7e33f56207db7ddf86
                        vout: 1
                    metaprotocols: []
                    outputs:
                      - address: >-
                          bc1q0wu0tqp2u3rtunjl0h0rsl9pvf86acy6sep63st0lp7lgg67ykzqeq89pn
                        inscriptions: 0
                        runes: 0
                        satoshis: '9790000'
                        script_pubkey: >-
                          00207bb8f5802ae446be4e5f7dde387ca1624faee09a8643a8c16ff87df4235e2584
                        spending_tx: >-
                          0c135cbd187ef5ed2ab266f02910cabfd6fa0993d1dbf6627a33363fba38181d
                        vout: 0
                      - address: >-
                          bc1qnq7td9m6xex4gqeu2d3t6j8tqkpwfxwt2dn2t07m6hnl9svcn54qu5hax4
                        inscriptions: 0
                        runes: 0
                        satoshis: '84433592'
                        script_pubkey: >-
                          0020983cb6977a364d54033c5362bd48eb0582e499cb5366a5bfdbd5e7f2c1989d2a
                        spending_tx: >-
                          4075db2355cdcac155657c55a24a46e2fd083fc88dedd54bc900288a61a688e7
                        vout: 1
                    sats_per_vb: 151
                    total_inputs: 1
                    total_outputs: 2
                    tx_hash: >-
                      04ac1f8968de3d1db8a6fc6504005e391ab8a85bb4a48b3d7f3e66e747d559ea
                    tx_index: 1
                    volume: '94223592'
                last_updated:
                  block_hash: >-
                    0000000000000000000122b2c240af790ee979f6e96175c00045cf54aa5a7001
                  block_height: 878055
                next_cursor: AQE
        '400':
          description: Malformed query parameters
        '404':
          description: Requested entity not found on-chain
        '500':
          description: Internal server error
components:
  schemas:
    PaginatedTxsByBlock:
      type: object
      required:
        - data
        - last_updated
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TxByBlock'
        last_updated:
          $ref: '#/components/schemas/ChainTip'
        next_cursor:
          type: string
          nullable: true
    TxByBlock:
      type: object
      required:
        - tx_hash
        - tx_index
        - volume
        - fees
        - sats_per_vb
        - metaprotocols
        - total_inputs
        - inputs
        - total_outputs
        - outputs
      properties:
        fees:
          type: string
          description: Fees paid to the miner.
          example: '2504'
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/TxInByBlock'
          description: >-
            Summary of the inputs of the transaction. Maximum 10 returned
            inputs.
        metaprotocols:
          type: string
          description: >-
            List of supported metaprotocols involved in one or more transactions
            within the block.
          example: '["inscriptions", "runes"]'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/TxOutByBlock'
          description: >-
            Summary of the outputs of the transaction. Maximum 10 returned
            outputs.
        sats_per_vb:
          type: integer
          format: int64
          description: sats per vB of the transaction.
          example: 15
          minimum: 0
        total_inputs:
          type: integer
          format: int64
          description: >-
            Total number of inputs. No inputs means this is the coinbase
            transaction.
          example: 5
          minimum: 0
        total_outputs:
          type: integer
          format: int64
          description: Total number of outputs.
          example: 2
          minimum: 0
        tx_hash:
          type: string
          description: Transaction hash.
          example: 2ca28d42583fc5bace84fe024d3697969e06dd1cf769a2141286825b81773fd5
        tx_index:
          type: integer
          format: int32
          description: Transaction index in block.
          example: 0
          minimum: 0
        volume:
          type: string
          description: >-
            Total number of satoshis that went through this transaction, minus
            fees.
          example: '12345678'
    ChainTip:
      type: object
      required:
        - block_hash
        - block_height
      properties:
        block_hash:
          type: string
          description: The hash of the block
          example: 0000000000000000000a7f3b7b6b6e1d9a18db65a3b4a3f4f3bcb2e1f1b2d3e7
        block_height:
          type: integer
          format: int64
          description: The height of the block in the blockchain
          example: 707000
          minimum: 0
    TxInByBlock:
      type: object
      required:
        - txid
        - vout
        - script_pubkey
        - satoshis
        - inscriptions
        - runes
      properties:
        address:
          type: string
          description: Address-encoding of the script pubkey at which the input resides.
          example: bc1p5u4y8vdhn46adxhfv5scfv4c8myykw6r5uyzlavm42k4wgjewktq7xqcyr
          nullable: true
        inscriptions:
          type: integer
          description: Number of inscriptions in the UTxO.
          example: 1234567
          minimum: 0
        runes:
          type: integer
          description: Number of rune kinds in the UTxO.
          example: 1234567
          minimum: 0
        satoshis:
          type: string
          description: Total number of satoshis in the UTxO.
          example: '1234567'
        script_pubkey:
          type: string
          description: Script pubkey at which the input resides.
          example: 5120a72a43b1b79d75d69ae9652184b2b83ec84b3b43a7082ff59baaad5722597596
        txid:
          type: string
          description: Transaction hash of the UTxO.
          example: 2ca28d42583fc5bace84fe024d3697969e06dd1cf769a2141286825b81773fd5
        vout:
          type: integer
          format: int32
          description: Output index of the UTxO.
          example: 0
          minimum: 0
    TxOutByBlock:
      type: object
      required:
        - vout
        - script_pubkey
        - satoshis
        - inscriptions
        - runes
      properties:
        address:
          type: string
          description: Address-encoding of the script pubkey at which the input resides.
          example: bc1p5u4y8vdhn46adxhfv5scfv4c8myykw6r5uyzlavm42k4wgjewktq7xqcyr
          nullable: true
        inscriptions:
          type: integer
          description: Number of inscriptions in the UTxO.
          example: 1234567
          minimum: 0
        runes:
          type: integer
          description: Number of rune kinds in the UTxO.
          example: 1234567
          minimum: 0
        satoshis:
          type: string
          description: Total number of satoshis in the UTxO.
          example: '1234567'
        script_pubkey:
          type: string
          description: Script pubkey at which the input resides.
          example: 5120a72a43b1b79d75d69ae9652184b2b83ec84b3b43a7082ff59baaad5722597596
        spending_tx:
          type: string
          description: >-
            If this output is known to have been spent, hash of the transaction
            that spent it.
          example: 2ca28d42583fc5bace84fe024d3697969e06dd1cf769a2141286825b81773fd5
          nullable: true
        vout:
          type: integer
          format: int32
          description: Output index of the UTxO.
          example: 0
          minimum: 0
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````