Skip to main content
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.
Pass this config to TrustwareProvider:

Value format

Both options accept a string or a number representing a USD amount:
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, so the quote on the review screen refreshes every 10 seconds. See routeRefreshMs for the default and valid values.
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.
If you want to lock users to a single amount rather than a range, use fixedFromAmount instead. See the fixed amount guide for details.