v1
latestOpenAPI 3.1.02026-07-2619047.9 KBSwap
Build an unsigned swap transaction from a quote.
Visibility modes:
- visibility: "public" (default) — pure pass-through to the Jupiter/Metis upstream. The returned transaction is whatever the upstream produces.
- visibility: "private" — the server forces Jupiter's output into a program-owned stash ATA (deterministically derived from (userPublicKey, quoteResponse.outputMint)), prepends an idempotent ATA-create, and appends a schedule_private_transfer instruction that registers a one-shot Hydra crank. When the crank fires, it self-CPIs into the on-chain private-transfer flow to deliver the swapped tokens to destination with the requested delay/split policy. The returned transaction is a v0 VersionedTransaction that is still unsigned — the client signs and submits.
When visibility = "private", the fields destination, minDelayMs, maxDelayMs, and split are required. clientRefId and validator are optional. Explicitly setting destinationTokenAccount to anything other than the server-derived stash ATA returns 400.
post/v1/swap/swap
Request body
Example request
{
"userPublicKey": "3rXKwQ1kpjBd5tdcco32qsvqUh1BnZjcYnS5kYrP7AYE",
"payer": "3rXKwQ1kpjBd5tdcco32qsvqUh1BnZjcYnS5kYrP7AYE",
"wrapAndUnwrapSol": true,
"useSharedAccounts": true,
"visibility": "public",
"minDelayMs": "0",
"maxDelayMs": "60000"
}Response
Swap transaction