Buy units of a money-market fund with a tokenized deposit on your NodeAsset deployment. It takes three calls from you and two acts by the other parties, and one transaction settles both registries. The steps carry the Tx numbers of Subscriptions.
1

Before you start

  • A NodeAsset deployment on DevNet, TestNet or MainNet, with its engine’s URL and a bearer from your identity provider for a user with the operator role. To set one up, see Install.
  • An asset paid on the ledger, with its standing consent live (Set up an asset). Here it is a fund paid in a tokenized deposit; a stablecoin works the same way.
  • An investor admitted to the asset and holding the payment asset (Onboard investors).
The examples use the fund FUND, its tokenized deposit TD and the investor inv-001.Check the bearer:
curl
2

Tx 1 · Record the order

The order is a subscription: here, 30 units of FUND for inv-001. The answer is the operation the write became.
curl
3

Tx 2 · The price source prices the subscription

From its own node, the price source signs the subscription’s price by accepting its proposal at a NAV of 1.003333 (LotProposal_Accept). The subscription then reads priced, with its appliedNav.
4

Tx 3 · Ask for the payment

The first settle call sends the investor the payment request: 30 × 1.003333, rounded up to the deposit’s cent.
curl
5

Tx 4 to 6 · The investor pays

In its wallet, the investor’s custodian makes a CIP-112 allocation of the deposit on the bank’s registry and another for the receipt of the units on the fund’s registry, then accepts the request (AllocationRequest_Accept).
6

Tx 7 · Settle

The same call again, under a new key, settles both registries in one transaction: it mints the units and pays the deposit.
curl
Before the investor has answered, this call settles nothing and names the allocations it awaits (awaiting).

How the API works

Sign-in, errors, retries, pages, decimals and four eyes.

Subscribe and redeem

Both directions, paid on the ledger or off it.