Swap
Route
Swap
Get the best route and a pre-built transaction for swapping between two tokens on Solana via Kamino’s swap aggregator. The response includes the serialized transaction, expected output amount, minimum output after slippage, and which router was selected.
GET
Swap
Get the best route and transaction for swapping between two tokens on Solana via Kamino’s swap aggregator.
Example
1
Import Dependencies
2
Configure and Initialize
3
Fetch Swap Transaction
Call the KSwap API to get the best route and a pre-built transaction. This example swaps 1 SOL to USDC with 50bps max slippage.4