> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-generated-reference-full-stack-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/holdings/summary

> Returns the summary of active amulet contracts for a given migration id and record time, for the given parties. This is an aggregate of `/v0/holdings/state` by owner party ID with better performance than client-side computation. Unlike /v0/holdings/summary, this version does not include holding fee fields as they do not express a meaningful aggregate value.

<div class="x2mdx-ref-page x2mdx-ref-page--operation x2mdx-ref-page--manual-api" />

<div class="x2mdx-ref-hero">
  <p class="x2mdx-ref-summary">Returns the summary of active amulet contracts for a given migration id and record time, for the given parties. This is an aggregate of `/v0/holdings/state` by owner party ID with better performance than client-side computation. Unlike /v0/holdings/summary, this version does not include holding fee fields as they do not express a meaningful aggregate value.</p>

  <div class="x2mdx-ref-badges">
    <span class="x2mdx-ref-badge x2mdx-ref-badge--protocol">OpenAPI</span>

    <a class="x2mdx-ref-badge x2mdx-ref-badge--added" href="#history-added-0-6-3">Added 0.6.3</a>
  </div>
</div>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v1/holdings/summary' \
    --header 'Content-Type: application/json' \
    --data '{
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }'
  ```

  ```python Python theme={null}
  import json
  import requests

  url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v1/holdings/summary"
  headers = {'Content-Type': 'application/json'}
  payload = json.loads(r'''{
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }''')
  response = requests.request(
      "POST", url, headers=headers, json=payload
  )

  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v1/holdings/summary', {
    method: 'POST',
    headers: {
    "Content-Type": "application/json"
  },
    body: JSON.stringify({
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }),
  });

  console.log(await response.text());
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v1/holdings/summary',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS => <<<'JSON'
  {
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }
  JSON,
      CURLOPT_HTTPHEADER => [
          "Content-Type: application/json"
      ],
  ]);

  $response = curl_exec($curl);
  echo $response;
  ```

  ```go Go theme={null}
  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/v1/holdings/summary", bytes.NewBufferString(`{
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }`))
    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))
  }
  ```

  ```java Java theme={null}
  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/v1/holdings/summary"))
      .header("Content-Type", "application/json")
      .method("POST", HttpRequest.BodyPublishers.ofString("""
  {
    "migration_id": 123,
    "record_time": "2026-01-01T00:00:00Z",
    "record_time_match": "exact",
    "owner_party_ids": [
      "<string>"
    ]
  }
  """))
      .build();
  var response = HttpClient.newHttpClient().send(
      request, HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'uri'

  uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v1/holdings/summary')
  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",
    "owner_party_ids": [
      "<string>"
    ]
  }
  JSON
  response = Net::HTTP.start(uri.hostname, uri.port) do |http|
    http.request(request)
  end
  puts response.body
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "record_time": "2026-01-01T00:00:00Z",
    "migration_id": 123,
    "summaries": [
      {
        "party_id": "<string>",
        "total_unlocked_coin": "<string>",
        "total_locked_coin": "<string>",
        "total_coin_holdings": "<string>"
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": "<string>"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "<string>"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "<string>"
  }
  ```
</ResponseExample>

## Body

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ParamField body="migration_id" type="number" required>
  OpenAPI type: <code>integer (int64)</code>.

  The migration id for which to return the summary.
</ParamField>

<ParamField body="record_time" type="string" required>
  OpenAPI type: <code>string (date-time)</code>.

  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.
</ParamField>

<ParamField body="record_time_match" type="string" default="exact">
  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: <code>exact</code>, <code>at\_or\_before</code>.
</ParamField>

<ParamField body="owner_party_ids" type="string[]" required>
  The owners for which to compute the summary.

  Minimum items: 1.
</ParamField>

## Responses

### 200

ok

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="record_time" type="string (date-time)" required>
  The same `record_time` as in the request.
</ResponseField>

<ResponseField name="migration_id" type="integer (int64)" required>
  The same `migration_id` as in the request.
</ResponseField>

<ResponseField name="summaries" type="HoldingsSummaryV1[]" required>
  <Expandable title="child attributes">
    <ResponseField name="party_id" type="string" required>
      Owner party ID of the amulet. Guaranteed to be unique among `summaries`.
    </ResponseField>

    <ResponseField name="total_unlocked_coin" type="string" required>
      Sum of unlocked amulet initial amounts, not counting holding fees deducted since.
    </ResponseField>

    <ResponseField name="total_locked_coin" type="string" required>
      Sum of locked amulet initial amounts, not counting holding fees deducted since.
    </ResponseField>

    <ResponseField name="total_coin_holdings" type="string" required>
      `total_unlocked_coin` + `total_locked_coin`.
    </ResponseField>
  </Expandable>
</ResponseField>

### 400

bad request

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="error" type="string" required />

### 404

not found

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="error" type="string" required />

### 500

internal server error

<div class="x2mdx-ref-badges">
  <span class="x2mdx-ref-badge x2mdx-ref-badge--neutral">application/json</span>
</div>

<ResponseField name="error" type="string" required />

## History

<div class="x2mdx-ref-history" aria-label="Reference history">
  <div class="x2mdx-ref-history-event x2mdx-ref-history-event--introduced" id="history-added-0-6-3">
    <div class="x2mdx-ref-history-event-head">
      <span class="x2mdx-ref-history-event-label">Added</span>
      <code class="x2mdx-ref-history-event-version">0.6.3</code>
    </div>
  </div>
</div>
