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

# Test safely

> There is no sandbox at launch: test against production with small real amounts, the smallest size each venue takes, and checks that run before any money moves.

There is no sandbox at launch. You build and test against the production API, `https://api.tetrafi.io`, and **every order you place moves real assets**. A sandbox with test assets is planned for after launch: it will be announced in the [Changelog](https://tetrafi.mintlify.site/changelog.md).

Testing with real money is safe when you keep orders small, read each quote before you order it, and retry without ordering twice.

## Use the smallest size a venue takes

Quotes cost nothing; only an order moves money. So test the whole flow with real quotes, and place your first orders at the smallest size the venue accepts.

Each venue sets its own minimum, and minimums change. Find them by asking: this script, [`samples/http/test-safely.sh`](https://github.com/tetrafi/docs/blob/main/samples/http/test-safely.sh), asks for quotes at 1, 5, 10 and 25 USDC, one request every 3 seconds, and prints the smallest amount each venue answered at. It orders nothing.

```bash cURL theme={null}
# Find the smallest size each venue takes before you order: ask at a few small amounts, one
# quote request every 3 seconds (the per-key limit), and keep the first amount each venue answers.
# A venue that needs more reads unsupported or unavailable with a reason such as sizeNotEligible
# or amountBelowMinimum. Venues change their limits, so read them again before you test.
results='{}'
for amount in $amounts; do
  answer=$(tetrafi POST /api/v1/quotes "$(jq -cn --arg sell "$sell" --arg buy "$buy" --arg amount "$amount" \
    '{sell: {asset: $sell}, buy: {asset: $buy}, sellAmount: $amount}')")
  results=$(jq -cn --arg amount "$amount" --argjson answer "$answer" --argjson seen "$results" 'reduce ($answer.sources[]
    | select(.status != "filteredOut")) as $s ($seen;
      if .[$s.venue.id].smallest then . else
        .[$s.venue.id] = (if $s.status == "answered" then {smallest: $amount} else {smallest: null, triedUpTo: $amount, status: $s.status, reason: $s.reason} end)
      end)')
  sleep 3
done
jq -c 'to_entries[] | {venue: .key} + .value' <<<"$results" >&2
```

```json Output on test networks, 2026-10-30 (shortened) theme={null}
{"venue":"binance-orderbook","smallest":"5"}
{"venue":"bebop","smallest":null,"triedUpTo":"25","status":"unavailable","reason":"apiKeyOrganisationWalletScopeRequired"}
{"venue":"keyrock-rfq","smallest":null,"triedUpTo":"25","status":"unsupported","reason":"pairNotServed"}
```

On that run, the Binance order book quoted USDC to USDT from 5 USDC and refused 1 USDC with `sizeNotEligible`. A venue that needs a larger amount reads `unsupported` or `unavailable` with a reason such as `sizeNotEligible` or `amountBelowMinimum`. Run the script with your own key and pair before you test: it shows what your workspace can reach today.

The [Quickstart](https://tetrafi.mintlify.site/quickstart.md) orders 10 USDC by default. Set `TETRAFI_AMOUNT` to trade less.

## Check the quote before you order

Nothing moves until you place an order, so read the quote first:

* `buy` and `fees` say what you get and what it costs;
* `firm` and `expiresAt` say whether the price is firm, and `minReceiveRequired` says when you must send `minReceive`, the least you accept, so the order cannot fill below it ([Placing an order](https://tetrafi.mintlify.site/trade/orders.md#price-protection-and-minimum-receive));
* `expiresAt` says how long you can order it;
* `tradingSource` says which account or wallet pays ([Wallets and accounts](https://tetrafi.mintlify.site/trade/wallets-and-accounts.md)).

## Never order twice by accident

A retry that places a second order is the costly mistake. Send an `Idempotency-Key` with every order, and on a timeout send the same body with the same key ([Idempotency](https://tetrafi.mintlify.site/trade/idempotency.md)). When you cannot tell whether an order was placed, find it by its quote before you do anything else ([Operating guide](https://tetrafi.mintlify.site/trade/operating-guide.md#an-unknown-outcome-is-not-a-failure)).

## Use a key with only what it needs

Give a test key only the permissions it needs: **Read quotes** alone to try searches, then **Submit orders** and **Read orders** for your first orders. Revoke it when you are done ([Authentication](https://tetrafi.mintlify.site/authentication.md)).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.