Build Swap

Solana API endpoint for building token swaps. Build and return unsigned transactions for direct swaps on DEXs like Pump.fun, Raydium and more.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request payload model for swap proxy params parameters used by this API endpoint.

string
required

Typed Solana public key identifier used across request parameters and response fields.

double
required

Amount to swap (in UI units)

boolean | null

Auto-calculate optimal slippage

boolean | null

When true, append closeAccount on input SPL ATA after a full-balance sell.

boolean | null

Ephemeral WSOL path on sell: create WSOL ATA, sync native, then close.

boolean | null

Create output SPL ATA idempotently before swap (buy when wallet has no output ATA).

boolean | null

When true, ix-builder attaches print-ready enrichment (simulation, fees, USD, retention %)
on POST /v4/trading/swap responses. Forwarded verbatim to ix-builder; ignored by aggregators.

boolean | null

Build multiple route candidates (up to 10). Default on; set false to stop at first success.

boolean | null

Use Vybe fee payer for gas

string | null

Exact input balance from wallet token-balance (UI units); used with closeInputAta.

int32 | null
≥ 0

Input token decimals when paired with inputBalanceExact (optional; on-chain fetch otherwise).

string
required

Typed Solana public key identifier used across request parameters and response fields.

int32 | null
≥ 0

Input mint decimals from client cache.

double | null

Client USD price for the input mint (skips backend price fetch when set).

double | null

Known USD pool liquidity from market discovery; forwarded to ix-builder as a hint for pinned swaps and route enrichment.
Accepts legacy marketScore as an alias.

string | null

Market discovery mode for Vybe router: "full" | "trades" | "rpc".

string
required

Typed Solana public key identifier used across request parameters and response fields.

int32 | null
≥ 0

Output mint decimals from client cache.

double | null

Client USD price for the output mint (skips backend price fetch when set).

string | null

Partner identifier for fee routing

string | null

The target liquidity pool address used when executing this swap request.

boolean | null

Caller indicates a post-swap bridge leg is required after the main swap.

boolean | null

Caller indicates a pre-swap bridge leg is required before the main swap.

string | null

Typed Solana public key identifier used across request parameters and response fields.

string | null
enum

The swap protocol identifier used to route and execute this trade request.

string

Quote-bridge metadata for multi-hop routes (ix-builder).

string
enum

Enumeration of supported swap proxy router values used by this API model.

Allowed:
boolean | null

Simulate transaction without building

double | null

Slippage tolerance in percentage (default: 0.5)

double | null

Client USD SOL price when neither leg is SOL/WSOL (fee/rent USD).

string | null

Discovery source for pinned pool (trades, markets, rpc, …).

double | null

Service fee percentage (e.g., 1 for 1%)

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json