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

# Set minimum and maximum deposit amounts

> Use minAmountOut and maxAmountOut in routes.options to set the deposit amount range while still letting users pick a value within those bounds.

When you want users to choose their own deposit amount but need to enforce a floor or ceiling (to meet minimum transaction thresholds, cap exposure, or comply with business rules), set `minAmountOut` and `maxAmountOut` in your route options. The widget constrains its slider and input field to the range you configure.

## The minAmountOut and maxAmountOut options

Both options live inside `routes.options` in your `TrustwareConfigOptions`. You can set either one independently or both together.

```ts theme={null}
import { type TrustwareConfigOptions } from "@trustware/sdk";

const guardedConfig = {
  ...trustwareConfig,
  routes: {
    ...trustwareConfig.routes,
    options: {
      minAmountOut: "10",
      maxAmountOut: "250",
      routeRefreshMs: 10000,
    },
  },
} satisfies TrustwareConfigOptions;
```

Pass this config to `TrustwareProvider`:

```tsx theme={null}
<TrustwareProvider config={guardedConfig}>
  <TrustwareWidget />
</TrustwareProvider>
```

## Value format

Both options accept a string or a number representing a USD amount:

```ts theme={null}
minAmountOut: "10"    // string: minimum of $10 USD
maxAmountOut: "250"   // string: maximum of $250 USD
```

Values are interpreted as USD amounts. Do not include a currency symbol or unit suffix.

## routeRefreshMs in this context

The example above also sets `routeRefreshMs: 10000`. This controls how often the widget re-fetches route previews, in milliseconds. When users are actively adjusting an amount within a constrained range, a shorter refresh interval keeps quotes current. The default is `15000` ms (15 seconds).

<Note>
  `minAmountOut` and `maxAmountOut` constrain the widget UI. They do not replace server-side validation. Your backend should independently enforce any deposit limits that are critical to your business logic.
</Note>

<Tip>
  If you want to lock users to a single amount rather than a range, use `fixedFromAmount` instead. See the [fixed amount guide](/guides/fixed-amount) for details.
</Tip>
