Detecting availability
CheckswapDirectEnabled and swapRouteEnabled on the opportunity object to determine which modes are available.
| Scenario | swapDirectEnabled | swapRouteEnabled |
|---|---|---|
| Direct deposit only | true | false |
| Swap deposit only | false | true |
| Both modes available | true | true |
Using swap mode
Setmode to swap in your deposit request and provide the input token the user wants to deposit with.
slippageBps
TheslippageBps parameter controls the maximum acceptable slippage for the swap in basis points.
- Default:
50(0.5%) - Recommended range:
50to200(0.5% to 2%) - Increase for volatile pairs or low liquidity routes
- Maximum recommended is
200(2%)
The
GET /v1/route endpoint is deprecated and has been removed. Swap routing is handled automatically when mode=swap is set on the deposit request.
