Docs
Search
K

Preset Orders

You are able to pass in order details, allowing you to send the user directly to the order review screen.
In order to do this, you must pass a RatioPresetOrder object into the RatioButton component with the presetOrder attribute.
Example
<RatioButton presetOrder={
{
fiatAmount: 20,
cryptoCurrency: 'ETH'
} as RatioPresetOrder
}/>
If you pass null, or omit the attribute, the Ratio flow will have the default functionality when the view is pressed.
For more details please see the example below

All supported Cryptos can be used with Preset Orders

Crypto Currency
Network
Minimum Fiat Amount
Ach types
ETH
Ethereum
$20 USD
Standard, Instant
USDC_ETHEREUM
Ethereum
$20 USD
Standard, Instant
MATIC
Polygon
$1 USD
Standard, Instant
USDC_POLYGON
Polygon
$1 USD
Standard, Instant
AMKT_POLYGON
Polygon
$1 USD
Instant

Handling User Limits

If you are also using the Ratio API, you will be able to check the user's limits before providing the preset order by calling the Transaction Limits endpoint. This will ensure that when the Ratio flow is opened, the order will have a valid amount rather than let the user know they are unable to perform the transaction. This is an optional step as the React JS Library checks the user's remaining limit at the start of the user session.