Skip to main content
See an introduction including the list of supported providers on the swap feature page.
Swap providers require a Terms and Conditions acceptance, which can be done programatically using the Agreement endpoints.

Flow Overview

  1. Request a Quote: Retrieve estimated output amounts for a given swap (input token and amount, output token, provider and slippage tolerance).
  2. Submit the swap intent: Submit a request to Swap, based on the quoteId
  3. Approve policies: If using Wallet:Sign policies, review the transactions and approve them, due to the nature of a Swap transaction, you might be required to approve up to 4 signatures/transactions.
  4. Track Status: Monitor the Swap execution.

Swap object

id
string
required

Swap id.

Required string length: 1 - 64
Pattern: ^swap-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"swap-5ch70-fc3n7-3k2cbo8d7q5lnts4"

quoteId
string
required

Id of the quote this swap is based on.

Required string length: 1 - 64
Pattern: ^swapQuote-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"swapQuote-7n9p0-cth75-6l74n2sj7u73ooeq"

reference
string | null
required

Optional user-defined reference for this Swap.

walletId
string
required

Id of the Dfns wallet spending the sourceAsset.

Required string length: 1 - 64
Pattern: ^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"wa-5pfuu-9euek-h0odgb6snva8ph3k"

targetWalletId
string
required

Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the walletId.

Required string length: 1 - 64
Pattern: ^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"wa-5pfuu-9euek-h0odgb6snva8ph3k"

status
enum<string>
required

Swap status.

Available options:
PendingPolicyApproval,
InProgress,
Completed,
Failed,
Rejected
provider
enum<string>
required

Swap provider.

Available options:
UniswapX,
UniswapClassic
quotedSourceAsset
Native Asset · object
required

The source asset for this swap transaction.

quotedTargetAsset
Native Asset · object
required

The target asset for this swap transaction.

slippageBps
number
required

The slippage tolerance for this trade in basis point (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%.

dateCreated
string<date-time>
required

ISO 8601 date (must be UTC). When the swap was initiated.

requestBody
object
required

The full request used for initiating this swap.

requester
object
required

The user who initiated the request.

Last modified on February 6, 2026