---
title: "Advanced swap"
method: POST
path: "/v1/wallets/{wallet_id}/experimental/solana/advanced-swap"
tags: ["Wallet Actions"]
---

# Advanced swap

`POST /v1/wallets/{wallet_id}/experimental/solana/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.

## Path parameters

- `wallet_id` string, required — ID of the wallet.

## Headers

- `privy-app-id` string, required — ID of your Privy app.
- `privy-authorization-signature` string — Request authorization signature. If multiple signatures are required, they should be comma separated.

## Request body

- AdvancedSwapRequestBody — Request body for initiating a synchronous Solana token swap through an embedded wallet.
  - `amount` string, required — Amount in the smallest unit of the input token (e.g. lamports for SOL).
  - `caip2` string — CAIP-2 chain identifier. Defaults to Solana mainnet.
  - `dry_run` boolean — When true, skip transaction submission (quote + sign only). The signed transaction is still returned.
  - `fee_recipient` string — Token account (base58) to receive the platform fee. Must exist on-chain for the output token.
  - `input_token` string, required — Input token address (base58 mint address).
  - `output_token` string, required — Output token address (base58 mint address).
  - `platform_fee_bps` integer — Platform fee in basis points, taken from the output token. Requires fee_recipient when > 0.
  - `slippage_bps` union — Max slippage tolerance in basis points (0-10000), or "auto" for provider-determined. Defaults to "auto".
    - integer
    - 'auto'

## Response `200`

Swap executed successfully.

- AdvancedSwapResponse — Response from the synchronous Solana swap endpoint.
  - `in_amount` string, required — Input amount consumed (smallest unit).
  - `input_token` string, required — Input token address (base58).
  - `min_out_amount` string, required — Minimum output amount guaranteed by slippage tolerance (smallest unit).
  - `out_amount` string, required — Expected output amount before slippage (smallest unit).
  - `output_token` string, required — Output token address (base58).
  - `platform_fee` object — Platform fee details, present when a fee was applied.
    - `amount` string, required — Fee amount in the smallest unit of the fee token.
    - `bps` integer, required — Fee in basis points.
    - `token` string, required — Token the fee was taken from (output token in v1).
  - `provider` string, required — Which aggregator fulfilled the swap (e.g. "dflow").
  - `signed_transaction` string, required — Fully signed transaction (base64). Callers can re-submit to any Solana RPC for redundancy.
  - `slippage_bps` integer, 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_hash` string, required — Solana transaction signature (base58).

---

[API](https://skmtc.net/privy-io/apis/privy-api.md) · [All operations](https://skmtc.net/privy-io/apis/privy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privy-io/privy-api/versions/bb2eb34156cc/schema)
