TypeScript SDK
Quote, verify the route, and build the swap transaction in a few calls.
Runnable example
A complete HTTP-only lifecycle: quote, sign, submit, and confirm.
Pick your integration
- Wallets and dapps
- Bots
- Lending and contracts
- Liquidity (LP)
- Load token metadata and deployment configuration; keep canonical IDs and network identity.
- Quote without a sender for display. Cancel or ignore responses from superseded user input.
- At confirmation, requote with explicit slippage, the selected referral, and
sender. Verify the net amounts and fee disclosure. - Inspect
transaction.envelopeXdr. Whentransaction.simulatedistrue, the server already populated the account sequence and prepared resources, fees, and authorizations. Otherwise populate the sequence and prepare Soroban resources first. - Sign through the wallet, submit, and poll for a final result. Show success only after successful execution.
Confirmation checklist
Network, router, source account, and canonical token IDs match the intended deployment and wallet.
Atomic input, net output, fee disclosure, and minimum output match what the user confirmed.
The payload or envelope comes from the current quote, with explicit slippage.
Simulation status is read from the transaction object, and the complete outer transaction is prepared for composition.
Submission is tracked through final execution, including failures and uncertain responses.

