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

# Transaction details

> Get a transaction by ID

## Cost

This endpoint costs **0.1 RU** (Request Units) per call.


## OpenAPI

````yaml GET /v1/transactions/{id}
openapi: 3.0.0
info:
  title: Kaspa Developer Platform (KDP) API
  description: >-
    A high-performance REST API providing real-time and historical data from the
    Kaspa blockchain
  version: '1.0'
  contact: {}
servers:
  - url: https://api.kas.fyi
    description: Mainnet API
security: []
tags:
  - name: Address
    description: Operations related to Kaspa addresses
  - name: Block
    description: Operations related to Kaspa blocks
  - name: Transaction
    description: Operations related to Kaspa transactions
  - name: Token
    description: Operations related to KRC20 tokens
  - name: Kaspa Node RPC Proxy
    description: Direct proxy to Kaspa node RPC methods
paths:
  /v1/transactions/{id}:
    get:
      tags:
        - Transaction
      summary: Transaction details
      description: Get a transaction by ID
      operationId: TransactionController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: Transaction ID
          schema:
            example: a7177c55769381a56c126e458c8bb6046613b8a8d45c2f8d3ca5dc71a065279a
            type: string
        - name: include_payload
          required: false
          in: query
          description: >-
            Whether to include the payload of the transaction.  Default is
            `false`.
          schema:
            example: false
            type: boolean
      responses:
        '200':
          description: Transaction details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    GetTransactionResponseDto:
      type: object
      properties:
        transaction:
          description: The transaction details
          allOf:
            - $ref: '#/components/schemas/TransactionResponseDto'
      required:
        - transaction
    TransactionResponseDto:
      type: object
      properties:
        transactionId:
          type: string
          description: Transaction ID
          example: a7177c55769381a56c126e458c8bb6046613b8a8d45c2f8d3ca5dc71a065279a
        blockTime:
          format: int64
          type: integer
          description: Block time
          example: 1749531022210
        subnetworkId:
          type: string
          description: The subnetwork ID of the transaction
          example: '0000000000000000000000000000000000000000'
        hash:
          type: string
          description: Transaction hash
          example: f123bed13d88bc18236d977c0035267d0054b912170fe4ae619e93306685d2af
        mass:
          type: string
          description: The mass of the transaction
          example: '2036'
        blockHashes:
          description: The hashes of the blocks that contain the transaction
          example:
            - 30ab8f5ac54c8aa9cbf9a69209a2061e7123293efc40630136c970abef59450b
            - f97afb6794c56e0bb283ea6a38cc51cc41303a055ef9376e707139928cffa588
          type: array
          items:
            type: string
        acceptingBlockHash:
          type: string
          description: >-
            The hash of the block that accepted the transaction. Returns null if
            the transaction is not accepted.
          example: 2a0c51fab2a7c7a187299e087a244d1e70acdc75e0214a661c62761e2d6bbf4f
        isAccepted:
          type: boolean
          description: Whether the transaction is accepted
          example: true
        confirmations:
          type: number
          description: >-
            The number of confirmations for the transaction, calculated as the
            sink blue score minus the accepting block's blue score. Returns null
            if the transaction is not accepted.
          example: 10
        payload:
          type: string
          description: The payload of the transaction
          example: 0x
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInputResponseDto'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/TransactionOutputResponseDto'
      required:
        - transactionId
        - blockTime
        - subnetworkId
        - hash
        - mass
        - blockHashes
        - acceptingBlockHash
        - isAccepted
        - confirmations
        - payload
        - inputs
        - outputs
    TransactionInputResponseDto:
      type: object
      properties:
        transactionId:
          type: string
          description: Transaction ID
          example: a7177c55769381a56c126e458c8bb6046613b8a8d45c2f8d3ca5dc71a065279a
        index:
          type: number
          description: Index of the transaction
          example: 0
        signatureScript:
          type: string
          description: The signature script of the input
          example: >-
            4183faed776b7f1b1ed32b97aafe3069ee357c80b637f5069ab859916a896ec69a59e9bebcc3e646587d59376a40c72dd0290f8ebdbf0b64f13e2d8f81d0fe106301
        sigOpCount:
          type: number
          description: The number of signature operations in the input
          example: 1
        previousOutput:
          description: The previous output of the input
          allOf:
            - $ref: '#/components/schemas/TransactionOutputResponseDto'
      required:
        - transactionId
        - index
        - signatureScript
        - sigOpCount
        - previousOutput
    TransactionOutputResponseDto:
      type: object
      properties:
        transactionId:
          type: string
          description: Transaction ID
          example: a7177c55769381a56c126e458c8bb6046613b8a8d45c2f8d3ca5dc71a065279a
        index:
          type: number
          description: Index of the transaction
          example: 0
        amount:
          type: string
          description: The amount of this output in sompi.
          example: '31112708372'
        scriptPublicKey:
          type: string
          description: The script public key of the output
          example: 2010fdab002cff0ac15bfc8b982c5a616bef9e5a66f0c655f4f63f7d1cef39d2b4ac
        scriptPublicKeyAddress:
          type: string
          description: The script public key address of the output
          example: kaspa:qqg0m2cq9nls4s2mlj9estz6v947l8j6vmcvv4057clh688088ftg7ce6p895
        scriptPublicKeyType:
          type: string
          description: The script public key type of the output
          example: pubkey
      required:
        - transactionId
        - index
        - amount
        - scriptPublicKey
        - scriptPublicKeyAddress
        - scriptPublicKeyType
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key required for authentication. Get your API key at
        https://developer.kas.fyi

````