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

# Get indexed protocol events for a transaction



## OpenAPI

````yaml /public/reference/openapi.json get /v1/transactions/{hash}
openapi: 3.1.0
info:
  description: >-
    Public Tayho API for indexed protocol state, live calculations, relayed
    actions, and automatic-order lifecycle.
  title: Tayho API
  version: 1.0.0
servers:
  - description: Development
    url: https://api.testnet.tayho.io
security: []
tags:
  - name: System
  - name: Markets
  - name: Positions
  - name: Traders
  - name: Orders
  - name: Intents
  - name: Actions
  - name: Portfolio
  - name: Vault
  - name: Staking
  - name: Trading
  - name: Realtime
paths:
  /v1/transactions/{hash}:
    get:
      tags:
        - System
      summary: Get indexed protocol events for a transaction
      operationId: getV1TransactionsByHash
      parameters:
        - in: path
          name: hash
          required: true
          schema:
            examples:
              - >-
                0x2222222222222222222222222222222222222222222222222222222222222222
            pattern: ^0x[0-9a-fA-F]{64}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV1TransactionsByHashResponse'
          description: Successful response.
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '422':
          $ref: '#/components/responses/Error422'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '502':
          $ref: '#/components/responses/Error502'
        '503':
          $ref: '#/components/responses/Error503'
        '504':
          $ref: '#/components/responses/Error504'
      security:
        - TayhoApiKey: []
components:
  schemas:
    GetV1TransactionsByHashResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/TransactionCorrelation'
      required:
        - data
      type: object
    TransactionCorrelation:
      additionalProperties: false
      properties:
        events:
          additionalProperties: true
          properties:
            funding:
              items:
                $ref: '#/components/schemas/FundingUpdate'
              type: array
            fundingSettlement:
              items:
                $ref: '#/components/schemas/FundingSettlement'
              type: array
            market:
              items:
                $ref: '#/components/schemas/ProtocolEvent'
              type: array
            position:
              items:
                $ref: '#/components/schemas/PositionEvent'
              type: array
            settlement:
              items:
                $ref: '#/components/schemas/SettlementEvent'
              type: array
            staking:
              items:
                $ref: '#/components/schemas/StakingEvent'
              type: array
            transfers:
              items:
                $ref: '#/components/schemas/TransferEvent'
              type: array
            vault:
              items:
                $ref: '#/components/schemas/VaultEvent'
              type: array
          required: []
          type: object
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - transactionHash
        - events
      type: object
    TayhoError:
      additionalProperties: true
      properties:
        code:
          type: string
        error:
          type: string
        requestId:
          pattern: ^[A-Za-z0-9._:-]{8,128}$
          type: string
      required:
        - error
      type: object
    FundingUpdate:
      additionalProperties: true
      properties:
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        id:
          type: string
        intervalStart:
          $ref: '#/components/schemas/UnsignedIntegerString'
        logIndex:
          minimum: 0
          type: integer
        marketId:
          $ref: '#/components/schemas/UnsignedIntegerString'
        ratePerHourWad:
          $ref: '#/components/schemas/IntegerString'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - marketId
      type: object
    FundingSettlement:
      additionalProperties: true
      properties:
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        direction:
          enum:
            - LONG
            - SHORT
        id:
          type: string
        logIndex:
          minimum: 0
          type: integer
        marketId:
          $ref: '#/components/schemas/UnsignedIntegerString'
        payerWad:
          $ref: '#/components/schemas/UnsignedIntegerString'
        receiverWad:
          $ref: '#/components/schemas/UnsignedIntegerString'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - marketId
        - direction
        - receiverWad
        - payerWad
      type: object
    ProtocolEvent:
      additionalProperties: true
      properties:
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        flag:
          type:
            - boolean
            - 'null'
        id:
          type: string
        kind:
          type: string
        logIndex:
          minimum: 0
          type: integer
        marketId:
          $ref: '#/components/schemas/UnsignedIntegerString'
        secondaryValue:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
        transactionHash:
          $ref: '#/components/schemas/Hash'
        valueWad:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - kind
        - marketId
      type: object
    PositionEvent:
      additionalProperties: true
      properties:
        amountWad:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        id:
          type: string
        kind:
          type: string
        logIndex:
          minimum: 0
          type: integer
        marketId:
          anyOf:
            - $ref: '#/components/schemas/UnsignedIntegerString'
            - type: 'null'
        positionId:
          $ref: '#/components/schemas/UnsignedIntegerString'
        secondaryAmountWad:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
        tertiaryAmountWad:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
        trader:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - positionId
        - kind
      type: object
    SettlementEvent:
      additionalProperties: true
      properties:
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        id:
          type: string
        logIndex:
          minimum: 0
          type: integer
        pnlWad:
          $ref: '#/components/schemas/IntegerString'
        positionId:
          $ref: '#/components/schemas/UnsignedIntegerString'
        trader:
          $ref: '#/components/schemas/Address'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - trader
        - positionId
      type: object
    StakingEvent:
      additionalProperties: true
      properties:
        account:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        amount:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        id:
          type: string
        kind:
          type: string
        logIndex:
          minimum: 0
          type: integer
        secondaryAmount:
          anyOf:
            - $ref: '#/components/schemas/UnsignedIntegerString'
            - type: 'null'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - kind
        - amount
      type: object
    TransferEvent:
      additionalProperties: true
      properties:
        amount:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        from:
          $ref: '#/components/schemas/Address'
        id:
          type: string
        logIndex:
          minimum: 0
          type: integer
        to:
          $ref: '#/components/schemas/Address'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - from
        - to
      type: object
    VaultEvent:
      additionalProperties: true
      properties:
        account:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        amountWad:
          anyOf:
            - $ref: '#/components/schemas/IntegerString'
            - type: 'null'
        blockNumber:
          $ref: '#/components/schemas/UnsignedIntegerString'
        blockTimestamp:
          $ref: '#/components/schemas/UnsignedIntegerString'
        id:
          type: string
        kind:
          type: string
        logIndex:
          minimum: 0
          type: integer
        marketId:
          anyOf:
            - $ref: '#/components/schemas/UnsignedIntegerString'
            - type: 'null'
        referenceId:
          anyOf:
            - $ref: '#/components/schemas/UnsignedIntegerString'
            - type: 'null'
        transactionHash:
          $ref: '#/components/schemas/Hash'
      required:
        - id
        - blockNumber
        - blockTimestamp
        - transactionHash
        - logIndex
        - kind
      type: object
    Hash:
      pattern: ^0x[0-9a-fA-F]{64}$
      type: string
    UnsignedIntegerString:
      pattern: ^(?:0|[1-9][0-9]*)$
      type: string
    IntegerString:
      pattern: ^-?(?:0|[1-9][0-9]*)$
      type: string
    Address:
      pattern: ^0x[0-9a-fA-F]{40}$
      type: string
  responses:
    Error401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: Missing or invalid API key.
    Error403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: The API key does not grant the required scope.
    Error404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: The requested resource does not exist.
    Error422:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: Request validation failed.
    Error429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: The applicable request quota was exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            minimum: 1
            type: integer
    Error500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: The request failed unexpectedly.
    Error502:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: A dependency returned an invalid or unsuccessful response.
    Error503:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: A required Tayho dependency is temporarily unavailable.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            minimum: 1
            type: integer
    Error504:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TayhoError'
      description: A required Tayho dependency timed out.
  securitySchemes:
    TayhoApiKey:
      description: Tayho project API key with the scope declared by the operation.
      in: header
      name: X-API-Key
      type: apiKey

````