Canton Network docsLedger API › AsyncAPI › v2/state/active-contracts
Publish active contracts
Updated 03-12-2026
PUBLISH
Returns a stream of the snapshot of the active contracts and incomplete (un)assignments at a ledger offset.
This endpoint does not accept /v2/state/active-contractsfilters_by_contract_id in EventFormat.
Once the stream of GetActiveContractsResponses completes,
the client SHOULD begin streaming updates from the update service,
starting at the GetActiveContractsRequest.active_at_offset specified in this request.
Clients SHOULD NOT assume that the set of active contracts they receive reflects the state at the ledger end.
If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset,
the snapshot may fail with “FAILED_PRECONDITION/PARTICIPANT_PRUNED_DATA_ACCESSED”.
Note that it is ok to request acs snapshots for party migration with offsets other than ledger end, because party
migration is not concerned with incomplete (un)assignments.Required permissions: ledger:read and CanReadAs for the required parties.Protocol Details
ProtocolWebSocket
Channel/v2/state/active-contracts
Actionpublish
Operation IDsendV2StateActive-contracts
Content typeapplication/json
Payloadobject
Inputs
DirectionClient -> Server
MessageGetActiveContractsRequest
activeAtOffsetstringrequiredeventFormatobjectrequiredOutputs
Related Schemas
GetActiveContractsRequest
GetActiveContractsRequest
activeAtOffsetstringrequiredeventFormatobjectrequiredHistory
Updated
3.8channel description updated
Updated
3.7channel description updated; publish required fields added: eventFormat
Updated
3.5channel description updated; publish description updated; publish required fields removed: eventFormat
wscat
wscat
npx wscat \
-c <WEBSOCKET_URL> \
-x '{"activeAtOffset": "<integer>", "eventFormat": {"filtersByParty": {}, "filtersForAnyParty": {"cumulative": ["<object>"]}, "verbose": "<boolean>", "filtersByContractId": {"contractId": ["<string>"]}}}' \
-w -1
messageapplication/json
message
{
"activeAtOffset": "<integer>",
"eventFormat": {
"filtersByParty": {},
"filtersForAnyParty": {
"cumulative": [
"<object>"
]
},
"verbose": "<boolean>",
"filtersByContractId": {
"contractId": [
"<string>"
]
}
}
}