Swaps
Get the best route across DEXes and launchpads, then build an unsigned transaction that fails on chain below your minimum. Your wallet signs and sends it; yolo never holds your keys.
Works onSui
Basics
Free to call. Each swap pays a 20 bps (0.2%) yolo fee on chain, inside the swap transaction. No credits needed: any key with the quote and build scopes can call them.
https://yolo.casa/api/v1Authorization: Bearer $YOLO_API_KEYFees
Quotes and builds are free to call. Each swap pays a 20 bps yolo fee in USDC, inside the swap transaction: from the USDC you pay on a buy, from the USDC you receive on a sell, or swapped to USDC from the input when neither side is USDC.
amountOut in a quote is what the wallet receives after every fee, so you can compare it with other routers as is. The quote also has feeBps and fee with the amount taken.
To charge your own users, pass partnerFeeBps (1 to 100) and partnerAddresson swap/quote. Your fee is taken from the input coin in the same transaction and sent to your address, on top of yolo's. The quote shows it in partnerFee and its amountOut is net of it.
Commands mode works for every key. The plan's fee steps are commands like the swaps, listed in plan.fees, and addYoloRoute refuses a plan that is missing one.
Endpoints
Open an endpoint for its parameters, examples in three languages and a runner.
/swap/quote
Get an aggregated swap quote. amountOut is what the wallet receives after every fee; feeBps, fee and partnerFee show the fees
/swap/build
Build an unsigned swap, or its route commands, for a wallet
/route-commands.ts
TypeScript helper with no dependencies: addYoloRoute(tx, plan, coinIn) appends a commands-mode plan to your Transaction and returns the output coin