Skip to main content
The App Kit SDK includes the Swap capability that lets you swap two tokens in a few lines of code. Swap supports many stablecoins (including USDC, EURC, USDT, USDe, DAI, and PYUSD) and native tokens on supported blockchains. On Arc, Swap accepts only USDC, EURC, and cirBTC. Swap is available on mainnet only, with the exception of Arc testnet.

Quick look

This example swaps 1 USDC for EURC on Arc Testnet:
TypeScript
See Swap tokens on a blockchain for a full working example.

API key

Swap accepts an optional Circle API key obtained from the Circle Console. Pass one as apiKey in the swap config. Without one, requests share a rate limit. Production traffic typically needs a key to avoid hitting it. API keys are environment specific. Testnet and mainnet each need their own key.
Moving from a kit key? Kit keys are legacy, and new ones cannot be created. Existing kit keys remain valid, but new integrations use an API key. Rename the kitKey parameter in your swap config to apiKey when you upgrade the SDK.

Installation

Install the App Kit SDK to use Swap. If you only need to swap and don’t want to install the full App Kit SDK, install the standalone Swap Kit for your preferred adapter below.