Compute unit price in micro-lamports. Mutually exclusive with prioritizationFeeLamports.
Required range: x >= 0
createFeeAccount
object
If the fee account isn't a referral token account derived from the seeds
["referral_ata", referral_account, mint] and the Referral program ID
REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3, this should be unspecified. If specified, the
transaction will create the fee_account if it doesn't already exist. The user pays for the
creation of the fee account. Ignored if fee_account is unspecified.
Show child attributes
destinationTokenAccount
object
The account that will receive the output token. If not specified, the user's associated
token account for the output mint will be used. Allowed values are:
A base58-encoded address, which specifies the address of the destination token account or,
if the output is native SOL, the destination wallet. If the output isn't native SOL, the
specified account must exist before the swap executes, or else the swap will fail.
An object which specifies the owner of the destination token account. In this case, the
owner's associated token account for the output mint will be used as the destination token
account. Note that this cannot be used if the output is native SOL. The object contains
the following:
associatedTokenAccount - object
owner - base58-encoded address of the owner of the destination token account
Option 1
Option 2
Show child attributes
dynamicComputeUnitLimit
boolean
If true, the server will simulate the transaction to determine its compute unit limit. If
unspecified or false, the transaction will use the default compute unit limit.
feeAccount
string
Base58-encoded address of the token account that will receive the platform fee if a platform
fee applies to the swap. If specified, this account's mint must match the fee mint for the
swap.
includeJitoSandwichMitigationAccount
booleanstring
If specified, the transaction will include a Jito sandwich mitigation account in the swap
instruction. Allowed values are:
true - uses the default Jito sandwich mitigation account
false - does not include the account
A base58-encoded account address - uses the specified account
Base58-encoded address of the close authority to assign to the output token account. If
specified, the swap instruction will idempotently initialize the output token account and
set its close authority to the specified address. The action is a no-op if the output
token account already exists at execution time.
Cannot be used when the output mint is SOL (wrapped or native). Cannot be used with
destinationTokenAccount.
perLegSlippage
boolean
If true or unspecified, per-leg slippage checks are enabled. If false, per-leg slippage
checks are disabled.
positiveSlippage
object
Positive slippage fee parameters. If specified, then the swap will pay some or all positive
slippage to the specified account.
Prioritization fee in lamports. Mutually exclusive with computeUnitPriceMicroLamports.
If both computeUnitPriceMicroLamports and prioritizationFeeLamports are unspecified, the
default of prioritizationFeeLamports="auto" will be used.
Allowed values are:
a u32 which specifies the lamports
the string value "auto", where the server determines the fee automatically, capped at
0.005 SOL
the string value "disabled", where the server leaves the prioritization fee unspecified
an object containing the following
priorityLevelWithMaxLamports - object
priorityLevel - string, either medium, high, or veryHigh
maxLamports - integer, a cap on the prioritization fee
an object containing the following
autoMultiplier - a u32 which specifies how much to multiply the automatically
determined fee by. The total prioritization fee will be capped at 0.005 SOL.
Show child attributes
sponsor
string
Base58-encoded address of the sponsor's wallet. If specified, the sponsor will pay the
transaction fee and for token account creation, and both the user and the sponsor must sign
the swap transaction. This can be used to implement gasless swaps.
sponsorExec
boolean
If true, the sponsor will be the executor of the swap for sponsored swaps. If false, the
user will be the executor of the swap for sponsored swaps. Default is true.
transactionVersion
enum<string>
default:v0
Wire format of the returned transaction. Default is v0. See the transactionVersion
parameter on the order endpoint for the trade-offs; in particular, v1 has no address
lookup tables, so it should be requested on the corresponding quote as well, or the quoted
route may not fit.
Available options:
v0,
v1
Example:
"v0"
wrapAndUnwrapSol
boolean
If false, the transaction will use wrapped SOL
Response
Imperative swap transaction
addressLookupTableAddresses
string[]
required
The lookup table addresses.
Empty when transactionVersion is v1: that format has no address lookup tables and
inlines every address.
blockhashWithMetadata
object
required
A blockhash that can be used to construct the transaction
Show child attributes
cleanupInstructions
object[]
required
Instructions that should be included after the swap instruction
Show child attributes
computeBudgetInstructions
object[]
required
Instructions that determine the compute budget and prioritization fee for the transaction.
Empty when transactionVersion is v1, which sets the compute budget in the message
header instead. Build that header from computeUnitLimit, prioritizationFeeLamports and
loadedAccountsDataSizeLimit below.
Show child attributes
computeUnitLimit
integer<int32>
required
Compute unit limit assigned to the transaction
Required range: x >= 0
loadedAccountsDataSizeLimit
integer<int32>
required
Maximum account data, in bytes, the transaction is permitted to load.
Set this in the message header when building a v1 transaction. Omitting it will cause the
transaction to fail. v0 callers can ignore this field, since the same limit already
applies by default.
Required range: x >= 0
otherInstructions
object[]
required
Other instructions that should be included in the transaction. The indices of these
instructions in the transaction are not important.
Show child attributes
prioritizationFeeLamports
integer<int64>
required
Prioritization fee in lamports.
Under v1 this is the total-lamports value to set in the message header, not a rate.
Required range: x >= 0
setupInstructions
object[]
required
Instructions that should be included before the swap instruction
Show child attributes
swapInstruction
object
required
The instruction that performs the swap
Show child attributes
transactionVersion
enum<string>
default:v0
required
The wire format these instructions are intended to be assembled into. Echoes the request's
transactionVersion (or its v0 default).
Available options:
v0,
v1
Example:
"v0"
prioritizationType
null | object
Prioritization fee type for the transaction
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"DFlow","colors":{"primary":"#66C5F6","light":"#66C5F6","dark":"#66C5F6"},"logo":{"light":"https://mintcdn.com/dflow/jwrydRAutpN7INlu/logo/light.svg?fit=max\u0026auto=format\u0026n=jwrydRAutpN7INlu\u0026q=85\u0026s=c43797960e32b9d8dcacbe70491ad64f","dark":"https://mintcdn.com/dflow/jwrydRAutpN7INlu/logo/dark.svg?fit=max\u0026auto=format\u0026n=jwrydRAutpN7INlu\u0026q=85\u0026s=c50f78d43cd7b1b9048319cb24ab319a"},"favicon":"https://mintcdn.com/dflow/a8Yx7HBusmKl4Z7w/favicon.svg?fit=max\u0026auto=format\u0026n=a8Yx7HBusmKl4Z7w\u0026q=85\u0026s=2e31a591ace76c46206b9314138135a8","appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"/contact","label":"Contact"}],"primary":{"type":"button","label":"Launch App","href":"https://dflow.net"}},"footer":{"socials":{"x":"https://x.com/DFlowProtocol","github":"https://github.com/DFlowProtocol"},"links":[{"header":"Legal","items":[{"label":"Privacy Policy","href":"/privacy"},{"label":"Terms of Service","href":"/terms-of-service"}]}]},"banner":{"content":"⚡ DFlow now supports the v1 transaction format. See our [migration docs](/spot/trading/v1-migration-guide)","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dflow","hasAudioNarration":false,"actualSubdomain":"dflow","customDomains":["pond.dflow.net"],"gitSource":{"type":"github","owner":"dflowprotocol","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af598f0cf5b122bc79b763f","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Spot Trading","count":29},{"language":"default","tag":"APIs","count":22},{"language":"default","tag":"Trading API","count":15},{"language":"default","tag":"AI","count":14},{"language":"default","tag":"Tokenized Equities","count":9},{"language":"default","tag":"Cross-Asset","count":6},{"language":"default","tag":"Equity Makers","count":5},{"language":"default","tag":"Crypto","count":5},{"language":"default","tag":"Get Started","count":4},{"language":"default","tag":"Websockets","count":4}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"@font-face{font-family:'RM Neue';font-weight:300;font-style:normal;font-display:swap;src:url('/fonts/RMNeue-Light.woff2') format('woff2')}@font-face{font-family:'RM Neue';font-weight:500;font-style:normal;font-display:swap;src:url('/fonts/RMNeue-Medium.woff2') format('woff2')}@font-face{font-family:'RM Neue';font-weight:600;font-style:normal;font-display:swap;src:url('/fonts/RMNeue-SemiBold.woff2') format('woff2')}@font-face{font-family:'RM Neue';font-weight:700;font-style:normal;font-display:swap;src:url('/fonts/RMNeue-Bold.woff2') format('woff2')}@font-face{font-family:'RM Neue';font-weight:800;font-style:normal;font-display:swap;src:url('/fonts/RMNeue-ExtraBold.woff2') format('woff2')}#banner,[id*=\"banner\"],[class*=\"Banner\"]{background-color:#3b74a6!important}#banner,#banner *,[id*=\"banner\"],[class*=\"Banner\"],[class*=\"Banner\"] *{color:#ffffff!important;font-weight:500!important}#banner a,[id*=\"banner\"] a,[class*=\"Banner\"] a{color:#ffffff!important;text-decoration:underline!important}.hero-background{background-image:url('/images/ui-banner-buttons/hero-ai.png')}.dark .hero-background{background-image:url('/images/ui-banner-buttons/hero-ai.png')}span[class*=\"z-10\"][class*=\"text-white\"]{color:#000000!important}a[style*=\"background-image\"],a[style*=\"background-image\"]:hover,a[style*=\"background-image\"]:focus,a[style*=\"background-image\"]:active,.dark a[style*=\"background-image\"],.dark a[style*=\"background-image\"]:hover,.dark a[style*=\"background-image\"]:focus,.dark a[style*=\"background-image\"]:active,a.group.no-underline,a.group.no-underline:hover,a.group.no-underline:focus,a.group.no-underline:active,.dark a.group.no-underline,.dark a.group.no-underline:hover,.dark a.group.no-underline:focus,.dark a.group.no-underline:active{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}a[style*=\"background-image\"]::before,a[style*=\"background-image\"]::after,a.group.no-underline::before,a.group.no-underline::after,.dark a[style*=\"background-image\"]::before,.dark a[style*=\"background-image\"]::after,.dark a.group.no-underline::before,.dark a.group.no-underline::after{display:none!important;content:none!important}svg[viewBox=\"0 -9 3 24\"]{color:#000000!important}.journey-diagram.mobile{display:none}@media (max-width: 768px){.journey-diagram.desktop{display:none}.journey-diagram.mobile{display:block}}.dark [aria-expanded=\"false\"] svg,.dark [aria-expanded=\"true\"] svg{color:#a1a1aa!important}.contact-us-section a svg{width:24px;height:24px}.mermaid svg .cluster rect{fill:transparent!important;stroke:transparent!important}.dark .mermaid svg .cluster span{color:#a1a1aa!important}:root:not(.dark) .mermaid svg .cluster span{color:#6b7280!important}.mermaid svg rect,.mermaid svg .node rect{rx:16px;ry:16px}.mermaid svg .node rect,.mermaid svg .node polygon,.mermaid svg .node circle,.mermaid svg .node ellipse{stroke-width:1.5px!important}.mermaid svg .node text{font-weight:500}.mermaid svg .edgePath path,.mermaid svg .flowchart-link,.mermaid svg path.edge-thickness-normal{stroke-width:2px!important;stroke-dasharray:6 6!important;stroke-linecap:round!important}.mermaid svg .messageLine,.mermaid svg .messageLine0,.mermaid svg .messageLine1{stroke-width:2px!important;stroke-dasharray:none!important}.mermaid svg .actor-line,.mermaid svg line.actor-line,.mermaid svg .actor-line line{stroke-width:3px!important}.mermaid svg .edgeLabel{background:transparent!important}.mermaid svg .edgeLabel rect,.mermaid svg .edgeLabel .label-container,.mermaid svg .edgeLabel .label-bg,.mermaid svg .edgeLabel .label,.mermaid svg .edgeLabel .label rect,.mermaid svg .label rect,.mermaid svg g.edgeLabel rect{fill:transparent!important;stroke:transparent!important}.mermaid svg foreignObject{overflow:visible!important}.mermaid svg foreignObject .edgeLabel,.mermaid svg foreignObject .label,.mermaid svg foreignObject div{background:transparent!important;background-color:transparent!important;border:0!important;box-shadow:none!important}.mermaid svg .labelBkg,.mermaid .labelBkg,.mermaid .edgeLabel,.mermaid .edgeLabel p,.mermaid .labelBkg p{background:transparent!important;background-color:transparent!important;border:0!important;box-shadow:none!important}.mermaid .labelBkg,.mermaid .edgeLabel,.mermaid .labelBkg p,.mermaid .edgeLabel p{padding:0!important;margin:0!important}.mermaid svg foreignObject div.labelBkg{border:0!important;border-radius:9999px!important;padding:2px 8px!important;display:inline-block!important}.mermaid svg .actor rect,.mermaid svg rect.actor,.mermaid svg .actor line,.mermaid svg line.actor-line{stroke-width:1.5px!important}.mermaid svg .actor text{font-weight:500}.mermaid svg text.messageText{paint-order:stroke fill!important;stroke-width:10px!important;stroke-linejoin:round!important;stroke-linecap:round!important}.mermaid svg .labelBox{stroke:none!important;rx:9999px;ry:9999px}.dark .mermaid svg .node rect,.dark .mermaid svg .node polygon,.dark .mermaid svg .node circle,.dark .mermaid svg .node ellipse{fill:#0f1115!important;stroke:#3a3f46!important;filter:drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08))\n drop-shadow(0 0 6px rgba(255, 255, 255, 0.04))}.dark .mermaid svg .node text{fill:#f5f7fa!important}.dark .mermaid svg .edgePath path,.dark .mermaid svg .flowchart-link,.dark .mermaid svg path.edge-thickness-normal{stroke:#4da3ff!important}.dark .mermaid svg .messageLine,.dark .mermaid svg .messageLine0,.dark .mermaid svg .messageLine1{stroke:#4da3ff!important}.dark .mermaid svg .actor-line,.dark .mermaid svg line.actor-line,.dark .mermaid svg .actor-line line{stroke:#4da3ff!important}.dark .mermaid svg .arrowheadPath,.dark .mermaid svg marker path{fill:#4da3ff!important;stroke:#4da3ff!important}.dark .mermaid svg .edgeLabel text,.dark .mermaid svg .edgeLabel span,.dark .mermaid svg .edgeLabel tspan{fill:#ffffff!important;color:#ffffff!important}.dark .mermaid svg foreignObject div.labelBkg{background:#0b0f14!important;background-color:#0b0f14!important}.dark .mermaid svg .messageText,.dark .mermaid svg .messageText tspan{fill:#ffffff!important}.dark .mermaid svg text.messageText{stroke:#0b0f14!important}.dark .mermaid svg .labelBox{fill:#0b0f14!important}.dark .mermaid svg .actor rect,.dark .mermaid svg rect.actor,.dark .mermaid svg .actor line,.dark .mermaid svg line.actor-line{fill:#0f1115!important;stroke:#3a3f46!important;filter:drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08))\n drop-shadow(0 0 6px rgba(255, 255, 255, 0.04))!important}.dark .mermaid svg .actor text{fill:#f5f7fa!important}:root:not(.dark) .mermaid svg .node rect,:root:not(.dark) .mermaid svg .node polygon,:root:not(.dark) .mermaid svg .node circle,:root:not(.dark) .mermaid svg .node ellipse{fill:#f0f2f5!important;stroke:#d0d5dd!important;filter:none!important}:root:not(.dark) .mermaid svg .node text{fill:#1a1a2e!important}:root:not(.dark) .mermaid svg .edgePath path,:root:not(.dark) .mermaid svg .flowchart-link,:root:not(.dark) .mermaid svg path.edge-thickness-normal{stroke:#5ba3f5!important}:root:not(.dark) .mermaid svg .messageLine,:root:not(.dark) .mermaid svg .messageLine0,:root:not(.dark) .mermaid svg .messageLine1{stroke:#5ba3f5!important}:root:not(.dark) .mermaid svg .actor-line,:root:not(.dark) .mermaid svg line.actor-line,:root:not(.dark) .mermaid svg .actor-line line{stroke:#5ba3f5!important}:root:not(.dark) .mermaid svg .arrowheadPath,:root:not(.dark) .mermaid svg marker path{fill:#5ba3f5!important;stroke:#5ba3f5!important}:root:not(.dark) .mermaid svg .edgeLabel text,:root:not(.dark) .mermaid svg .edgeLabel span,:root:not(.dark) .mermaid svg .edgeLabel tspan{fill:#1a1a2e!important;color:#1a1a2e!important}:root:not(.dark) .mermaid svg foreignObject div.labelBkg{background:#e8ebf0!important;background-color:#e8ebf0!important}:root:not(.dark) .mermaid svg .messageText,:root:not(.dark) .mermaid svg .messageText tspan{fill:#1a1a2e!important}:root:not(.dark) .mermaid svg text.messageText{stroke:#ffffff!important}:root:not(.dark) .mermaid svg .labelBox{fill:#e8ebf0!important}:root:not(.dark) .mermaid svg .actor rect,:root:not(.dark) .mermaid svg rect.actor,:root:not(.dark) .mermaid svg .actor line,:root:not(.dark) .mermaid svg line.actor-line{fill:#f0f2f5!important;stroke:#d0d5dd!important;filter:none!important}:root:not(.dark) .mermaid svg .actor text{fill:#1a1a2e!important}.mermaid svg rect.note.phase-banner{fill:#1e3a5f!important;stroke:#1e3a5f!important}.dark .mermaid svg rect.note.phase-banner{stroke:#4da3ff!important}.mermaid svg text.noteText.phase-banner,.mermaid svg text.noteText.phase-banner tspan{fill:#ffffff!important;font-weight:600}:root .mermaid svg text.messageText.has-chip{stroke:none!important}.mermaid svg rect.label-chip{rx:4px;ry:4px;fill:#ffffff;stroke:#d0d5dd;stroke-width:1px}.dark .mermaid svg rect.label-chip{fill:#0b0f14;stroke:#3a3f46}.mermaid svg rect.frame-chip{rx:4px;ry:4px;fill:#efeafb;stroke:#9370db;stroke-width:1px}.dark .mermaid svg rect.frame-chip{fill:#241f3a}:root:not(.dark) .mermaid svg.flows-diagram .messageLine0,:root:not(.dark) .mermaid svg.flows-diagram .messageLine1{stroke:#2563eb!important}:root:not(.dark) .mermaid svg.flows-diagram .arrowheadPath,:root:not(.dark) .mermaid svg.flows-diagram marker path{fill:#2563eb!important;stroke:#2563eb!important}:root:not(.dark) .mermaid svg.flows-diagram line.actor-line{stroke:#6b7280!important;stroke-width:1px!important}.dark .mermaid svg.flows-diagram line.actor-line{stroke:#8b93a1!important;stroke-width:1px!important}.mermaid svg.flows-diagram .messageLine1{stroke-dasharray:6 4!important}.dark{--dfh-bg:#070E14;--dfh-surface:#0f1820;--dfh-surface-2:#142030;--dfh-border:rgba(255,255,255,.07);--dfh-text:#eef2f6;--dfh-text-2:#8a929e;--dfh-blue:#94D2F2;--dfh-btn-bg:#ffffff;--dfh-btn-text:#070E14;--dfh-ghost-text:#ffffff;--dfh-ghost-border:rgba(255,255,255,.35);--dfh-ghost-hover-bg:rgba(255,255,255,.1);--dfh-ghost-hover-border:rgba(255,255,255,.6);--dfh-hero-text:#ffffff;--dfh-hero-sub:rgba(255,255,255,.8);--dfh-arrow:#ffffff;--dfh-hero-grad:linear-gradient(180deg,#050d16 0%,#0a1a28 12%,#10263a 24%,#183450 36%,#214568 48%,#2d5a80 60%,#3b7298 70%,#508cb0 80%,#67a5c8 88%,#7dbdde 94%,#94d2f2 100%);--dfh-hero-img:url('/images/gradients/hero-gradient-dark.png')}:root:not(.dark){--dfh-bg:#f4f6f9;--dfh-surface:#ffffff;--dfh-surface-2:#f0f5fb;--dfh-border:rgba(0,0,0,.07);--dfh-text:#070E14;--dfh-text-2:#4a5568;--dfh-blue:#66C5F6;--dfh-btn-bg:#081A2A;--dfh-btn-text:#ffffff;--dfh-ghost-text:#0a2540;--dfh-ghost-border:#0a2540;--dfh-ghost-hover-bg:rgba(10,37,64,.08);--dfh-ghost-hover-border:#0a2540;--dfh-hero-text:#081A2A;--dfh-hero-sub:rgba(8,26,42,.75);--dfh-arrow:#66C5F6;--dfh-hero-grad:linear-gradient(180deg,#ffffff 0%,#f8fcfe 8%,#eef8fd 18%,#e0f2fb 30%,#ceeaf8 44%,#bce3f6 56%,#aadaf3 66%,#9dd2f0 74%,#96ceee 82%,#9dd3f1 90%,#aadaf4 100%);--dfh-hero-img:url('/images/gradients/hero-gradient-light.png')}.dfh-page{background:var(--dfh-bg);min-height:100vh;font-family:'RM Neue',system-ui,-apple-system,sans-serif}.dfh-wrap{max-width:1140px;margin:0 auto;padding:0 40px}.dfh-hero{background-image:var(--dfh-hero-img),var(--dfh-hero-grad);background-size:100% 100%,100% 100%;background-repeat:no-repeat;transition:background .3s ease;padding:160px 40px 120px;text-align:center}.dfh-hero-inner{max-width:820px;margin:0 auto}.dfh-hero h1{font-size:clamp(36px,5.5vw,72px);font-weight:800;line-height:1.05;letter-spacing:-0.04em;color:var(--dfh-hero-text);margin:0 0 20px}.dfh-hero p{font-size:clamp(15px,1.6vw,19px);line-height:1.5;color:var(--dfh-hero-sub);max-width:52ch;margin:0 auto 32px}.dfh-cta-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}.dfh-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;height:48px;padding:0 24px;border-radius:999px;box-sizing:border-box;border:none;font-size:15px;letter-spacing:-.01em;text-decoration:none!important;transition:transform .15s cubic-bezier(.2,0,0,1), opacity .15s, background .15s, border-color .15s}.dfh-btn svg{width:16px;height:16px}.dfh-btn-primary{background:var(--dfh-btn-bg);color:var(--dfh-btn-text);font-weight:600}.dfh-btn-primary:hover{transform:translateY(-1px);opacity:.9}.dfh-btn-ghost{background:transparent;color:var(--dfh-ghost-text);border:1px solid var(--dfh-ghost-border);font-weight:400;padding:0 22px;gap:8px}.dfh-btn-ghost svg{width:15px;height:15px;opacity:.8}.dfh-btn-ghost:hover{transform:translateY(-1px);background:var(--dfh-ghost-hover-bg);border-color:var(--dfh-ghost-hover-border)}.dfh-section{padding:56px 0 0}.dfh-section h2{font-size:clamp(20px,2.4vw,26px);font-weight:500;letter-spacing:-0.02em;color:var(--dfh-text);margin:0 0 16px}.dfh-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.dfh-card{position:relative;display:block;background:var(--dfh-surface);border:1px solid var(--dfh-border);border-radius:20px;padding:28px 28px 24px;text-decoration:none!important;border-bottom:1px solid var(--dfh-border)!important;transition:transform .18s cubic-bezier(.2,0,0,1), background .18s ease, border-color .18s ease}.dfh-card:hover{background:var(--dfh-surface-2);transform:translateY(-2px)}.dfh-card-arrow{position:absolute;top:24px;right:24px;color:var(--dfh-arrow);transition:transform .18s ease}.dfh-card:hover .dfh-card-arrow{transform:translate(2px,-2px)}.dfh-card-icon{color:var(--dfh-blue);margin-bottom:14px}.dfh-card h3{font-size:17px;font-weight:600;letter-spacing:-0.02em;color:var(--dfh-text);margin:0 0 8px}.dfh-card p{font-size:13.5px;line-height:1.5;color:var(--dfh-text-2);margin:0}.dfh-last{padding-bottom:140px}.dfh-card::after,.dfh-btn::after,.dfh-card::before,.dfh-btn::before{content:none!important}@media (max-width:760px){.dfh-grid{grid-template-columns:1fr}.dfh-hero{padding:120px 20px 80px}.dfh-wrap{padding:0 40px}}@layer base{#footer.advanced-footer{display:flex!important}}"}],"page":{"pagePath":"resources/trading-api/imperative/swap-instructions","slug":"/resources/trading-api/imperative/swap-instructions","pageMetadata":{"title":"Create Swap Instructions","description":"API reference for POST /swap-instructions","openapi":"POST /swap-instructions","href":"/resources/trading-api/imperative/swap-instructions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"API reference for POST /swap-instructions\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,p:`p`,..._provideComponents(),...props.components},{Info}=_components;if(!Info)_missingMdxReference(`Info`,true);return _jsx(Info,{children:_jsxs(_components.p,{children:[`This endpoint supports the v1 transaction format. See the\n`,_jsx(_components.a,{href:`/spot/trading/v1-migration-guide`,children:`v1 migration guide`}),` for the opt-in\nparameter and what changes between versions.`]})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Swap Instructions","description":"API reference for POST /swap-instructions","openapi":"POST /swap-instructions","href":"/resources/trading-api/imperative/swap-instructions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dflow/a27b41f29b29a317/banner-same-tab.js","/_mintlify/custom/dflow/8fc1f2a607c332f2/parameter-anchors.js","/_mintlify/custom/dflow/ad0cd535b1321341/diagram-label-chips.js","/_mintlify/custom/dflow/de50a83a05d19362/diagram-phase-banners.js"],"openApiReferenceData":{"operation":{"tags":["swap"],"summary":"Returns an imperative swap transaction for the given quote","operationId":"swap_instructions_handler","requestBody":"26d2fcf8-18f8-4b26-9d8c-104fa2ff1fc2","responses":{"200":"2b687377-8ef0-445d-93d9-7140995c92ac","400":"ab0a90f6-0281-4e1d-890c-45b6cd01e62b","500":"4075a94f-297e-4698-9bf3-b0b32f44775e"},"method":"post","type":"path","servers":["7c51790d-17f5-4b09-87f4-c571f10568d7"],"security":["d980718e-6533-4bbe-80d6-86dd303cb1c3"],"path":"/swap-instructions","baseUrlOptions":["https://quote-api.dflow.net"],"title":"Returns an imperative swap transaction for the given quote","description":"API reference for POST /swap-instructions","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["userPublicKey","quoteResponse"],"properties":{"quoteResponse":{"type":"object","required":["inputMint","inAmount","outputMint","outAmount","otherAmountThreshold","minOutAmount","slippageBps","priceImpactPct","routePlan","contextSlot"],"properties":{"contextSlot":{"type":"integer","format":"int64","description":"Slot at which the request was evaluated","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.contextSlot","typeLabel":"integer\u003cint64>"},"inAmount":{"type":"string","description":"Maximum input amount as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.inAmount","typeLabel":"string"},"inputMint":{"type":"string","description":"Base58-encoded input mint address","isRequired":true,"uniqueKey":"quoteResponse.inputMint","typeLabel":"string"},"minOutAmount":{"type":"string","description":"Same as `other_amount_threshold`","isRequired":true,"uniqueKey":"quoteResponse.minOutAmount","typeLabel":"string"},"otherAmountThreshold":{"type":"string","description":"Minimum output amount after all fees as a scaled integer. If the swap transaction doesn't\nproduce at least this amount of the output token, the transaction will fail.","isRequired":true,"uniqueKey":"quoteResponse.otherAmountThreshold","typeLabel":"string"},"outAmount":{"type":"string","description":"Expected output amount after all fees as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.outAmount","typeLabel":"string"},"outputMint":{"type":"string","description":"Base58-encoded output mint address","isRequired":true,"uniqueKey":"quoteResponse.outputMint","typeLabel":"string"},"priceImpactPct":{"type":"string","description":"Price impact of the swap. This is an estimate of the percentage difference between the\nexpected price for the swap and the price for the same swap with the smallest input amount\npossible. For example, \"0.01\" means 1% price impact.","isRequired":true,"uniqueKey":"quoteResponse.priceImpactPct","typeLabel":"string"},"routePlan":{"type":"array","items":{"oneOf":[{"type":"object","required":["venue","marketKey","data","inputMint","outputMint","inAmount","outAmount","inputMintDecimals","outputMintDecimals"],"properties":{"data":{"type":"string","description":"Data for the leg","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.data","typeLabel":"string"},"inAmount":{"type":"string","description":"Maximum input amount for the leg as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.inAmount","typeLabel":"string"},"inputMint":{"type":"string","description":"Base58-encoded input mint address","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.inputMint","typeLabel":"string"},"inputMintDecimals":{"type":"integer","format":"int32","description":"Decimals for the input mint","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.inputMintDecimals","typeLabel":"integer\u003cint32>"},"marketKey":{"type":"string","description":"Key identifying the market on the venue","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.marketKey","typeLabel":"string"},"outAmount":{"type":"string","description":"Expected output amount for the leg as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.outAmount","typeLabel":"string"},"outputMint":{"type":"string","description":"Base58-encoded output mint address","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.outputMint","typeLabel":"string"},"outputMintDecimals":{"type":"integer","format":"int32","description":"Decimals for the output mint","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.outputMintDecimals","typeLabel":"integer\u003cint32>"},"venue":{"type":"string","description":"Venue for the leg","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0.venue","typeLabel":"string"}},"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["venue","marketKey","inputMint","outputMint","inAmount","outAmount","inputMintDecimals","outputMintDecimals"],"properties":{"inAmount":{"type":"string","description":"Maximum input amount for the leg as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.inAmount","typeLabel":"string"},"inputMint":{"type":"string","description":"Base58-encoded input mint address","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.inputMint","typeLabel":"string"},"inputMintDecimals":{"type":"integer","format":"int32","description":"Decimals for the input mint","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.inputMintDecimals","typeLabel":"integer\u003cint32>"},"marketKey":{"type":"string","description":"Key identifying the market on the venue","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.marketKey","typeLabel":"string"},"outAmount":{"type":"string","description":"Expected output amount for the leg as a scaled integer. For example, 1 SOL is 1000000000.","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.outAmount","typeLabel":"string"},"outputMint":{"type":"string","description":"Base58-encoded output mint address","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.outputMint","typeLabel":"string"},"outputMintDecimals":{"type":"integer","format":"int32","description":"Decimals for the output mint","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.outputMintDecimals","typeLabel":"integer\u003cint32>"},"venue":{"type":"string","description":"Venue for the leg","isRequired":true,"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1.venue","typeLabel":"string"}},"uniqueKey":"quoteResponse.routePlan.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"quoteResponse.routePlan.items.[INDEX]","typeLabel":"object"},"description":"Route that the swap will take","isRequired":true,"uniqueKey":"quoteResponse.routePlan","typeLabel":"object[]"},"slippageBps":{"type":"integer","format":"int32","description":"Max allowed slippage % in basis points","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.slippageBps","typeLabel":"integer\u003cint32>"},"forJitoBundle":{"type":"boolean","description":"True if and only if the request was for a Jito bundle","uniqueKey":"quoteResponse.forJitoBundle","typeLabel":"boolean"},"outTransferFee":{"type":"string","description":"Transfer fee amount that was applied to the quote, if any","uniqueKey":"quoteResponse.outTransferFee","typeLabel":"string"},"platformFee":{"oneOf":[{"type":"null","uniqueKey":"quoteResponse.platformFee.oneOf.0","typeLabel":"null"},{"type":"object","description":"Platform fee that was applied to the quote, if any","required":["amount","feeBps","mode"],"properties":{"amount":{"type":"string","description":"Platform fee as a scaled integer. For example, 1 SOL is 1000000000. For output mint fees,\nthis is the expected amount that will be paid, but the exact amount will vary depending on\nhow much output the swap produces. For input mint fees, this is the exact amount that will\nbe paid.","isRequired":true,"uniqueKey":"quoteResponse.platformFee.oneOf.1.amount","typeLabel":"string"},"feeBps":{"type":"integer","format":"int32","description":"Platform fee in basis points","minimum":0,"isRequired":true,"uniqueKey":"quoteResponse.platformFee.oneOf.1.feeBps","typeLabel":"integer\u003cint32>"},"mode":{"type":"string","enum":["outputMint","inputMint"],"description":"Mode for the platform fee","isRequired":true,"uniqueKey":"quoteResponse.platformFee.oneOf.1.mode","typeLabel":"enum\u003cstring>"}},"uniqueKey":"quoteResponse.platformFee.oneOf.1","typeLabel":"object"}],"uniqueKey":"quoteResponse.platformFee","typeLabel":"null | object"},"requestId":{"type":"string","description":"Identifier for the request","uniqueKey":"quoteResponse.requestId","typeLabel":"string"},"routingSlot":{"type":"integer","format":"int64","description":"Slot of the market state used to compute the quote","minimum":0,"uniqueKey":"quoteResponse.routingSlot","typeLabel":"integer\u003cint64>"},"simulatedComputeUnits":{"type":"integer","format":"int32","description":"Compute units consumed by quote simulation","minimum":0,"uniqueKey":"quoteResponse.simulatedComputeUnits","typeLabel":"integer\u003cint32>"},"skipPumpfunCashbackClaim":{"type":"boolean","description":"True if and only if Pump.fun cashback claiming was skipped for this quote","uniqueKey":"quoteResponse.skipPumpfunCashbackClaim","typeLabel":"boolean"}},"description":"The response from the quote endpoint","isRequired":true,"uniqueKey":"quoteResponse","typeLabel":"object"},"userPublicKey":{"type":"string","description":"Base58-encoded address of the swapper's wallet","isRequired":true,"uniqueKey":"userPublicKey","typeLabel":"string"},"computeUnitPriceMicroLamports":{"type":"integer","format":"int64","description":"Compute unit price in micro-lamports. Mutually exclusive with `prioritizationFeeLamports`.","minimum":0,"uniqueKey":"computeUnitPriceMicroLamports","typeLabel":"integer\u003cint64>"},"createFeeAccount":{"type":"object","required":["referralAccount"],"properties":{"referralAccount":{"type":"string","description":"Base58-encoded address of the referral account associated with the fee account","isRequired":true,"uniqueKey":"createFeeAccount.referralAccount","typeLabel":"string"}},"description":"If the fee account isn't a referral token account derived from the seeds\n`[\"referral_ata\", referral_account, mint]` and the Referral program ID\n`REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3`, this should be unspecified. If specified, the\ntransaction will create the `fee_account` if it doesn't already exist. The user pays for the\ncreation of the fee account. Ignored if `fee_account` is unspecified.","uniqueKey":"createFeeAccount","typeLabel":"object"},"destinationTokenAccount":{"oneOf":[{"type":"object","description":"The account that will receive the output token. If not specified, the user's associated\ntoken account for the output mint will be used. Allowed values are:\n- A base58-encoded address, which specifies the address of the destination token account or,\n if the output is native SOL, the destination wallet. If the output isn't native SOL, the\n specified account must exist before the swap executes, or else the swap will fail.\n- An object which specifies the owner of the destination token account. In this case, the\n owner's associated token account for the output mint will be used as the destination token\n account. Note that this cannot be used if the output is native SOL. The object contains\n the following:\n - `associatedTokenAccount` - object\n - `owner` - base58-encoded address of the owner of the destination token account","required":["associatedTokenAccount"],"properties":{"associatedTokenAccount":{"type":"object","description":"Use the specified owner's associated token account for the output mint as the destination\ntoken account. If the destination token account is uninitialized at swap execution time, the\nswap will create it. This cannot be used if the output is native SOL.","required":["owner"],"properties":{"owner":{"type":"string","description":"Base58-encoded address of the owner of the destination token account","isRequired":true,"uniqueKey":"destinationTokenAccount.oneOf.0.associatedTokenAccount.owner","typeLabel":"string"}},"isRequired":true,"uniqueKey":"destinationTokenAccount.oneOf.0.associatedTokenAccount","typeLabel":"object"}},"uniqueKey":"destinationTokenAccount.oneOf.0","typeLabel":"object"},{"type":"object","description":"The account that will receive the output token. If not specified, the user's associated\ntoken account for the output mint will be used. Allowed values are:\n- A base58-encoded address, which specifies the address of the destination token account or,\n if the output is native SOL, the destination wallet. If the output isn't native SOL, the\n specified account must exist before the swap executes, or else the swap will fail.\n- An object which specifies the owner of the destination token account. In this case, the\n owner's associated token account for the output mint will be used as the destination token\n account. Note that this cannot be used if the output is native SOL. The object contains\n the following:\n - `associatedTokenAccount` - object\n - `owner` - base58-encoded address of the owner of the destination token account","required":["address"],"properties":{"address":{"type":"string","description":"Use the specified base58-encoded address as the destination token account. The account must\nalready be initialized at swap execution time or else the transaction will fail.","isRequired":true,"uniqueKey":"destinationTokenAccount.oneOf.1.address","typeLabel":"string"}},"uniqueKey":"destinationTokenAccount.oneOf.1","typeLabel":"object"}],"uniqueKey":"destinationTokenAccount","typeLabel":"object"},"dynamicComputeUnitLimit":{"type":"boolean","description":"If true, the server will simulate the transaction to determine its compute unit limit. If\nunspecified or false, the transaction will use the default compute unit limit.","uniqueKey":"dynamicComputeUnitLimit","typeLabel":"boolean"},"feeAccount":{"type":"string","description":"Base58-encoded address of the token account that will receive the platform fee if a platform\nfee applies to the swap. If specified, this account's mint must match the fee mint for the\nswap.","uniqueKey":"feeAccount","typeLabel":"string"},"includeJitoSandwichMitigationAccount":{"oneOf":[{"type":"boolean","description":"If specified, the transaction will include a Jito sandwich mitigation account in the swap\ninstruction. Allowed values are:\n- `true` - uses the default Jito sandwich mitigation account\n- `false` - does not include the account\n- A base58-encoded account address - uses the specified account\n\nIf unspecified, the account is not included.\nSee https://docs.jito.wtf/lowlatencytxnsend/#sandwich-mitigation for more details.","uniqueKey":"includeJitoSandwichMitigationAccount.oneOf.0","typeLabel":"boolean"},{"type":"string","description":"If specified, the transaction will include a Jito sandwich mitigation account in the swap\ninstruction. Allowed values are:\n- `true` - uses the default Jito sandwich mitigation account\n- `false` - does not include the account\n- A base58-encoded account address - uses the specified account\n\nIf unspecified, the account is not included.\nSee https://docs.jito.wtf/lowlatencytxnsend/#sandwich-mitigation for more details.","uniqueKey":"includeJitoSandwichMitigationAccount.oneOf.1","typeLabel":"string"}],"uniqueKey":"includeJitoSandwichMitigationAccount","typeLabel":"boolean | string"},"outputCloseAuthority":{"type":"string","description":"Base58-encoded address of the close authority to assign to the output token account. If\nspecified, the swap instruction will idempotently initialize the output token account and\nset its close authority to the specified address. The action is a no-op if the output\ntoken account already exists at execution time.\n\nCannot be used when the output mint is SOL (wrapped or native). Cannot be used with\n`destinationTokenAccount`.","uniqueKey":"outputCloseAuthority","typeLabel":"string"},"perLegSlippage":{"type":"boolean","description":"If true or unspecified, per-leg slippage checks are enabled. If false, per-leg slippage\nchecks are disabled.","uniqueKey":"perLegSlippage","typeLabel":"boolean"},"positiveSlippage":{"type":"object","required":["limitPct"],"properties":{"limitPct":{"type":"integer","format":"int32","description":"Limit on the positive slippage fee in percent. The positive slippage fee is limited to the\nlesser of (1) the excess actual out amount above the quoted amount and (2) this percentage\nof the actual out amount after platform fee.","minimum":0,"isRequired":true,"uniqueKey":"positiveSlippage.limitPct","typeLabel":"integer\u003cint32>"},"feeAccount":{"type":"string","description":"Base58-encoded address of the token account that will receive the positive slippage fee.\nThis must be a token account for the output mint, regardless of the platform fee mode. If at\nswap execution time this account can't receive the positive slippage fee, then the positive\nslippage fee transfer is skipped. If the platform fee mode is `outputMint` and the platform\nfee account is specified, then this must be unspecified (in which case the platform fee\naccount will be used) or match the platform fee account. Otherwise, this must be specified.","uniqueKey":"positiveSlippage.feeAccount","typeLabel":"string"}},"description":"Positive slippage fee parameters. If specified, then the swap will pay some or all positive\nslippage to the specified account.","uniqueKey":"positiveSlippage","typeLabel":"object"},"prioritizationFeeLamports":{"oneOf":[{"type":"object","description":"Prioritization fee in lamports. Mutually exclusive with `computeUnitPriceMicroLamports`.\nIf both `computeUnitPriceMicroLamports` and `prioritizationFeeLamports` are unspecified, the\ndefault of `prioritizationFeeLamports=\"auto\"` will be used.\nAllowed values are:\n- a u32 which specifies the lamports\n- the string value \"auto\", where the server determines the fee automatically, capped at\n 0.005 SOL\n- the string value \"disabled\", where the server leaves the prioritization fee unspecified\n- an object containing the following\n - `priorityLevelWithMaxLamports` - object\n - `priorityLevel` - string, either `medium`, `high`, or `veryHigh`\n - `maxLamports` - integer, a cap on the prioritization fee\n- an object containing the following\n - `autoMultiplier` - a u32 which specifies how much to multiply the automatically\n determined fee by. The total prioritization fee will be capped at 0.005 SOL.","required":["autoMultiplier"],"properties":{"autoMultiplier":{"type":"integer","format":"int32","description":"A multiplier applied to the automatically-determined fee. The total is capped at 0.005 SOL.","minimum":0,"isRequired":true,"uniqueKey":"prioritizationFeeLamports.oneOf.0.autoMultiplier","typeLabel":"integer\u003cint32>"}},"uniqueKey":"prioritizationFeeLamports.oneOf.0","typeLabel":"object"},{"type":"object","description":"Prioritization fee in lamports. Mutually exclusive with `computeUnitPriceMicroLamports`.\nIf both `computeUnitPriceMicroLamports` and `prioritizationFeeLamports` are unspecified, the\ndefault of `prioritizationFeeLamports=\"auto\"` will be used.\nAllowed values are:\n- a u32 which specifies the lamports\n- the string value \"auto\", where the server determines the fee automatically, capped at\n 0.005 SOL\n- the string value \"disabled\", where the server leaves the prioritization fee unspecified\n- an object containing the following\n - `priorityLevelWithMaxLamports` - object\n - `priorityLevel` - string, either `medium`, `high`, or `veryHigh`\n - `maxLamports` - integer, a cap on the prioritization fee\n- an object containing the following\n - `autoMultiplier` - a u32 which specifies how much to multiply the automatically\n determined fee by. The total prioritization fee will be capped at 0.005 SOL.","required":["priorityLevelWithMaxLamports"],"properties":{"priorityLevelWithMaxLamports":{"type":"object","description":"A variable prioritization fee determined by the server based on the specified priority level","required":["priorityLevel","maxLamports"],"properties":{"maxLamports":{"type":"integer","format":"int32","description":"Maximum lamports to cap the prioritization fee determined by the server","minimum":0,"isRequired":true,"uniqueKey":"prioritizationFeeLamports.oneOf.1.priorityLevelWithMaxLamports.maxLamports","typeLabel":"integer\u003cint32>"},"priorityLevel":{"type":"string","enum":["medium","high","veryHigh"],"description":"Priority level for the prioritization fee","isRequired":true,"uniqueKey":"prioritizationFeeLamports.oneOf.1.priorityLevelWithMaxLamports.priorityLevel","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"prioritizationFeeLamports.oneOf.1.priorityLevelWithMaxLamports","typeLabel":"object"}},"uniqueKey":"prioritizationFeeLamports.oneOf.1","typeLabel":"object"},{"type":"string","description":"Prioritization fee in lamports. Mutually exclusive with `computeUnitPriceMicroLamports`.\nIf both `computeUnitPriceMicroLamports` and `prioritizationFeeLamports` are unspecified, the\ndefault of `prioritizationFeeLamports=\"auto\"` will be used.\nAllowed values are:\n- a u32 which specifies the lamports\n- the string value \"auto\", where the server determines the fee automatically, capped at\n 0.005 SOL\n- the string value \"disabled\", where the server leaves the prioritization fee unspecified\n- an object containing the following\n - `priorityLevelWithMaxLamports` - object\n - `priorityLevel` - string, either `medium`, `high`, or `veryHigh`\n - `maxLamports` - integer, a cap on the prioritization fee\n- an object containing the following\n - `autoMultiplier` - a u32 which specifies how much to multiply the automatically\n determined fee by. The total prioritization fee will be capped at 0.005 SOL.","enum":["auto"],"uniqueKey":"prioritizationFeeLamports.oneOf.2","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Prioritization fee in lamports. Mutually exclusive with `computeUnitPriceMicroLamports`.\nIf both `computeUnitPriceMicroLamports` and `prioritizationFeeLamports` are unspecified, the\ndefault of `prioritizationFeeLamports=\"auto\"` will be used.\nAllowed values are:\n- a u32 which specifies the lamports\n- the string value \"auto\", where the server determines the fee automatically, capped at\n 0.005 SOL\n- the string value \"disabled\", where the server leaves the prioritization fee unspecified\n- an object containing the following\n - `priorityLevelWithMaxLamports` - object\n - `priorityLevel` - string, either `medium`, `high`, or `veryHigh`\n - `maxLamports` - integer, a cap on the prioritization fee\n- an object containing the following\n - `autoMultiplier` - a u32 which specifies how much to multiply the automatically\n determined fee by. The total prioritization fee will be capped at 0.005 SOL.","required":["lamports"],"properties":{"lamports":{"type":"integer","format":"int32","description":"A fixed prioritization fee in lamports","minimum":0,"isRequired":true,"uniqueKey":"prioritizationFeeLamports.oneOf.3.lamports","typeLabel":"integer\u003cint32>"}},"uniqueKey":"prioritizationFeeLamports.oneOf.3","typeLabel":"object"},{"type":"string","description":"Prioritization fee in lamports. Mutually exclusive with `computeUnitPriceMicroLamports`.\nIf both `computeUnitPriceMicroLamports` and `prioritizationFeeLamports` are unspecified, the\ndefault of `prioritizationFeeLamports=\"auto\"` will be used.\nAllowed values are:\n- a u32 which specifies the lamports\n- the string value \"auto\", where the server determines the fee automatically, capped at\n 0.005 SOL\n- the string value \"disabled\", where the server leaves the prioritization fee unspecified\n- an object containing the following\n - `priorityLevelWithMaxLamports` - object\n - `priorityLevel` - string, either `medium`, `high`, or `veryHigh`\n - `maxLamports` - integer, a cap on the prioritization fee\n- an object containing the following\n - `autoMultiplier` - a u32 which specifies how much to multiply the automatically\n determined fee by. The total prioritization fee will be capped at 0.005 SOL.","enum":["disabled"],"uniqueKey":"prioritizationFeeLamports.oneOf.4","typeLabel":"enum\u003cstring>"}],"uniqueKey":"prioritizationFeeLamports","typeLabel":"object · object · enum\u003cstring> · object · enum\u003cstring>"},"sponsor":{"type":"string","description":"Base58-encoded address of the sponsor's wallet. If specified, the sponsor will pay the\ntransaction fee and for token account creation, and both the user and the sponsor must sign\nthe swap transaction. This can be used to implement gasless swaps.","uniqueKey":"sponsor","typeLabel":"string"},"sponsorExec":{"type":"boolean","description":"If true, the sponsor will be the executor of the swap for sponsored swaps. If false, the\nuser will be the executor of the swap for sponsored swaps. Default is true.","uniqueKey":"sponsorExec","typeLabel":"boolean"},"transactionVersion":{"type":"string","description":"Wire format of the returned transaction. Default is `v0`. See the `transactionVersion`\nparameter on the order endpoint for the trade-offs; in particular, `v1` has no address\nlookup tables, so it should be requested on the corresponding quote as well, or the quoted\nroute may not fit.","default":"v0","enum":["v0","v1"],"example":"v0","uniqueKey":"transactionVersion","typeLabel":"enum\u003cstring>"},"wrapAndUnwrapSol":{"type":"boolean","description":"If false, the transaction will use wrapped SOL","uniqueKey":"wrapAndUnwrapSol","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"quoteResponse":{"contextSlot":1,"inAmount":"\u003cstring>","inputMint":"\u003cstring>","minOutAmount":"\u003cstring>","otherAmountThreshold":"\u003cstring>","outAmount":"\u003cstring>","outputMint":"\u003cstring>","priceImpactPct":"\u003cstring>","routePlan":[{"data":"\u003cstring>","inAmount":"\u003cstring>","inputMint":"\u003cstring>","inputMintDecimals":1,"marketKey":"\u003cstring>","outAmount":"\u003cstring>","outputMint":"\u003cstring>","outputMintDecimals":1,"venue":"\u003cstring>"}],"slippageBps":1,"forJitoBundle":true,"outTransferFee":"\u003cstring>","platformFee":{"amount":"\u003cstring>","feeBps":1},"requestId":"\u003cstring>","routingSlot":1,"simulatedComputeUnits":1,"skipPumpfunCashbackClaim":true},"userPublicKey":"\u003cstring>","computeUnitPriceMicroLamports":1,"destinationTokenAccount":{"associatedTokenAccount":{"owner":"\u003cstring>"}},"dynamicComputeUnitLimit":true,"feeAccount":"\u003cstring>","includeJitoSandwichMitigationAccount":true,"outputCloseAuthority":"\u003cstring>","perLegSlippage":true,"prioritizationFeeLamports":{"autoMultiplier":1},"sponsor":"\u003cstring>","sponsorExec":true,"transactionVersion":"v0","wrapAndUnwrapSol":true}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"2b687377-8ef0-445d-93d9-7140995c92ac":{"description":"Imperative swap transaction","content":{"application/json":{"schema":{"type":"object","required":["computeBudgetInstructions","setupInstructions","swapInstruction","cleanupInstructions","otherInstructions","addressLookupTableAddresses","transactionVersion","prioritizationFeeLamports","computeUnitLimit","loadedAccountsDataSizeLimit","blockhashWithMetadata"],"properties":{"addressLookupTableAddresses":{"type":"array","items":{"type":"string","uniqueKey":"addressLookupTableAddresses.items.[INDEX]","typeLabel":"string"},"description":"The lookup table addresses.\n\nEmpty when `transactionVersion` is `v1`: that format has no address lookup tables and\ninlines every address.","isRequired":true,"uniqueKey":"addressLookupTableAddresses","typeLabel":"string[]"},"blockhashWithMetadata":{"type":"object","required":["blockhash","lastValidBlockHeight"],"properties":{"blockhash":{"type":"string","description":"Base58-encoded blockhash","isRequired":true,"uniqueKey":"blockhashWithMetadata.blockhash","typeLabel":"string"},"lastValidBlockHeight":{"type":"integer","format":"int64","description":"The last block height at which a transaction that uses the blockhash is valid","minimum":0,"isRequired":true,"uniqueKey":"blockhashWithMetadata.lastValidBlockHeight","typeLabel":"integer\u003cint64>"}},"description":"A blockhash that can be used to construct the transaction","isRequired":true,"uniqueKey":"blockhashWithMetadata","typeLabel":"object"},"cleanupInstructions":{"type":"array","items":{"type":"object","required":["programId","accounts","data"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["pubkey","isSigner","isWritable"],"properties":{"isSigner":{"type":"boolean","description":"Is the account a signer?","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].accounts.items.[INDEX].isSigner","typeLabel":"boolean"},"isWritable":{"type":"boolean","description":"Is the account writable?","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].accounts.items.[INDEX].isWritable","typeLabel":"boolean"},"pubkey":{"type":"string","description":"Pubkey of the account","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].accounts.items.[INDEX].pubkey","typeLabel":"string"}},"uniqueKey":"cleanupInstructions.items.[INDEX].accounts.items.[INDEX]","typeLabel":"object"},"description":"Metadata describing accounts that should be passed to the program.","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].accounts","typeLabel":"object[]"},"data":{"type":"string","description":"Opaque data passed to the program for its own interpretation.","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].data","typeLabel":"string"},"programId":{"type":"string","description":"Pubkey of the program that executes this instruction.","isRequired":true,"uniqueKey":"cleanupInstructions.items.[INDEX].programId","typeLabel":"string"}},"uniqueKey":"cleanupInstructions.items.[INDEX]","typeLabel":"object"},"description":"Instructions that should be included after the swap instruction","isRequired":true,"uniqueKey":"cleanupInstructions","typeLabel":"object[]"},"computeBudgetInstructions":{"type":"array","items":{"type":"object","required":["programId","accounts","data"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["pubkey","isSigner","isWritable"],"properties":{"isSigner":{"type":"boolean","description":"Is the account a signer?","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].accounts.items.[INDEX].isSigner","typeLabel":"boolean"},"isWritable":{"type":"boolean","description":"Is the account writable?","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].accounts.items.[INDEX].isWritable","typeLabel":"boolean"},"pubkey":{"type":"string","description":"Pubkey of the account","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].accounts.items.[INDEX].pubkey","typeLabel":"string"}},"uniqueKey":"computeBudgetInstructions.items.[INDEX].accounts.items.[INDEX]","typeLabel":"object"},"description":"Metadata describing accounts that should be passed to the program.","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].accounts","typeLabel":"object[]"},"data":{"type":"string","description":"Opaque data passed to the program for its own interpretation.","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].data","typeLabel":"string"},"programId":{"type":"string","description":"Pubkey of the program that executes this instruction.","isRequired":true,"uniqueKey":"computeBudgetInstructions.items.[INDEX].programId","typeLabel":"string"}},"uniqueKey":"computeBudgetInstructions.items.[INDEX]","typeLabel":"object"},"description":"Instructions that determine the compute budget and prioritization fee for the transaction.\n\nEmpty when `transactionVersion` is `v1`, which sets the compute budget in the message\nheader instead. Build that header from `computeUnitLimit`, `prioritizationFeeLamports` and\n`loadedAccountsDataSizeLimit` below.","isRequired":true,"uniqueKey":"computeBudgetInstructions","typeLabel":"object[]"},"computeUnitLimit":{"type":"integer","format":"int32","description":"Compute unit limit assigned to the transaction","minimum":0,"isRequired":true,"uniqueKey":"computeUnitLimit","typeLabel":"integer\u003cint32>"},"loadedAccountsDataSizeLimit":{"type":"integer","format":"int32","description":"Maximum account data, in bytes, the transaction is permitted to load.\n\nSet this in the message header when building a `v1` transaction. Omitting it will cause the\ntransaction to fail. `v0` callers can ignore this field, since the same limit already\napplies by default.","minimum":0,"isRequired":true,"uniqueKey":"loadedAccountsDataSizeLimit","typeLabel":"integer\u003cint32>"},"otherInstructions":{"type":"array","items":{"type":"object","required":["programId","accounts","data"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["pubkey","isSigner","isWritable"],"properties":{"isSigner":{"type":"boolean","description":"Is the account a signer?","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].accounts.items.[INDEX].isSigner","typeLabel":"boolean"},"isWritable":{"type":"boolean","description":"Is the account writable?","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].accounts.items.[INDEX].isWritable","typeLabel":"boolean"},"pubkey":{"type":"string","description":"Pubkey of the account","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].accounts.items.[INDEX].pubkey","typeLabel":"string"}},"uniqueKey":"otherInstructions.items.[INDEX].accounts.items.[INDEX]","typeLabel":"object"},"description":"Metadata describing accounts that should be passed to the program.","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].accounts","typeLabel":"object[]"},"data":{"type":"string","description":"Opaque data passed to the program for its own interpretation.","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].data","typeLabel":"string"},"programId":{"type":"string","description":"Pubkey of the program that executes this instruction.","isRequired":true,"uniqueKey":"otherInstructions.items.[INDEX].programId","typeLabel":"string"}},"uniqueKey":"otherInstructions.items.[INDEX]","typeLabel":"object"},"description":"Other instructions that should be included in the transaction. The indices of these\ninstructions in the transaction are not important.","isRequired":true,"uniqueKey":"otherInstructions","typeLabel":"object[]"},"prioritizationFeeLamports":{"type":"integer","format":"int64","description":"Prioritization fee in lamports.\n\nUnder `v1` this is the total-lamports value to set in the message header, not a rate.","minimum":0,"isRequired":true,"uniqueKey":"prioritizationFeeLamports","typeLabel":"integer\u003cint64>"},"setupInstructions":{"type":"array","items":{"type":"object","required":["programId","accounts","data"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["pubkey","isSigner","isWritable"],"properties":{"isSigner":{"type":"boolean","description":"Is the account a signer?","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].accounts.items.[INDEX].isSigner","typeLabel":"boolean"},"isWritable":{"type":"boolean","description":"Is the account writable?","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].accounts.items.[INDEX].isWritable","typeLabel":"boolean"},"pubkey":{"type":"string","description":"Pubkey of the account","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].accounts.items.[INDEX].pubkey","typeLabel":"string"}},"uniqueKey":"setupInstructions.items.[INDEX].accounts.items.[INDEX]","typeLabel":"object"},"description":"Metadata describing accounts that should be passed to the program.","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].accounts","typeLabel":"object[]"},"data":{"type":"string","description":"Opaque data passed to the program for its own interpretation.","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].data","typeLabel":"string"},"programId":{"type":"string","description":"Pubkey of the program that executes this instruction.","isRequired":true,"uniqueKey":"setupInstructions.items.[INDEX].programId","typeLabel":"string"}},"uniqueKey":"setupInstructions.items.[INDEX]","typeLabel":"object"},"description":"Instructions that should be included before the swap instruction","isRequired":true,"uniqueKey":"setupInstructions","typeLabel":"object[]"},"swapInstruction":{"type":"object","required":["programId","accounts","data"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["pubkey","isSigner","isWritable"],"properties":{"isSigner":{"type":"boolean","description":"Is the account a signer?","isRequired":true,"uniqueKey":"swapInstruction.accounts.items.[INDEX].isSigner","typeLabel":"boolean"},"isWritable":{"type":"boolean","description":"Is the account writable?","isRequired":true,"uniqueKey":"swapInstruction.accounts.items.[INDEX].isWritable","typeLabel":"boolean"},"pubkey":{"type":"string","description":"Pubkey of the account","isRequired":true,"uniqueKey":"swapInstruction.accounts.items.[INDEX].pubkey","typeLabel":"string"}},"uniqueKey":"swapInstruction.accounts.items.[INDEX]","typeLabel":"object"},"description":"Metadata describing accounts that should be passed to the program.","isRequired":true,"uniqueKey":"swapInstruction.accounts","typeLabel":"object[]"},"data":{"type":"string","description":"Opaque data passed to the program for its own interpretation.","isRequired":true,"uniqueKey":"swapInstruction.data","typeLabel":"string"},"programId":{"type":"string","description":"Pubkey of the program that executes this instruction.","isRequired":true,"uniqueKey":"swapInstruction.programId","typeLabel":"string"}},"description":"The instruction that performs the swap","isRequired":true,"uniqueKey":"swapInstruction","typeLabel":"object"},"transactionVersion":{"type":"string","description":"The wire format these instructions are intended to be assembled into. Echoes the request's\n`transactionVersion` (or its `v0` default).","default":"v0","enum":["v0","v1"],"example":"v0","isRequired":true,"uniqueKey":"transactionVersion","typeLabel":"enum\u003cstring>"},"prioritizationType":{"oneOf":[{"type":"null","uniqueKey":"prioritizationType.oneOf.0","typeLabel":"null"},{"type":"object","description":"Prioritization fee type for the transaction","required":["computeBudget"],"properties":{"computeBudget":{"type":"object","description":"The compute unit price the prioritization fee was derived from, in micro-lamports per\ncompute unit. This reports the rate that was applied; the total the transaction pays is\n`prioritizationFeeLamports`. Under `transactionVersion` `v1` the fee is carried in the\nmessage header rather than in a compute budget instruction, but the rate reported here is\nunchanged.","required":["microLamports"],"properties":{"microLamports":{"type":"integer","format":"int64","description":"Compute unit price assigned to the transaction","minimum":0,"isRequired":true,"uniqueKey":"prioritizationType.oneOf.1.computeBudget.microLamports","typeLabel":"integer\u003cint64>"},"estimatedMicroLamports":{"oneOf":[{"type":"integer","format":"int64","description":"Compute unit price estimated by the server for the transaction. Present only when the\nfee was determined by the server from a priority level.","minimum":0,"uniqueKey":"prioritizationType.oneOf.1.computeBudget.estimatedMicroLamports.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Compute unit price estimated by the server for the transaction. Present only when the\nfee was determined by the server from a priority level.","minimum":0,"uniqueKey":"prioritizationType.oneOf.1.computeBudget.estimatedMicroLamports.oneOf.1","typeLabel":"null"}],"uniqueKey":"prioritizationType.oneOf.1.computeBudget.estimatedMicroLamports","typeLabel":"integer\u003cint64> | null"}},"isRequired":true,"uniqueKey":"prioritizationType.oneOf.1.computeBudget","typeLabel":"object"}},"uniqueKey":"prioritizationType.oneOf.1","typeLabel":"object"}],"uniqueKey":"prioritizationType","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"addressLookupTableAddresses":["\u003cstring>"],"blockhashWithMetadata":{"blockhash":"\u003cstring>","lastValidBlockHeight":1},"cleanupInstructions":[{"accounts":[{"isSigner":true,"isWritable":true,"pubkey":"\u003cstring>"}],"data":"\u003cstring>","programId":"\u003cstring>"}],"computeBudgetInstructions":[{"accounts":[{"isSigner":true,"isWritable":true,"pubkey":"\u003cstring>"}],"data":"\u003cstring>","programId":"\u003cstring>"}],"computeUnitLimit":1,"loadedAccountsDataSizeLimit":1,"otherInstructions":[{"accounts":[{"isSigner":true,"isWritable":true,"pubkey":"\u003cstring>"}],"data":"\u003cstring>","programId":"\u003cstring>"}],"prioritizationFeeLamports":1,"setupInstructions":[{"accounts":[{"isSigner":true,"isWritable":true,"pubkey":"\u003cstring>"}],"data":"\u003cstring>","programId":"\u003cstring>"}],"swapInstruction":{"accounts":[{"isSigner":true,"isWritable":true,"pubkey":"\u003cstring>"}],"data":"\u003cstring>","programId":"\u003cstring>"},"transactionVersion":"v0","prioritizationType":{"computeBudget":{"microLamports":1,"estimatedMicroLamports":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"ab0a90f6-0281-4e1d-890c-45b6cd01e62b":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","required":["msg","code"],"properties":{"code":{"type":"string","enum":["invalid_out_amount","invalid_user_public_key","invalid_sponsor","sponsored_swap_cannot_create_fee_account","invalid_platform_fee_amount","invalid_fee_account","invalid_positive_slippage_fee_account","invalid_referral_account","invalid_destination_token_account","invalid_destination_token_account_for_native_sol","invalid_output_close_authority","output_close_authority_with_native_sol_output","output_close_authority_with_destination_token_account","both_priority_fee_params_specified","route_is_empty","route_too_long","invalid_route_plan_leg","invalid_jito_sandwich_mitigation_account","skip_pumpfun_cashback_claim_with_sponsor_executor"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"msg":{"type":"string","isRequired":true,"uniqueKey":"msg","typeLabel":"string"}},"example":{"code":"\u003cenum\u003cstring>>","msg":"\u003cstring>"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cenum\u003cstring>>","msg":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"4075a94f-297e-4698-9bf3-b0b32f44775e":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["msg","code"],"properties":{"code":{"type":"string","enum":["failed_to_compute_swap"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"msg":{"type":"string","isRequired":true,"uniqueKey":"msg","typeLabel":"string"}},"example":{"code":"\u003cenum\u003cstring>>","msg":"\u003cstring>"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cenum\u003cstring>>","msg":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"d980718e-6533-4bbe-80d6-86dd303cb1c3":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Apply for one at https://pond.dflow.net/get-started/api-key","scopes":[],"schemeName":"api_key"}}},"servers":{"7c51790d-17f5-4b09-87f4-c571f10568d7":{"url":"https://quote-api.dflow.net"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Apply for one at https://pond.dflow.net/get-started/api-key","scopes":[],"schemeName":"api_key"},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. Apply for one at https://pond.dflow.net/get-started/api-key","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api_key","name":"x-api-key"}],"title":"api_key"}]},"originalFileLocation":"resources/trading-api/openapi.json"},"subdomain":"dflow","siteName":"DFlow","title":"Create Swap Instructions - DFlow","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T03:07:51.567Z","originalFileLocation":"resources/trading-api/imperative/swap-instructions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"API reference for POST /swap-instructions\">\u003cmeta data-mint-head name=\"application-name\" content=\"DFlow\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Swap Instructions - DFlow\">\u003cmeta data-mint-head property=\"og:description\" content=\"API reference for POST /swap-instructions\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DFlow\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dflow.mintlify.site/_mintlify/api/og/v2?division=Imperative\u0026amp;title=Create+Swap+Instructions\u0026amp;description=API+reference+for+POST+%2Fswap-instructions\u0026amp;theme=213738a51c7d36035a56e1e9\u0026amp;signature=340302cc59ed52ca718ea3f122375537ea7dd504a54f11dd23df62ef3a7f204c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Swap Instructions - DFlow\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"API reference for POST /swap-instructions\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dflow.mintlify.site/_mintlify/api/og/v2?division=Imperative\u0026amp;title=Create+Swap+Instructions\u0026amp;description=API+reference+for+POST+%2Fswap-instructions\u0026amp;theme=213738a51c7d36035a56e1e9\u0026amp;signature=340302cc59ed52ca718ea3f122375537ea7dd504a54f11dd23df62ef3a7f204c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dflow/gsI0Z5L-guTs_yJ-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DFlow\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#66C5F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/resources/trading-api/imperative/swap-instructions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://pond.dflow.net/#organization\",\"name\":\"DFlow\",\"url\":\"https://pond.dflow.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dflow/jwrydRAutpN7INlu/logo/light.svg?fit=max\u0026auto=format\u0026n=jwrydRAutpN7INlu\u0026q=85\u0026s=c43797960e32b9d8dcacbe70491ad64f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://pond.dflow.net#website\",\"name\":\"DFlow\",\"url\":\"https://pond.dflow.net\",\"publisher\":{\"@id\":\"https://pond.dflow.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions#webpage\",\"url\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions\",\"name\":\"Create Swap Instructions\",\"description\":\"API reference for POST /swap-instructions\",\"dateModified\":\"2026-09-15T03:07:51.567Z\",\"isPartOf\":{\"@id\":\"https://pond.dflow.net#website\"},\"breadcrumb\":{\"@id\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trading API\",\"item\":\"https://pond.dflow.net/resources/trading-api/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Imperative\",\"item\":\"https://pond.dflow.net/resources/trading-api/imperative/quote\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Swap Instructions\",\"item\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions#apireference\",\"headline\":\"Create Swap Instructions\",\"name\":\"Create Swap Instructions\",\"description\":\"API reference for POST /swap-instructions\",\"url\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions\",\"mainEntityOfPage\":{\"@id\":\"https://pond.dflow.net/resources/trading-api/imperative/swap-instructions#webpage\"},\"dateModified\":\"2026-09-15T03:07:51.567Z\",\"publisher\":{\"@id\":\"https://pond.dflow.net/#organization\"},\"isPartOf\":{\"@id\":\"https://pond.dflow.net#website\"}}]}\u003c/script>","agentPointerHref":"/resources/trading-api/imperative/swap-instructions.md","siteName":"DFlow","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/introduction"}]},{"tab":"Get Started","pages":[{"title":"Get Started","href":"/get-started/what-is-dflow"}]},{"tab":"Spot Trading","pages":[{"title":"Spot Trading","href":"/spot/introduction"}]},{"tab":"Proof","pages":[{"title":"Proof","href":"/proof/introduction"}]},{"tab":"AI","pages":[{"title":"AI","href":"/ai/introduction"}]},{"tab":"APIs","pages":[{"title":"Introduction","sidebarTitle":"Introduction","href":"/resources/introduction"},{"title":"Request Signing","href":"/resources/request-signing"},{"group":"Troubleshooting","pages":[{"title":"Dev Notifications","sidebarTitle":"Dev Notifications","href":"/resources/dev-notifications"},{"title":"FAQs","href":"/resources/faqs"},{"title":"Error Codes","href":"/resources/error-codes"}]},{"group":"Trading API","expanded":false,"pages":[{"title":"Introduction","href":"/resources/trading-api/introduction"},{"group":"Order","pages":[{"title":"Get Order","openapi":"GET /order","href":"/resources/trading-api/order/order"},{"title":"Get Order Status","openapi":"GET /order-status","href":"/resources/trading-api/order/order-status"}]},{"group":"Imperative","pages":[{"title":"Get Quote","openapi":"GET /quote","href":"/resources/trading-api/imperative/quote"},{"title":"Create Swap","description":"API reference for POST /swap","openapi":"POST /swap","href":"/resources/trading-api/imperative/swap"},{"title":"Create Swap Instructions","openapi":"POST /swap-instructions","href":"/resources/trading-api/imperative/swap-instructions"}]},{"group":"Priority Fees","pages":[{"title":"Get Priority Fees","description":"API reference for GET /priority-fees","openapi":"GET /priority-fees","href":"/resources/trading-api/priority-fees/priority-fees"}]},{"group":"Tokens","pages":[{"title":"Get Token List","openapi":"GET /tokens","href":"/resources/trading-api/token/tokens"},{"title":"Get Token List with Decimals","openapi":"GET /tokens-with-decimals","href":"/resources/trading-api/token/tokens-with-decimals"}]},{"group":"Venues","pages":[{"title":"Get Venue List","openapi":"GET /venues","href":"/resources/trading-api/venues/venues"}]},{"group":"Websockets","pages":[{"title":"Websockets Overview","href":"/resources/trading-api/websockets/overview"},{"title":"Quote Stream","href":"/resources/trading-api/websockets/quote-stream"},{"title":"Book Stream","href":"/resources/trading-api/websockets/book-stream"},{"title":"Priority Fees Stream","href":"/resources/trading-api/websockets/priority-fees-stream"}]},{"group":"Equities","pages":[{"title":"Get Equities","openapi":"GET /equities","href":"/resources/trading-api/equities/equities"}]}]},{"group":"Equities Submit API","expanded":false,"pages":[{"title":"Submit Transaction","openapi":"resources/equities-submit-api/openapi.json POST /submit-transaction","href":"/resources/equities-submit-api/submit-transaction"}]},{"group":"Proof API","expanded":false,"pages":[{"title":"Verify Address","openapi":"GET /verify/{address}","href":"/resources/proof-api/verify-address"}]}]}]},"basePath":"","title":"Create Swap Instructions - DFlow","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-Dlc3Qr3h.js","dist-D2J8knkn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-Dq9TQuNi.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","AssistantPageLink-BgZ2ThuU.js"]}