Ethereum swap
Request an executable Ethereum quote. Set execution: "czr-router" to require the CZR Trade Router for ETH or USDC input.
Developer docs
Integrate Ethereum swaps, native Bitcoin routes, and USDC bridge tracking in your wallet or app.
Request an executable Ethereum quote. Set execution: "czr-router" to require the CZR Trade Router for ETH or USDC input.
Native Bitcoin estimates are available in both directions. The API also returns 0x-direct Ethereum-origin transactions when route checks pass. The web Swap token picker offers WBTC on Ethereum.
Estimates and supported provider tracking for Ethereum, Base, and Arbitrum One. CZR bridge execution is pending.
The Buy and Sell order forms are available for review. Checkout is pending provider activation. The API returns 501 PRODUCT_UNAVAILABLE.
curl https://czrtrade.com/api/v2/capabilitiesUse the signing wallet as taker. Amounts are integer strings in token base units. This router-only example requests 10 USDC → ETH using the API defaults for the assets.
curl https://czrtrade.com/api/v2/quote \
-H 'Content-Type: application/json' \
--data '{
"product": "same-chain",
"chainId": 1,
"taker": "0xYOUR_ETHEREUM_ADDRESS",
"sellAmount": "10000000",
"execution": "czr-router"
}'
taker when using smart-wallet execution.curl -G https://czrtrade.com/api/v2/status \
--data-urlencode 'product=same-chain' \
--data-urlencode 'hash=YOUR_ETHEREUM_TRANSACTION_HASH'
Set feeToken to the sell token address when checking a direct-route treasury transfer. An Ethereum transaction without a receipt returns HTTP 202.
The Ethereum pilot uses the CZR Trade Router with ETH or USDC inputs. Your integration server sends Authorization: Bearer … and X-CZR-Partner with every request. Keep the bearer token in your backend secret store.
POST /api/v2/partner/quotes with taker, sellToken, buyToken, and sellAmount in base units. Optional fields include chainId: 1 and slippagePpm. The response includes a unique quoteId and the wallet transaction.{"transactionHash":"0x…"} to POST /api/v2/partner/settlements/{quoteId}. If Ethereum has not indexed the transaction, retry the same request after the Retry-After interval.GET /api/v2/partner/settlements/{quoteId} until terminal. The ledger verifies the transaction against the recorded quote, waits for Ethereum finality, and compares the observed treasury transfer with the quoted fee.settled means the treasury transfer was verified. submitted, confirming, and verification_pending remain in progress. reverted, fee_mismatch, and receipt_mismatch require review. expired applies to a quote without a submitted transaction.
CZR Trade provisions each partner’s ID and bearer token separately. Use GET /api/v2/partner/profile to verify your credentials and read your network, router, fee, eligible sell assets, and settlement capabilities before requesting a quote.
For retry-safe quote requests, send an Idempotency-Key of 8–96 letters, digits, dots, underscores, or hyphens. Repeating the same key and parameters returns the original unexpired quote with Idempotency-Replayed: true. A different payload or an expired quote returns HTTP 409. Generate a new key for a new trade or a fresh quote.
Export up to 250 recent records owned by your partner with GET /api/v2/partner/settlements/export. Use state=settled to report verified settlements only. Fee and token amounts are integer strings in base units.
During a credential rotation, CZR Trade can keep the outgoing and replacement credentials active together. Confirm the replacement with the profile endpoint before retiring the outgoing credential.
Use GET /api/v2/partner/settlements?limit=20 for your partner's ledger. Pass the returned nextCursor as cursor to get the next page. The pilot currently reconciles direct transactions from the quoted sender to the router.
The CZR Trade settlement dashboard shows settlement states, observed fees, and delivery status for CZRS. It requires a separate read-only access key. Export up to 250 recent settlement records per status filter as CSV.
Final settlement states enqueue one event per quote. Event types are settlement.settled, settlement.reverted, settlement.fee_mismatch, and settlement.receipt_mismatch. The JSON body includes id, type, createdAt, and the settlement record in data.
Verify CZR-Signature before processing. Compute HMAC-SHA256 over the UTF-8 string timestamp + "." + rawBody with the shared signing secret, and compare its hexadecimal digest with the v1= value using a constant-time comparison. Reject timestamps more than five minutes from the receiver clock. Deduplicate by the signed id and return a 2xx response after accepting the event.
Failures retry with exponential backoff starting at one minute and stop after eight attempts. A receiver can see the same event more than once. POST /api/v2/partner/webhooks/dispatch processes due work when called by an authenticated CZRS backend scheduler. Settlement polling also attempts pending delivery when the receiver is configured.
Set product to bitcoin. Pass a mainnet Bitcoin SegWit or Taproot address and an Ethereum mainnet address. BTC source wallets need confirmed UTXOs to cover the sell amount and miner fee.
curl https://czrtrade.com/api/v2/quote \
-H 'Content-Type: application/json' \
--data '{
"product": "bitcoin",
"direction": "btc-to-eth",
"originAddress": "YOUR_BITCOIN_MAINNET_ADDRESS",
"destinationAddress": "0xYOUR_ETHEREUM_ADDRESS",
"sellAmount": "1000000"
}'
curl https://czrtrade.com/api/v2/quote \
-H 'Content-Type: application/json' \
--data '{
"product": "bitcoin",
"direction": "eth-to-btc",
"originAddress": "0xYOUR_ETHEREUM_ADDRESS",
"destinationAddress": "YOUR_BITCOIN_MAINNET_ADDRESS",
"sellAmount": "30000000000000000"
}'
The examples request 0.01 BTC in satoshis and 0.03 ETH in wei. The response includes sellAmount, buyAmount, minBuyAmount, and feeStatus. Use the returned sellAmount when displaying a BTC-origin estimate, since the provider can add a small unspendable remainder to the quoted input.
Estimates omit signing data. For Ethereum → BTC, set sellAsset to ETH, USDC, or USDT and send "execution": "0x-direct" for a fresh wallet quote with transaction, quoteId, and expiresAt (Unix milliseconds). The routes array contains up to three quotes returned by 0x that pass CZR checks. Compare provider, minimum BTC, estimated gas, and bridge fees. Amounts use wei for ETH and six decimal places for USDC and USDT. Review the recipient and fees before signing on Ethereum. Stablecoin routes can require an exact-amount token approval. After broadcast, query /api/v2/status?product=bitcoin&hash=…"eId=…. A bridge_filled result indicates that 0x reports delivery. Open native Bitcoin estimates. BTC → ETH is available as an estimate.
Request native USDC estimates between Ethereum (1), Base (8453), and Arbitrum One (42161). Amounts use six decimals.
curl https://czrtrade.com/api/v2/quote \
-H 'Content-Type: application/json' \
--data '{
"product": "cross-chain",
"originChain": 1,
"destinationChain": 8453,
"originAddress": "0xYOUR_ETHEREUM_ADDRESS",
"sellAmount": "25000000"
}'
For a supported existing bridge transaction, call GET /api/v2/status with product=cross-chain, originChain, hash, and optionally quoteId. Check terminal and recoveryState before treating a failed bridge as final. Open USDC bridge quotes.
0xD1b6a823E59fD6e1b5a849Ae237D85C52b5555Eabc1pyx8vqa2xakj2tharrytl38lvnlkcq8c7825h9tdsl0uku0hxgjvs9kk84ufeeStatus is quoted, below_minimum, or not_returned. The response uses fee: null if no fee was quoted. Estimates move no funds. Network gas, miner fees, and provider charges are separate. USDC bridge treasury fees depend on the configured source network.
The Ethereum router accepts ETH or USDC as input. Eligible routes use czr-router. Other supported Ethereum token sales can use 0x-direct. An explicit router-only request returns an error when the requested route is unsupported or unavailable.
0xfA06A830D7D6009338532927eFE0217aEA8781460x1530dB949Aa228E5641633026e63Ca3Dea0544D5The Safe controls router administration. The signing wallet authorizes every swap.
0x assembles each route from available DEX pools and market makers. Ethereum quotes report venue names in liquiditySources. BTC and USDC estimates report bridgeProviders when 0x identifies them. These are quote-specific venue or bridge names.
Search the Ethereum token catalog or import an ERC-20 by its contract address. The catalog uses CoinGecko metadata. Token balances and decimals are read on Ethereum, and trading requires a supported 0x liquidity route. Open Ethereum Swap.
The CZR USDC bridge router candidate has passed source-side Ethereum fork tests. Production deployment, destination minting verification, and the Bitcoin execution adapter are pending.
Use the JavaScript module and TypeScript declarations in your integration. Web clients on other origins use their own backend proxy for quotes. Native apps supply their wallet provider.
import { createCZRTradeClient } from './czr-trade-sdk.mjs';
const trade = createCZRTradeClient();
const { capabilities } = await trade.capabilities();
Use watchInjectedWallets for browser providers and connectCZRWallet after wallet selection. QR and app-to-app sessions require a WalletConnect integration.
The CZR Trade widget displays indicative Ethereum rates and links to the live swap. Keep the Powered by CZR Trade attribution visible in embedded layouts.
GET/api/v2/capabilitiesRead supported networks, execution modes, configured fee recipients, and the Ethereum token catalog URL. See service readiness for point-in-time infrastructure checks. Connect supports detected EIP-6963 and compatible injected browser wallets.
POST/api/v2/quoteRequest an Ethereum transaction quote, a USDC bridge estimate, or native Bitcoin routes. The widget quotes ETH, USDC, USDT, and WBTC on Ethereum. Wallet signing takes place on Swap. The embed URL accepts pay, receive, and amount.
GET/api/v2/statusRead an Ethereum receipt or track a supported USDC bridge transaction. Use the Bitcoin product with the Ethereum transaction hash and quote ID to track ETH → BTC delivery.
Download OpenAPI JSON. Existing v1 endpoints remain available, including GET /api/v1/network, POST /api/v1/quote, GET /api/v1/receipt, and GET /api/v1/bridge/estimate.
Public quotes use mainnet data. The wallet authorizes and broadcasts transactions. Handle error.code and error.message, respect Retry-After on HTTP 429, and refresh expired Ethereum quotes before signing. Pass optional slippagePpm (0–50000) for same-chain quotes. For example, 5000 is 0.50%.
Integrate fiat only after an approved payment provider, launch markets, and sandbox checkout and webhooks have been validated.