v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211591,0051.4 MB
Wallet Actions

Advanced swap

Execute a synchronous Solana token swap: fetch a quote, sign via the enclave, submit to Jito, and return the signed transaction and quote details — all in a single request.

post/v1/wallets/{wallet_id}/experimental/solana/advanced-swap

Path parameters

wallet_idstring required

ID of the wallet.

Headers

privy-app-idstring required

ID of your Privy app.

privy-authorization-signaturestring

Request authorization signature. If multiple signatures are required, they should be comma separated.

Request body

amountstring required

Amount in the smallest unit of the input token (e.g. lamports for SOL).

caip2string

CAIP-2 chain identifier. Defaults to Solana mainnet.

dry_runboolean

When true, skip transaction submission (quote + sign only). The signed transaction is still returned.

fee_recipientstring

Token account (base58) to receive the platform fee. Must exist on-chain for the output token.

input_tokenstring required

Input token address (base58 mint address).

output_tokenstring required

Output token address (base58 mint address).

platform_fee_bpsinteger

Platform fee in basis points, taken from the output token. Requires fee_recipient when > 0.

Example request

{
  "amount": "1000000000",
  "caip2": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
  "fee_recipient": "FeeAcct...",
  "input_token": "So11111111111111111111111111111111111111112",
  "output_token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "platform_fee_bps": 100,
  "slippage_bps": 50
}

Response

Swap executed successfully.

in_amountstring required

Input amount consumed (smallest unit).

input_tokenstring required

Input token address (base58).

min_out_amountstring required

Minimum output amount guaranteed by slippage tolerance (smallest unit).

out_amountstring required

Expected output amount before slippage (smallest unit).

output_tokenstring required

Output token address (base58).

providerstring required

Which aggregator fulfilled the swap (e.g. "dflow").

signed_transactionstring required

Fully signed transaction (base64). Callers can re-submit to any Solana RPC for redundancy.

slippage_bpsinteger required

Slippage applied in basis points. Reflects the resolved value if "auto" was requested.

submission_status'accepted' | 'rejected' | 'skipped' required

"accepted" if the network has acknowledged the transaction, "rejected" if the network refused it, "skipped" if dry_run was set. Not an onchain confirmation.

transaction_hashstring required

Solana transaction signature (base58).

Example response

{
  "in_amount": "1000000000",
  "input_token": "So11111111111111111111111111111111111111112",
  "min_out_amount": "172632500",
  "out_amount": "173500000",
  "output_token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "platform_fee": {
    "amount": "1735000",
    "bps": 100,
    "token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  },
  "provider": "dflow",
  "signed_transaction": "AQAAAA...base64...",
  "slippage_bps": 50,
  "submission_status": "accepted",
  "transaction_hash": "5K4f...base58sig"
}