v1

latestOpenAPI 3.1.02026-07-228799577.7 KB

Build swap transaction

Build a complete swap transaction from a quote

post/swap

Request body

userPublicKeystring required

User's wallet public key

wrapUnwrapSolboolean

Automatically wrap/unwrap SOL

txVersion'legacy' | 'v0'

Transaction version

computeUnitPriceMicroLamportsinteger

Priority fee in microlamports

computeUnitLimitinteger

Compute unit limit

priorityFeestring

Priority fee mode or microlamports

maxPriorityFeeinteger

Maximum priority fee cap

tipAccountstring

Tip account pubkey

tipLamportsinteger

Tip amount in lamports

feeAccountstring

Platform fee recipient

feeBpsinteger

Platform fee in basis points

feeFromInputboolean

Take fee from input

chargeBpsinteger

Extra charge on positive slippage

Response

Successful transaction build

swapTransactionstring required

Base64-encoded transaction

lastValidBlockHeightinteger required

Block height until transaction is valid

contextSlotinteger required

Solana slot when built

prioritizationFeeLamportsinteger required

Priority fee included