> ## 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.

# Subscribe completions

> Deprecated: please use ``GetCompletions`` instead. Subscribe to command completion events.

[JSON API AsyncAPI](https://docs.canton.network/reference/json-api-asyncapi-reference/index.md)

›

[/v2/commands/completions](https://docs.canton.network/reference/json-api-asyncapi-reference/channels/v2-commands-completions.md)

›

subscribe

/v2/commands/completions

# Subscribe completions

WebSocket

[Updated 3.5](#history-updated-3-5)

SUBSCRIBE

`/v2/commands/completions`

Deprecated: please use `GetCompletions` instead.
Subscribe to command completion events.

## Protocol Details

Protocol
WebSocket

Channel
/v2/commands/completions

Action
subscribe

Operation ID
onV2CommandsCompletions

Content type
application/json

Payload
oneOf

## Inputs

## Outputs

### Either\_JsCantonError\_CompletionStreamResponse

Direction
Server -> Client

Message
Either\_JsCantonError\_CompletionStreamResponse

Variants

#### CompletionStreamResponse

object

`completionResponse`
object

Variants

#### completionResponse

oneOf

`Completion`
object

Variants

#### Completion

object

`Completion`
object

required

#### Empty

object

`Empty`
object

required

#### OffsetCheckpoint

object

`OffsetCheckpoint`
object

required

#### JsCantonError

object

`code`
string

required

`cause`
string

required

`context`
object

required

`errorCategory`
string

required

## Related Schemas

> [accordion] Either\_JsCantonError\_CompletionStreamResponse
>
> Variants
>
> #### CompletionStreamResponse
>
> object
>
> `completionResponse`
> object
>
> Variants
>
> #### completionResponse
>
> oneOf
>
> `Completion`
> object
>
> Variants
>
> #### Completion
>
> object
>
> `Completion`
> object
>
> required
>
> #### Empty
>
> object
>
> `Empty`
> object
>
> required
>
> #### OffsetCheckpoint
>
> object
>
> `OffsetCheckpoint`
> object
>
> required
>
> #### JsCantonError
>
> object
>
> `code`
> string
>
> required
>
> `cause`
> string
>
> required
>
> `context`
> object
>
> required
>
> `errorCategory`
> string
>
> required

## History

Updated
`3.5`

channel description updated; subscribe description updated

wscat

```bash wscat theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx wscat -c <WEBSOCKET_URL>
```

message

application/json

```json message theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "completionResponse": {
    "Completion": {
      "value": {
        "commandId": "<string>",
        "userId": "<string>",
        "actAs": [
          "<string>"
        ],
        "offset": "<integer>",
        "synchronizerTime": "<object>"
      }
    }
  }
}
```
