Skip to main content
Execute a swap using the swap endpoint. Privy automates token approvals and transaction submission. The response is a wallet action that starts in pending status and can be polled for confirmation.
View the full API reference for the swap endpoint.

Usage

To execute a swap, make a POST request to:
Wallets with explicit owners or signers must provide an authorization signature as a request header.
Use privy.wallets().swaps().execute() to execute a swap from a wallet.
The method returns a SwapActionResponse with the pending wallet action. See wallet action lifecycle to track the status.