Create Swap
Body
The response from the quote endpoint
Base58-encoded address of the swapper's wallet
Compute unit price in micro-lamports. Mutually exclusive with prioritizationFeeLamports
.
x >= 0
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.
Base58-encoded address of the token account that will receive the output token. If not provided, the user's associated token account for the output mint will be used. If provided, the account must already be initialized.
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.
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.
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
- objectpriorityLevel
- string, eithermedium
,high
, orveryHigh
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.
If false, the transaction will use wrapped SOL. This will be ignored if the output token is
SOL and destination_token_account
is specified, as the swap signer might not have
authority to close the destination token account.
Response
Compute unit limit assigned to the transaction
x >= 0
The last block height at which the transaction is valid
x >= 0
Prioritization fee in lamports
x >= 0
Base64-encoded swap transaction. The user must sign before sending it to Solana.
Prioritization fee type for the transaction