---
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`

## Request

- Base URL: `https://api.privy.io`
- URL: `https://api.privy.io/v1/wallets/{wallet_id}/experimental/solana/advanced-swap`
- Auth: HTTP basic

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

## Response `200`

Swap executed successfully.

- AdvancedSwapResponse: Response from the synchronous Solana swap endpoint.
  - `transaction_hash` string, required: Solana transaction signature (base58).
  - `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.
  - `signed_transaction` string, required: Fully signed transaction (base64). Callers can re-submit to any Solana RPC for redundancy.
  - `provider` string, required: Which aggregator fulfilled the swap (e.g. "dflow").
  - `input_token` string, required: Input token address (base58).
  - `output_token` string, required: Output token address (base58).
  - `in_amount` string, required: Input amount consumed (smallest unit).
  - `out_amount` string, required: Expected output amount before slippage (smallest unit).
  - `min_out_amount` string, required: Minimum output amount guaranteed by slippage tolerance (smallest unit).
  - `slippage_bps` integer, required: Slippage applied in basis points. Reflects the resolved value if "auto" was requested.
  - `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).

## Changes

- **2026-06-16** `8f9eb26a2248`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/privy-io/apis/privy-api/changes/v1/wallets/:wallet_id/experimental/solana/advanced-swap/post.md)

---

[API](https://skmtc.dev/privy-io/apis/privy-api.md) - [All operations](https://skmtc.dev/privy-io/apis/privy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/privy-io/apis/privy-api/revisions/3a2288470053?raw)
