Atomic sell → buy round-trip
token → SOL → token on the same mint, both legs in one transaction —
the mirror of /swap/sol/buy-sell. The buy-back leg is chained onto the
sell leg’s slippage floor.
Provide exactly one of percentage or tokensAmount for the sell leg;
sending both, or neither, is an error. Fee accounting is identical to
/swap/sol/buy-sell (one off-chain charge on the combined SOL volume).
Errors answer HTTP 200 with success:false and an error string.
Headers
API key for authenticated access (alternative to Authorization header)
Bearer sk_... — alternative to X-API-Key
Body
token → SOL → token atomic round-trip on the SAME mint, both legs in one transaction. The buy-back leg is chained onto the sell leg's slippage floor.
1Percentage of holdings to sell on the first leg (0.01–100). Mutually exclusive with tokensAmount — exactly one is required.
0.01 <= x <= 100Fixed token amount(s) to sell on the first leg. Single number applies to all wallets; array is per-wallet. Mutually exclusive with percentage.
0 <= x <= 10000Priority fee per transaction in lamports.
Tip in lamports. Public — min 0.001 SOL (1000000 lamports) enforced.
x >= 1000000Custom tip recipient wallet (auth only).
Custom tip amount in lamports (auth only).
Custom fee recipient wallet (auth only).
Custom fee in basis points (auth only). Charged once on the combined SOL volume of both legs — see BuySellRequest.
1 <= x <= 3base58, base64 Response
Transactions generated — or success:false with error when the
request is invalid or no route could be built.
