Skip to content
A simple bond trading application
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Merging makefiles (#10) Mar 27, 2019
scripts Merging makefiles (#10) Mar 27, 2019
src address qualified warning in imports (#13) May 14, 2019
target Devops! (#2) Mar 22, 2019
LICENSE update copyright in license file (#15) May 16, 2019
Makefile Merging makefiles (#10) Mar 27, 2019
da.yaml Merging makefiles (#10) Mar 27, 2019
pom.xml Devops! (#2) Mar 22, 2019
ui-backend.conf created Mar 12, 2019


Bond trading

This is an example of trading bonds against cash. It covers how this process can be modeled in DAML, and how it can be automated with the Java Application Framework.

In the documentation for this example

Bond trading model
This page describes the complexity of exchanging bonds against cash.
DAML implementation
This page explains how to model and implement the processes in DAML.
Automation overview and Automation implementation
These pages show how parts of the process can be automated.

Building the system

All needed binaries can be built with the provided pom.xml and Makefile:

  • cd to the root directory.
  • Type make.

If you have Maven and the DAML SDK installed locally, those will be used with make. If you do not, make will use docker container builders instead (requires docker). If you prefer to always use docker, despite having these tools locally, simply export the following in your shell:

  • export FORCE_DOCKER=true

This is useful if you are having troubles building due to a version mismatch of one of the tools, or you would just rather not have to install anything extra.

Running the system

Once the application JAR is built, the provided start script will run the Sandbox, Navigator and all needed automation processes.

To run the application:

  • Type make start.

This runs the sandbox, navigator, and automation. You may navigate to http://localhost:7500/sign-in/ to explore the ledger or this may open for you automatically if the DAML SDK is installed locally.

The script injects trades, and sends progress output to the terminal. It also puts a prompt at the screen bottom which lets you stop the system.

After running, your screen should look like this:



Copyright (c) 2019, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
SPDX-License-Identifier: Apache-2.0
You can’t perform that action at this time.