Supported swap parameters
Onramper lets you customize your swap experience by adding parameters to the widget URL.
Parameter | Type | Description |
---|---|---|
swap_defaultSource | string | The default source token to be displayed. |
swap_defaultTarget | string | The default target token to be displayed. |
swap_defaultAmount | string | The default amount to be displayed (must be used with swap_defaultSource). |
Default Source
Set a default source token to be displayed for the initial widget load using the swap_defaultSource
https://buy.onramper.com/?mode=swap&swap_defaultSource=usdc_ethereum
Default Target
Set a default target token to be displayed for the initial widget load using the swap_defaultTarget
https://buy.onramper.com/?mode=swap&swap_defaultTarget=usdc_solana
Default Amount
Set a default source amount to be displayed for the initial widget load using the swap_defaultAmount
. This must be used with swap_defaultSource
.
https://buy.onramper.com/?mode=swap&swap_defaultSource=usdc_ethereum&swap_defaultAmount=140
Updated 2 months ago