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

> Read the ledger's filtered update stream for the specified contents and filters. It returns the event types in accordance with the stream contents selected. Also the selection criteria for individual events depends on the transaction shape chosen.
- ACS delta: a requesting party must be a stakeholder of an event for it to be included. - ledger effects: a requesting party must be a witness of an event for it to be included.

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

›

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

›

subscribe

/v2/updates

# Subscribe updates

WebSocket

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

SUBSCRIBE

`/v2/updates`

Read the ledger's filtered update stream for the specified contents and filters.
It returns the event types in accordance with the stream contents selected. Also the selection criteria
for individual events depends on the transaction shape chosen.

* ACS delta: a requesting party must be a stakeholder of an event for it to be included.
* ledger effects: a requesting party must be a witness of an event for it to be included.

## Protocol Details

Protocol
WebSocket

Channel
/v2/updates

Action
subscribe

Operation ID
onV2Updates

Content type
application/json

Payload
oneOf

## Inputs

## Outputs

### Either\_JsCantonError\_JsGetUpdatesResponse

Direction
Server -> Client

Message
Either\_JsCantonError\_JsGetUpdatesResponse

Variants

#### JsCantonError

object

`code`
string

required

`cause`
string

required

`context`
object

required

`errorCategory`
string

required

#### JsGetUpdatesResponse

object

`update`
object

Variants

#### update

oneOf

`OffsetCheckpoint`
object

Variants

#### OffsetCheckpoint

object

`OffsetCheckpoint`
object

required

#### Reassignment

object

`Reassignment`
object

required

#### TopologyTransaction

object

`TopologyTransaction`
object

required

#### Transaction

object

`Transaction`
object

required

## Related Schemas

> [accordion] Either\_JsCantonError\_JsGetUpdatesResponse
>
> Variants
>
> #### JsCantonError
>
> object
>
> `code`
> string
>
> required
>
> `cause`
> string
>
> required
>
> `context`
> object
>
> required
>
> `errorCategory`
> string
>
> required
>
> #### JsGetUpdatesResponse
>
> object
>
> `update`
> object
>
> Variants
>
> #### update
>
> oneOf
>
> `OffsetCheckpoint`
> object
>
> Variants
>
> #### OffsetCheckpoint
>
> object
>
> `OffsetCheckpoint`
> object
>
> required
>
> #### Reassignment
>
> object
>
> `Reassignment`
> object
>
> required
>
> #### TopologyTransaction
>
> object
>
> `TopologyTransaction`
> object
>
> required
>
> #### Transaction
>
> object
>
> `Transaction`
> object
>
> 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"}}
{
  "code": "<string>",
  "cause": "<string>",
  "context": {},
  "errorCategory": "<integer>"
}
```
