interface Instrument

Base interface for all instruments. This interface does not define any lifecycling logic.

viewtype V

  • Choice Archive

    Controller: Signatories of implementing template

    Returns: ()

    (no fields)

  • Choice GetView

    Retrieves the interface view.

    Controller: viewer

    Returns: View

    Field Type Description
    viewer Party The party retrieving the view.
  • Choice Remove

    Archive the instrument.

    Controller: signatory this

    Returns: ()

    (no fields)

  • Method getKey : InstrumentKey

    Get the unique key for the Instrument.

Data Types

type I

= Instrument

Type synonym for Instrument.

type Q

= Quantity InstrumentKey Decimal

Instrument quantity.

type R

= Reference

Type synonym for Reference. This type is currently used as a work-around given the lack of interface keys.

type V

= View

Type synonym for View.

instance HasFromAnyView Instrument V

data View

View for Instrument.


Field Type Description
issuer Party The instrument’s issuer.
depository Party The instrument’s depository.
id Id The instrument’s identifier.
version Text A textual instrument version.
holdingStandard HoldingStandard The holding standard for holdings referencing this instrument.
description Text A human readable description of the instrument.
validAsOf Time Timestamp as of which the instrument is valid. This usually coincides with the timestamp of the event that creates the instrument. It usually does not coincide with ledger time. This is required for lifecycling of some instruments, in order to keep track of the last time the instrument was lifecycled. For instruments where this is not applicable, it can be set to the current time.

instance HasInterfaceKey Instrument View InstrumentKey Reference GetCid SetCid SetObservers GetView

instance Eq View

instance Show View



: V -> InstrumentKey

Convert the instrument’s View to its key.


: HasToInterface i Instrument => i -> InstrumentKey

Retrieves the key of an Instrument.

: Instrument -> InstrumentKey

: Decimal -> InstrumentKey -> Q

Wraps an amount and an instrument key into an instrument quantity.


: Decimal -> Q -> Q

Scale Quantity by the provided factor.


: HasToInterface t I => t -> Update Instrument

Fetch instrument from holding.


: (HasInterfaceTypeRep i, HasExercise i c r) => InstrumentKey -> Party -> c -> Update r

Exercise interface by key. This method can be used to exercise a choice on an Instrument given its InstrumentKey. Requires as input the InstrumentKey, the actor exercising the choice, and the choice arguments.