Skip to main content
Use the deposit endpoint to buy fund shares from a registered wallet. Privy sends the wallet’s stablecoins to WisdomTree. Privy then tracks the order as a wallet action until the shares reach the wallet.

Purchase flow

  1. Privy creates the order as a wallet action with status pending, and sends the wallet’s stablecoins to WisdomTree.
  2. WisdomTree fills the order. A secondary order fills from the fund’s onchain pool. A primary order fills at the daily NAV strike.
  3. The status moves to succeeded once the shares reach the wallet.
A primary order settles at the fund’s daily NAV strike. An order placed after the 3:30 PM ET cutoff settles on the next business day. So a primary order will stay pending until it settles.

Usage

To buy fund shares, send a POST request to:

Parameters

The body describes the order.
string
required
The amount of deposit_asset to invest, as a decimal string in the asset’s standard unit, e.g. "1000.00".
string
required
The currency the wallet sends, e.g. "USDC". Case-insensitive.
string
required
The chain the order trades on. Use ethereum_sepolia in the sandbox.
string
required
The fund ticker, e.g. "WTGXX". Case-insensitive.
'sandbox' | 'production'
The WisdomTree environment the order trades in. Defaults to production. Use sandbox to test. See how the sandbox works.
'primary' | 'secondary'
required
How the order fills: secondary from the fund’s onchain pool, which is faster, or primary directly with the fund at the daily NAV strike.
string
Your app’s identifier for the order. Privy returns it on the wallet action.
string
A unique value of at least 24 characters that prevents replaying a signed request.
Wallets with owner_id present must provide an authorization signature as a request header.

Returns

The endpoint returns the order as a wallet action.
string
The wallet action ID of the order. Use this to poll status with get wallet action.
string
The ID of the wallet that placed the order.
string
The action type. Always "tmmf_deposit" for this endpoint.
'pending' | 'succeeded' | 'rejected' | 'failed'
The current status of the order.
string | null
The reference_id of the request, if any.
object | undefined
Why the order was rejected or failed, with message and details.
string
ISO 8601 timestamp of when the order was created.
array | undefined
The order’s steps. Only returned if ?include=steps is provided on a GET request.

Example

This request buys 10 USDC of WTGXX from the fund’s pool.
Example response
Idempotency on errors: This endpoint returns pending immediately. Replaying the same key returns the cached response. On a synchronous 5xx, Privy deletes the record so the same key retries fresh. Action outcomes (rejected, failed, succeeded) arrive via webhooks and polling. Policy violations always allow fresh retries.

Statuses and failures

An order has one of four statuses. Every status but pending is final.

Common errors

The endpoint returns an error, and creates no order, when it cannot place the order.
To know when the shares reach the wallet, poll get wallet action. Or listen for the wallet_action.tmmf_deposit.succeeded webhook.

Next steps

Once the order succeeds, show the new position. Or sell shares back for stablecoins.

List positions

Show the wallet’s shares, their value, and pending orders.

Sell fund shares

Sell fund shares for stablecoins.