Overview

The Server Wallet provides a convenient way to execute swaps using CDP EVM accounts. This feature combines the core Trade APIs (which handle price discovery and quote creation) with the Server Wallet’s ability to sign and broadcast transactions.
For detailed information about the core Trade APIs (price discovery and quote creation), see the Trade APIs documentation.
The Trade API currently supports Ethereum and Base mainnet networks only. Additional network support will be added in future updates.

Prerequisites

It is assumed you have already completed the Server Wallet Quickstart guide and have a CDP account ready to use.

Using CDP Accounts

When using CDP EVM Accounts, we offer two options for submitting swaps:
  1. All-in-one swap (recommended): Submit a swap in one call
  2. Quote, then swap (advanced): Create a quote first, then execute the swap. This is useful for detailed swap inspection or custom logic.
These actions may reserve funds onchain, and are strictly rate-limited.

Code Examples

For complete code examples showing how to execute swaps with both regular accounts (EOAs) and Smart Accounts using CDP Wallets, see the Trade API Quickstart guide:
  • Regular Accounts (EOAs) - Price estimation, creating quotes, and executing swaps with standard accounts
  • Smart Accounts - Leveraging ERC-4337 features like gas sponsorship and batch operations
The quickstart guide includes examples in both TypeScript and Python, along with links to full implementations on GitHub.