IBExWalletAPI
Blockchain Operations

Swap Tokens

Execute token swaps via CowSwap or 1inch from a Safe wallet.

Swap tokens from a Safe wallet using decentralized exchange aggregators (CowSwap, 1inch).

Uses the two-step POST /v1.2/safes/operations → PUT /v1.2/safes/operations flow.

Operation Schema

{
  "type": "SWAP_FROM_QUOTE",
  "quoteId": "...",
  "slippage": 0.5
}
FieldTypeRequiredDescription
typestringYesMust be "SWAP_FROM_QUOTE"
quoteIdstringYesQuote ID obtained from GET /v1.2/safes/quote
slippagenumberNoSlippage tolerance in percent (default: 0.5)

Flow

  1. Get a quote — GET /v1.2/safes/quote?from=0x...&to=0x...&amount=1.0
  2. Execute the swap — Use the quoteId from the quote response in a SWAP_FROM_QUOTE operation

On this page