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

# Transaction outcome

> Understand Relay's automatic and replayed terminal transaction messages.

Relay sends `transaction.outcome` automatically for successful WebSocket submissions on the submitting connection. It includes the original client `id`, Relay `requestId`, and `txHash`; no explicit subscription or client acknowledgement is required. An immediate submission rejection has no outcome subscription. After a reconnect subscription, the outcome instead carries the new subscription `id`. A retained terminal outcome may arrive immediately in response to `transaction.subscribe`, without a `SUBSCRIBED` acknowledgement.

Terminal statuses are `CONFIRMED`, `REVERTED`, `REPLACED`, and `UNKNOWN`. `CONFIRMED` reflects finality and successful **outer-transaction** execution, but the currently deployed implementation does not prove the intended trading-wallet action ran. Reconcile the expected trading events and resulting account/order state before treating the logical action as complete. See [Relay errors and outcomes](/api/relay/errors#websocket-transaction-outcomes) for status details and recovery limits.


## AsyncAPI

````yaml api/relay/asyncapi.yaml transactionOutcome
id: transactionOutcome
title: Transaction outcome
description: >-
  Terminal outcome delivered automatically for a submission or replayed after a
  subscription.
servers:
  - id: mainnet
    protocol: wss
    host: relay.mainnet.kuru.io
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: relay.testnet.kuru.io
    bindings: []
    variables: []
address: /relay/ws
parameters: []
bindings:
  - protocol: ws
    version: 0.1.0
    value:
      method: GET
      query:
        type: object
        required:
          - account_id
        properties:
          account_id:
            type: string
            pattern: ^[1-9][0-9]*$
            maxLength: 13
            description: >-
              Exactly one canonical positive uint40 Kuru trading account ID (1
              through 1099511627775), without leading zero, sign, or whitespace.
            examples: &ref_0
              - '123'
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: query
        type: object
        required: false
        properties:
          - name: account_id
            type: string
            description: >-
              Exactly one canonical positive uint40 Kuru trading account ID (1
              through 1099511627775), without leading zero, sign, or whitespace.
            examples: *ref_0
            required: true
operations:
  - &ref_1
    id: transactionOutcome
    title: Transaction outcome
    type: send
    messages:
      - &ref_2
        id: outcome
        contentType: application/json
        payload:
          - name: transaction.outcome
            type: object
            properties:
              - name: type
                type: string
                description: transaction.outcome
                required: true
              - name: id
                type: string
                description: Original submission ID or reconnect subscription ID.
                required: true
              - name: requestId
                type: string
                required: true
              - name: status
                type: string
                enumValues:
                  - CONFIRMED
                  - REVERTED
                  - REPLACED
                  - UNKNOWN
                required: true
              - name: txHash
                type: string
                required: true
              - name: replacementTxHash
                type: string
                required: false
              - name: blockNumber
                type: string
                description: Decimal block number when known.
                required: false
              - name: blockHash
                type: string
                required: false
              - name: observedAt
                type: string
                required: true
              - name: revert
                type: object
                required: false
                properties:
                  - name: source
                    type: string
                    enumValues:
                      - trace
                      - historical_call
                      - post_block_call
                      - unknown
                    required: true
                  - name: data
                    type: string
                    required: false
                  - name: selector
                    type: string
                    required: false
                  - name: name
                    type: string
                    required: false
                  - name: message
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - id
            - requestId
            - status
            - txHash
            - observedAt
          description: >-
            Automatically delivered on the submitting connection with the
            original client id, or replayed for transaction.subscribe using the
            subscription id. No client acknowledgement is required. CONFIRMED
            checks finality and outer-transaction success, but the deployed
            implementation does not prove the intended wallet action executed.
            Reconcile trading events and account state.
          properties:
            type:
              type: string
              const: transaction.outcome
              x-parser-schema-id: <anonymous-schema-39>
            id:
              type: string
              description: Original submission ID or reconnect subscription ID.
              x-parser-schema-id: <anonymous-schema-40>
            requestId:
              type: string
              x-parser-schema-id: <anonymous-schema-41>
            status:
              type: string
              enum:
                - CONFIRMED
                - REVERTED
                - REPLACED
                - UNKNOWN
              x-parser-schema-id: <anonymous-schema-42>
            txHash:
              type: string
              x-parser-schema-id: <anonymous-schema-43>
            replacementTxHash:
              type: string
              x-parser-schema-id: <anonymous-schema-44>
            blockNumber:
              type: string
              description: Decimal block number when known.
              x-parser-schema-id: <anonymous-schema-45>
            blockHash:
              type: string
              x-parser-schema-id: <anonymous-schema-46>
            observedAt:
              type: string
              format: date-time
              x-parser-schema-id: <anonymous-schema-47>
            revert:
              type: object
              additionalProperties: false
              required:
                - source
              properties:
                source:
                  type: string
                  enum:
                    - trace
                    - historical_call
                    - post_block_call
                    - unknown
                  x-parser-schema-id: <anonymous-schema-49>
                data:
                  type: string
                  x-parser-schema-id: <anonymous-schema-50>
                selector:
                  type: string
                  x-parser-schema-id: <anonymous-schema-51>
                name:
                  type: string
                  x-parser-schema-id: <anonymous-schema-52>
                message:
                  type: string
                  x-parser-schema-id: <anonymous-schema-53>
              x-parser-schema-id: <anonymous-schema-48>
          x-parser-schema-id: TransactionOutcome
        title: transaction.outcome
        example: |-
          {
            "type": "transaction.outcome",
            "id": "order-42",
            "requestId": "018f5ef2-88a1-7b41-a826-4b679010f87f",
            "status": "CONFIRMED",
            "txHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "blockNumber": "123",
            "blockHash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "observedAt": "2026-10-20T00:00:00Z"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: outcome
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: transactionOutcome
sendOperations: []
receiveOperations:
  - *ref_1
sendMessages: []
receiveMessages:
  - *ref_2
extensions:
  - id: x-parser-unique-object-id
    value: transactionOutcome
securitySchemes:
  - id: bearerAuth
    name: bearerAuth
    type: http
    description: Wallet-bound JWT supplied in the WebSocket upgrade Authorization header.
    scheme: bearer
    bearerFormat: JWT
    extensions: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.