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

# Splice.Api.Token.HoldingV2

> Reference documentation for Daml module Splice.Api.Token.HoldingV2.

Daml module

# Splice.Api.Token.HoldingV2

Types and interfaces for retrieving an investor's holdings.

Daml

Module
Splice.Api.Token.HoldingV2

Latest release
0.10.4

## Interfaces

### Interface `Holding`

Holding interface.

View Type: [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978)

Choices:

#### Choice `Archive`

Controllers: `Signatories of implementing template`

Returns: ()

## Data Types

### `data Account`

A data type to represent an on-chain managed account,

For example a traditional accounting structure, or simply a delegation to
a provider to perform some services.

Constructors:

* `Account`

**owner** `Optional Party`

The party that owns the account, which MUST be set for regular accounts.

`None` is reserved for special accounts managed by the instrument

admin. Special accounts are for example used to represent the source

account for mints and the target account for burns.

**provider** `Optional Party`

The provider of the account.

Account providers MUST have visibility on all asset movements

and holdings. Asset implementations are free to determine how

authorization for asset movements is split between providers and

owners. For example, providers MAY have to authorize all movements

requested by the owner.

**id** `Text`

Account number or similar.

Use the empty string ("") as the default account identifier.

Instances:

* instance `Eq` [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `Ord` [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `Show` [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `GetField` `account` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `GetField` `id` [`Account`](#type-splice-api-token-holdingv2-account-52093) `Text`
* instance `GetField` `owner` [`Account`](#type-splice-api-token-holdingv2-account-52093) (`Optional` `Party`)
* instance `GetField` `provider` [`Account`](#type-splice-api-token-holdingv2-account-52093) (`Optional` `Party`)
* instance `SetField` `account` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `SetField` `id` [`Account`](#type-splice-api-token-holdingv2-account-52093) `Text`
* instance `SetField` `owner` [`Account`](#type-splice-api-token-holdingv2-account-52093) (`Optional` `Party`)
* instance `SetField` `provider` [`Account`](#type-splice-api-token-holdingv2-account-52093) (`Optional` `Party`)

### `data HoldingView`

View for `Holding`.

Constructors:

* `HoldingView`

**account** `Account`

Account in which the holding is held.

**instrumentId** `InstrumentId`

Instrument being held.

**amount** `Decimal`

Size of the holding.

**lock** `Optional Lock`

Lock on the holding.

Registries SHOULD allow holdings with expired locks as inputs to

transfers to enable a combined unlocking + use choice.

**meta** `Metadata`

Metadata.

Instances:

* instance `Eq` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978)
* instance `Show` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978)
* instance `HasFromAnyView` [`Holding`](#type-splice-api-token-holdingv2-holding-65433) [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978)
* instance `HasInterfaceView` [`Holding`](#type-splice-api-token-holdingv2-holding-65433) [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978)
* instance `GetField` `account` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `GetField` `amount` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) `Decimal`
* instance `GetField` `instrumentId` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `GetField` `lock` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) (`Optional` [`Lock`](#type-splice-api-token-holdingv2-lock-18966))
* instance `GetField` `meta` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) `Metadata`
* instance `SetField` `account` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`Account`](#type-splice-api-token-holdingv2-account-52093)
* instance `SetField` `amount` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) `Decimal`
* instance `SetField` `instrumentId` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `SetField` `lock` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) (`Optional` [`Lock`](#type-splice-api-token-holdingv2-lock-18966))
* instance `SetField` `meta` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) `Metadata`

### `data InstrumentId`

A globally unique identifier for instruments.

Constructors:

* `InstrumentId`

**admin** `Party`

The party representing the registry app that administers the instrument.

**id** `Text`

The identifier used for the instrument by the instrument admin.

This identifier MUST be unique and unambiguous per instrument admin.

Instances:

* instance `Eq` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `Ord` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `Show` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `GetField` `admin` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751) `Party`
* instance `GetField` `id` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751) `Text`
* instance `GetField` `instrumentId` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)
* instance `SetField` `admin` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751) `Party`
* instance `SetField` `id` [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751) `Text`
* instance `SetField` `instrumentId` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) [`InstrumentId`](#type-splice-api-token-holdingv2-instrumentid-91751)

### `data Lock`

Details of a lock.

Constructors:

* `Lock`

**holders** `[Party]`

Unique list of parties which are locking the contract.

(Represented as a list, as that has the better JSON encoding.)

**expiresAt** `Optional Time`

Absolute, inclusive deadline as of which the lock expires.

**expiresAfter** `Optional RelTime`

Duration after which the created lock expires. Measured relative

to the ledger time that the locked holding contract was created.

If both `expiresAt` and `expiresAfter` are set, the lock expires at

the earlier of the two times.

**context** `Optional Text`

Short, human-readable description of the context of the lock.

Used by wallets to enable users to understand the reason for the lock.

Note that the visibility of the content in this field might be wider

than the visibility of the contracts in the context. You should thus

carefully decide what information is safe to put in the lock context.

Instances:

* instance `Eq` [`Lock`](#type-splice-api-token-holdingv2-lock-18966)
* instance `Ord` [`Lock`](#type-splice-api-token-holdingv2-lock-18966)
* instance `Show` [`Lock`](#type-splice-api-token-holdingv2-lock-18966)
* instance `GetField` `context` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `Text`)
* instance `GetField` `expiresAfter` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `RelTime`)
* instance `GetField` `expiresAt` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `Time`)
* instance `GetField` `holders` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) \[`Party`]
* instance `GetField` `lock` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) (`Optional` [`Lock`](#type-splice-api-token-holdingv2-lock-18966))
* instance `SetField` `context` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `Text`)
* instance `SetField` `expiresAfter` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `RelTime`)
* instance `SetField` `expiresAt` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) (`Optional` `Time`)
* instance `SetField` `holders` [`Lock`](#type-splice-api-token-holdingv2-lock-18966) \[`Party`]
* instance `SetField` `lock` [`HoldingView`](#type-splice-api-token-holdingv2-holdingview-66978) (`Optional` [`Lock`](#type-splice-api-token-holdingv2-lock-18966))
