Supported swap parameters

Onramper lets you customize your swap experience by adding parameters to the widget URL.

ParameterTypeDescription
swap_defaultSourcestringThe default source token to be displayed.
swap_defaultTargetstringThe default target token to be displayed.
swap_defaultAmountstringThe 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