Coinbase Developer Documentation home page
Search...
⌘K
Ask AI
Get help
Dev portal
Dev portal
Search...
Navigation
EVM Swaps
EVM Swaps
Docs
API Reference
SDKs
CDP API v2
CDP API V2
Introduction
Authentication
Idempotency
Rate Limits
Errors
REST API
EVM Accounts
EVM Smart Accounts
EVM Swaps
Overview
GET
Get a price estimate for a swap
POST
Create a swap quote
EVM Token Balances
Faucets
Onramp
Payments
Alpha
Policy Engine
Solana Accounts
Solana Token Balances
EVM Swaps
EVM Swaps
Copy page
Copy page
A swap refers to the act of exchanging one token for another. The EVM Swap APIs enable you to create and manage swaps. A swap process involves:
A user approves token spending via smart contract.
The smart contract determines the exchange rate and facilitates the swap between the two tokens.
The transaction is completed atomically and the tokens are transferred to the user’s wallet.
The Swap API supports:
Getting a price
: Estimate the amount of tokens you will receive for a given amount of exchanged tokens.
Creating a swap quote
: Return a swap transaction payload that you can use to sign and submit in order to execute the swap.
For the easiest experience creating, signing, and submitting a swap, we recommend using the
CDP SDK
.
Python SDK examples
TypeScript SDK examples
To read more about using the EVM Swap APIs, please see our
Swap API docs
.
Was this page helpful?
Yes
No
Create a spend permission
Previous
Get a price estimate for a swap
Next
Assistant
Responses are generated using AI and may contain mistakes.