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

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GetCompletionByHash

Ledger API

›

[Protobuf](https://docs.canton.network/reference/protobuf/overview.md)

›

[com.daml.ledger.api.v2](https://docs.canton.network/reference/protobuf/packages/com-daml-ledger-api-v2.md)

›

GetCompletionByHash

com.daml.ledger.api.v2

# GetCompletionByHash

gRPC

[Added 3.6.1](#history-added-3-6-1)

RPC

`/com.daml.ledger.api.v2.CommandCompletionService/GetCompletionByHash`

## Protocol Details

Protocol
gRPC

Service
CommandCompletionService

RPC
GetCompletionByHash

Client stream
No

Server stream
No

## Inputs

### GetCompletionByHashRequest

Message
com.daml.ledger.api.v2.GetCompletionByHashRequest

Client stream
No

`transaction_hash`
bytes

## Outputs

### GetCompletionByHashResponse

Message
com.daml.ledger.api.v2.GetCompletionByHashResponse

Server stream
No

`accepted_completion`
Completion

`last_rejected_completions`
repeated Completion

## Related Schemas

> [accordion] com.daml.ledger.api.v2.GetCompletionByHashRequest
>
> `transaction_hash`
> bytes

> [accordion] com.daml.ledger.api.v2.GetCompletionByHashResponse
>
> `accepted_completion`
> Completion
>
> `last_rejected_completions`
> repeated Completion

> [accordion] com.daml.ledger.api.v2.Completion
>
> `command_id`
> string
>
> `status`
> Status
>
> `update_id`
> string
>
> `user_id`
> string
>
> `act_as`
> repeated string
>
> `submission_id`
> string
>
> `deduplication_offset`
> int64
>
> `deduplication_duration`
> Duration
>
> `trace_context`
> TraceContext
>
> `offset`
> int64
>
> `synchronizer_time`
> SynchronizerTime
>
> `paid_traffic_cost`
> int64
>
> `transaction_hash`
> bytes

> [accordion] com.daml.ledger.api.v2.TraceContext
>
> `traceparent`
> string
>
> `tracestate`
> string

> [accordion] com.daml.ledger.api.v2.SynchronizerTime
>
> `synchronizer_id`
> string
>
> `record_time`
> Timestamp

## History

Added
`3.6.1`

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.CommandCompletionService/GetCompletionByHash <<'EOF'
{
  "transactionHash": "BASE64_ENCODED_BYTES"
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "acceptedCompletion": {
    "commandId": "string",
    "status": "string",
    "updateId": "string",
    "userId": "string",
    "actAs": [
      "string"
    ],
    "submissionId": "string",
    "deduplicationOffset": "0"
  },
  "lastRejectedCompletions": [
    {
      "commandId": "string",
      "status": "string",
      "updateId": "string",
      "userId": "string",
      "actAs": [
        "string"
      ],
      "submissionId": "string",
      "deduplicationOffset": "0"
    }
  ]
}
```
