Skip to main content
POST
Build swap transaction

Headers

Authorization
string

Optional API key: Bearer vulcx_.... Anonymous calls are allowed but capped at a small per-IP rate limit — see Rate limits.

Example:

"Bearer vulcx_..."

Body

application/json

Parameters for building a swap transaction.

userWallet
string
required

User's wallet address that will sign and execute the transaction.

Example:

"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

inputMint
string
required

Input token mint address.

Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required

Output token mint address.

Example:

"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG"

amount
string
required

Amount in smallest token units.

Example:

"1000000000"

swapMode
enum<string>
required

ExactIn: amount is exact input. ExactOut: amount is exact desired output.

Available options:
ExactIn,
ExactOut
Example:

"ExactIn"

slippageBps
integer
default:50

Slippage tolerance in basis points. Default: 50 (0.5%).

Example:

50

skipSimulation
boolean
default:false

Skip transaction simulation. Faster but no pre-flight validation. Default: false.

Example:

false

quoteId
string

Optional firm-quote ID from GET /quote (or a WebSocket quote push). Pair, amount, and swapMode must match the original quote. The exact quoted route is replayed and min-out anchors to the quoted price instead of a fresh re-quote.

Example:

"q_b15372a8d82a93d1e328ae24e5d3669a"

firm
boolean

Firm (price-or-fail) redemption — requires quoteId and only works within the quote's firmForMs window. Slippage collapses to the server's firm margin (default 10 bps) around the quoted price; slippageBps is ignored. If the route drifted past the margin the request fails with 409 instead of executing at a worse price.

Example:

false

referrer
string

Optional referrer wallet (base58). Receives integratorFeeBps in full, paid on-chain in the output token in the same transaction as the swap. Required whenever integratorFeeBps is set.

Example:

"EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP"

integratorFeeBps
integer

Your own fee rate in basis points of the output, kept by you in full. Requires referrer — a rate with no wallet to pay it to returns 400. Added to platformFeeBps, not carved out of it; the sum may not exceed 100 bps.

Required range: 0 <= x <= 100
Example:

20

Response

Swap transaction built successfully.

success
boolean
Example:

true

data
object

Unsigned swap transaction and execution details.

Last modified on August 31, 2026