userPublicKey string — REQUIRED |
wrapAndUnwrapSol booleanDefault: true - To automatically wrap/unwrap SOL in the transaction
- If false, it will use wSOL token account
- Parameter will be ignored if
destinationTokenAccount is set because the destinationTokenAccount may belong to a different user that we have no authority to close
|
useSharedAccounts booleanDefault: true - This enables the usage of shared program accounts, this is essential as complex routing will require multiple intermediate token accounts which the user might not have
- If true, you do not need to handle the creation of intermediate token accounts for the user.
|
feeAccount string- An Associated Token Address (ATA) of specific mints depending on
SwapMode to collect fees - You no longer need the Referral Program
- See Add Fees guide for more details
|
trackingAccount string- Specify any public key that belongs to you to track the transactions
- Useful for integrators to get all the swap transactions from this public key
- Query the data using a block explorer like Solscan/SolanaFM or query like Dune/Flipside
|
prioritizationFeeLamports object- To specify a level or amount of additional fees to prioritize the transaction
- It can be used for EITHER priority fee OR Jito tip
- If you want to include both, you will need to use
/swap-instructions to add both at the same time
priorityLevelWithMaxLamports objectpriorityLevel stringEither medium , high or veryHigh | maxLamports integerMaximum lamports to cap the priority fee estimation, to prevent overpaying |
| jitoTipLamports integer- Exact amount of tip to use in a tip instruction
- Estimate how much to set using Jito tip percentiles endpoint
- It has to be used together with a connection to a Jito RPC
- See their docs
|
|
asLegacyTransaction booleanDefault: false - Request a legacy transaction rather than the default versioned transaction
- Used together with
asLegacyTransaction in /quote, otherwise the transaction might be too large
|
destinationTokenAccount string- Public key of a token account that will be used to receive the token out of the swap
- If not provided, the signer's ATA will be used
- If provided, we assume that the token account is already initialized
|
dynamicComputeUnitLimit booleanDefault: false - When enabled, it will do a swap simulation to get the compute unit used and set it in ComputeBudget's compute unit limit
- This will increase latency slightly since there will be one extra RPC call to simulate this
- This can be useful to estimate compute unit correctly and reduce priority fees needed or have higher chance to be included in a block
|
skipUserAccountsRpcCalls booleanDefault: false - When enabled, it will not do any additional RPC calls to check on user's accounts
- Enable it only when you already setup all the accounts needed for the trasaction, like wrapping or unwrapping sol, or destination account is already created
|
dynamicSlippage booleanDefault: false - When enabled, it estimate slippage and apply it in the swap transaction directly, overwriting the
slippageBps parameter in the quote response. - See notes for more information
|
computeUnitPriceMicroLamports integer- To specify a compute unit price to calculate priority fee
computeUnitLimit (1400000) * computeUnitPriceMicroLamports - We recommend using
prioritizationFeeLamports and dynamicComputeUnitLimit instead of passing in a compute unit price
|
quoteResponse object — REQUIREDinputMint string — REQUIRED | inAmount string — REQUIRED | outputMint string — REQUIRED | outAmount string — REQUIRED- Calculated output amount from routing algorithm
- Exlcuding network fees, slippage or platform fees
| otherAmountThreshold string — REQUIRED- Calculated minimum output amount after accounting for
slippageBps and platformFeeBps - Not used by build transaction
| swapMode string — REQUIREDPossible values: [ExactIn , ExactOut ] | slippageBps int32 — REQUIRED | platformFee objectamount string | feeBps int32 |
| priceImpactPct string — REQUIRED | routePlan object[] — REQUIREDswapInfo object — REQUIREDammKey string — REQUIRED | label string | inputMint string — REQUIRED | outputMint string — REQUIRED | inAmount string — REQUIRED | outAmount string — REQUIRED | feeAmount string — REQUIRED | feeMint string — REQUIRED |
| percent int32 — REQUIRED |
| contextSlot number | timeTaken numberTime taken to determine quote |
|