Canton Network docsSplice APIs › Scan APIs › Scan API
POST /v2/holdings/state
Updated 20-11-2026
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state' \
--header 'Content-Type: application/json' \
--data '{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}'
import json
import requests
url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"
headers = {'Content-Type': 'application/json'}
payload = json.loads(r'''{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state", bytes.NewBufferString(`{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}`))
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
404
500
{
"record_time": "2026-01-01T00:00:00Z",
"migration_id": 123,
"created_events": [
{
"created_in_update_id": "<string>",
"contract_id": "<string>",
"template_id": "<string>",
"package_name": "<string>",
"create_arguments": {},
"created_at": "2026-01-01T00:00:00Z",
"signatories": [
"<string>"
],
"observers": [
"<string>"
]
}
],
"next_page_token": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
POST
/
api
/
scan
/
v2
/
holdings
/
state
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state' \
--header 'Content-Type: application/json' \
--data '{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}'
import json
import requests
url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"
headers = {'Content-Type': 'application/json'}
payload = json.loads(r'''{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state", bytes.NewBufferString(`{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}`))
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
404
500
{
"record_time": "2026-01-01T00:00:00Z",
"migration_id": 123,
"created_events": [
{
"created_in_update_id": "<string>",
"contract_id": "<string>",
"template_id": "<string>",
"package_name": "<string>",
"create_arguments": {},
"created_at": "2026-01-01T00:00:00Z",
"signatories": [
"<string>"
],
"observers": [
"<string>"
]
}
],
"next_page_token": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
Returns the active amulet contracts for a given migration id and record time, in creation date ascending order, paged.
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state' \
--header 'Content-Type: application/json' \
--data '{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}'
import json
import requests
url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"
headers = {'Content-Type': 'application/json'}
payload = json.loads(r'''{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}''')
response = requests.request(
"POST", url, headers=headers, json=payload
)
print(response.text)
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}),
});
console.log(await response.text());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => <<<'JSON'
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state", bytes.NewBufferString(`{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}`))
req.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(req)
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var request = HttpRequest.newBuilder()
.uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'
uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v2/holdings/state')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"migration_id": 123,
"record_time": "2026-01-01T00:00:00Z",
"record_time_match": "exact",
"after": "<string>",
"page_size": 123,
"owner_party_ids": [
"<string>"
],
"daml_value_encoding": "compact_json"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(request)
end
puts response.body
200
400
404
500
{
"record_time": "2026-01-01T00:00:00Z",
"migration_id": 123,
"created_events": [
{
"created_in_update_id": "<string>",
"contract_id": "<string>",
"template_id": "<string>",
"package_name": "<string>",
"create_arguments": {},
"created_at": "2026-01-01T00:00:00Z",
"signatories": [
"<string>"
],
"observers": [
"<string>"
]
}
],
"next_page_token": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
Body
application/json
OpenAPI type:
integer (int64).The migration id for which to return the ACS.OpenAPI type:
string (date-time).The timestamp at which the contract set was active. This needs to be an exact timestamp, i.e., needs to correspond to a timestamp reported by /v0/state/acs/snapshot-timestamp if record_time_match is set to exact (which is the default). If record_time_match is set to at_or_before, this can be any timestamp, and the most recent snapshot at or before the given record_time will be returned.How to match the record_time. “exact” requires the record_time to match exactly. “at_or_before” finds the most recent snapshot at or before the given record_time.Allowed values:
exact, at_or_before.Pagination token for the next page of results. This token is opaque and not meant to be edited by users.
OpenAPI type:
integer (int32).The maximum number of created events returned for this request.Filters by contracts in which these party_ids are the owners of the amulets.Minimum items: 1; Maximum items: 1000.
OpenAPI type:
DamlValueEncoding.How daml values should be encoded in the response. “compact_json” is a compact, human-readable JSON encoding. It is the same encoding as the one used in the HTTP JSON API (v1) or the JavaScript codegen. “protobuf_json” is a verbose JSON encoding that is more difficult to parse, but contains type information, i.e., the values can be parsed losslessly without having access to the Daml source code. “ledger_api_json” is the JSON encoding of the JSON Ledger API (v2). It is identical to “compact_json”, with two differences: numeric values can be written in a different notation (e.g., “0.0000000000” instead of “0E-10”), and trailing fields of Daml records that are null are omitted. Daml upgrades can add optional fields at the end of a record. With “compact_json”, values created before such an upgrade can be returned with or without the new fields (as null) depending on the version of the app that serves the request. This encoding returns the same JSON regardless of the version. Optional and defaults to “compact_json”. Not all endpoints support all encodings. Requests for an encoding that an endpoint does not support are rejected.Allowed values: compact_json, protobuf_json, ledger_api_json.Responses
200
okapplication/json
Up to
page_size contracts in the ACS. create_arguments are encoded as specified by daml_value_encoding in the request.Show child attributes
Show child attributes
The id of the update in which this contract was created. Optional and will be absent for contracts created in prior migration IDs.
The arguments that have been used to create the contract, in the form of JSON representation of a Daml record.
Ledger effective time of the transaction that created the contract.
When requesting the next page of results, pass this as
after to the AcsRequestV2 or HoldingsStateRequestV2. Will be absent when there are no more pages. This token is opaque and not meant to be edited by users.400
bad requestapplication/json
404
not foundapplication/json
500
internal server errorapplication/json
History
Updated
0.10.3The POST /v2/holdings/state operation changed in this snapshot.
Updated
0.10.0The POST /v2/holdings/state operation changed in this snapshot.
Added
0.7.5