> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Test in the sandbox

> Onboard a user, register a wallet, and trade WTGXX shares against the WisdomTree sandbox.

Every app can build a tokenized money market fund (TMMF) integration in the WisdomTree sandbox. The sandbox uses the same API as production. Trades run on Ethereum Sepolia (testnet), with test stablecoins and test fund shares.

## How the sandbox works

Each TMMF request names its WisdomTree environment in the `environment` field. A request without the field uses `production`.

* **Sandbox:** open to every app, for testing. Trades settle on Ethereum Sepolia.
* **Production:** for real trades. Only apps with production access can use it. Other apps get a `403` error.

`POST` requests take `environment` in the body. `GET` requests take it as a query parameter.

Sandbox and production data are separate. Users onboard again in production.

The sandbox uses these settings:

| Sandbox setting | Value |
| - | - |
| Environment | `sandbox` |
| Chain | `ethereum_sepolia` |
| Fund | `WTGXX` |
| Currencies | `USDC` for primary and secondary orders, `PYUSD` for primary orders only |

> [!NOTE]
>
> The TMMF endpoints use your app's credentials: `privy-app-id` and `Authorization: Basic   <credentials>` with your app secret. Purchases and redemptions also need an [authorization
> signature](https://docs.privy.io/api-reference/authorization-signatures.md) when the wallet has an owner.

## Integration flow

An integration follows these steps, in order.

**1. Create the user and their wallet**

For a business, create an [organization](https://docs.privy.io/organizations/setup/organizations.md) and an
[organization wallet](https://docs.privy.io/organizations/setup/wallet.md). For an individual, create a
[user](https://docs.privy.io/api-reference/users/create.md) and a wallet the user owns. In the sandbox, the wallet must
be an Ethereum wallet.

**2. Onboard the user with WisdomTree**

Submit the organization's [KYB
data](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/onboard-businesses) or the individual's
[KYC data](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/onboard-individuals). WisdomTree
reviews the submission asynchronously. The user can trade once the status is `approved`.

**3. Register the wallet**

[Register the wallet](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/register-wallets.md) with
WisdomTree on `ethereum_sepolia`. The wallet can trade once WisdomTree approves it.

**4. Fund the wallet**

Send Sepolia USDC to the wallet, for example from the [Circle
faucet](https://faucet.circle.com). The wallet pays gas in Sepolia ETH unless your app has [gas
sponsorship](https://docs.privy.io/wallets/gas-and-asset-management/gas/overview.md) configured.

**5. Buy fund shares**

[Buy WTGXX](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/buy.md) with USDC. Privy sends the
USDC to WisdomTree and tracks the order as a wallet action until the shares reach the wallet.

**6. Track positions**

[List the wallet's positions](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/get-positions.md)
to show shares, their USD value, pending dividends, and pending orders.

**7. Sell fund shares**

[Sell WTGXX](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/sell.md) for USDC. Privy sends the
shares to WisdomTree and tracks the order until the proceeds reach the wallet.

> [!TIP]
>
> Subscribe to [TMMF webhooks](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/webhooks.md) to
> follow submissions, wallet registrations, and orders.

## Order types

Each order sets an order type. It decides how WisdomTree fills the order.

| Order type | How it fills | Sandbox currencies |
| - | - | - |
| `secondary` | From the fund's onchain pool. Faster. | `USDC` |
| `primary` | Directly with the fund, at the daily NAV strike. | `USDC`, `PYUSD` |

To test a full buy and sell quickly, use `secondary` orders.

## Next steps

Start by onboarding the user that will trade.

> [card] [Onboard businesses](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/onboard-businesses)
>
> Submit an organization's KYB data to WisdomTree.

> [card] [Onboard individuals](https://docs.privy.io/wallets/actions/earn/tokenized-money-market-funds/onboard-individuals)
>
> Submit an individual's KYC data to WisdomTree.
