Skip to main content
POST
Build swap transaction (base input)

Body

application/json
wallet
string
required

Signer wallet address (base58).

Example:

"11111111111111111111111111111111"

swapResponse
object
required

The complete response object from the compute endpoint.

txVersion
enum<string>
required

Solana transaction version.

Available options:
V0,
LEGACY
Example:

"V0"

computeUnitPriceMicroLamports
string
required

Compute unit price in micro-lamports (for priority fees).

Example:

"1000"

wrapSol
boolean

Whether to wrap SOL if the input is native SOL.

Example:

false

unwrapSol
boolean

Whether to unwrap WSOL to SOL in the output.

Example:

false

inputAccount
string

Optional token account address for input. Required if not wrapping SOL.

Example:

"TokenAccount1111111111111111111111111111111111"

outputAccount
string

Optional token account address for output.

Example:

"TokenAccount2222222222222222222222222222222222"

jitoInfo
object

Optional Jito bundle params for MEV protection.

referrerWallet
string

Optional referrer wallet address for fee collection.

Example:

"ReferrerWallet1111111111111111111111111111111111"

Response

Serialized transaction built successfully.

id
string

Unique request identifier.

Example:

"550e8400-e29b-41d4-a716-446655440000"

success
boolean

Whether transaction building succeeded.

Example:

true

version
string
Example:

"V1"

data
object

Transaction data.