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

# Publish command completions

> Subscribe to command completion events. This streaming endpoint provides more flexibility in filtering than the predecessor ``CompletionStream``.

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

›

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

›

publish

/v2/commands/command-completions

# Publish command completions

WebSocket

[Added 3.5](#history-added-3-5)

PUBLISH

`/v2/commands/command-completions`

Subscribe to command completion events.
This streaming endpoint provides more flexibility in filtering than the predecessor `CompletionStream`.

## Protocol Details

Protocol
WebSocket

Channel
/v2/commands/command-completions

Action
publish

Operation ID
sendV2CommandsCommand-completions

Content type
application/json

Payload
object

## Inputs

### GetCompletionsRequest

Direction
Client -> Server

Message
GetCompletionsRequest

`parties`
array\[string]

`beginExclusive`
string

## Outputs

## Related Schemas

> [accordion] GetCompletionsRequest
>
> `parties`
> array\[string]
>
> `beginExclusive`
> string

## History

Added
`3.5`

wscat

```bash wscat theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx wscat \
  -c <WEBSOCKET_URL> \
  -x '{"parties": ["<string>"], "beginExclusive": "<integer>"}' \
  -w -1
```

message

application/json

```json message theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "parties": [
    "<string>"
  ],
  "beginExclusive": "<integer>"
}
```
