Install
require(), use 22.12 or later. The SDK eagerly loads ESM-only dependencies at import time, so on older Node a CommonJS require throws ERR_REQUIRE_ESM and the package fails to load regardless of which chains you use.
The shape of an integration
Three calls, in order:- Fetch a quote.
fetchQuotereturns the routes available for a pair. - Execute the swap.
swapFromEvmorswapFromSolanabuilds and sends the transaction. On Sui,createSwapFromSuiMoveCallsreturns a Transaction that you sign and send yourself. - Track it. The Explorer API tells you when it finished.
Next steps
Fetching Quotes
Every parameter, the response fields that matter, and gas drop ceilings.
Executing Swaps
EVM, Solana and Sui, plus allowances, gasless and HyperCore.
Track Transactions
Step three: knowing when the swap finished.