This page introduces the Smart Swap functionality provided by the Skip Go API to improve swap speed, price, and customization.
@skip-router
library, you must use version v4.0.0+ to enable Smart Swap.We strongly recommend using the @skip-go/client
TypeScript package, which is actively maintained.@skip-go/client
library. The only changes you’ll notice between this context and the REST API are naming conventions.
skipClient
function call or REST API request body.
smartSwapOptions
object into your route request.
splitRoutes
flag in the smartSwapOptions
object.
swapType
called SmartSwapExactCoinIn
that’s returned in the routeResponse
and msgsDirectResponse
when the provided route is a split route. This new swapType
has fields that allow for multiple routes, across multiple swap venues.
Network | Chain ID |
---|---|
Ethereum | 1 |
Polygon | 137 |
Optimism | 10 |
Arbitrum One | 42161 |
Base | 8453 |
BNB Chain | 56 |
Avalanche | 43114 |
Blast | 81457 |
Celo | 42220 |
evmSwaps
flag to true in the smartSwapOptions
object. If using the deprecated @skip-router
library, you must be on v5.1.0+ (we strongly recommend migrating to @skip-go/client
as soon as possible).
route
Response?evm_swap
is returned in the array of operations
in the v2/route
and v2/msgs_direct
response.
v2/route
then v2/msgs
call pattern, this new operation type must be passed to the v2/msgs
endpoint, so make sure you use the latest Skip Go Client version and decode the operation properly.evm_swap
operation type is as follows:
/msgs
and /status
Response?msg_type
used for EVM swaps is the same evm_tx
type used for all of our EVM transactions. Similarly, there is no new transfer_event
type; the swap is atomic with the bridging action (Axelar or CCTP), so the same types are used (axelar_transfer_info
and cctp_transfer_info
respectively).