Overview
Standard swaps route through a single centralized exchange (CEX) for fast execution. In API v2, all swap types — standard, private, and DEX — share the same/quotes and /exchanges endpoints. Pass types=standard to get only standard quotes, or filter the response by type: "standard". Tokens are identified by their ID (not symbol), and orders are created by passing a quoteId.
Best For: Users who prioritize speed and want the fastest completion times (typically 3-30 minutes) with straightforward single-hop routing.
Looking for the v1 standard swap guide? See API v1 — Standard Swap.
How It Works
Get Tokens
Bulk fetch CEX-supported tokens and cache to your DB, or search by name/symbol. Note each token’s
id.Get Quotes
Call
GET /quotes with token IDs. The response returns quotes from all available providers — select the one with type: "standard".Integration Guide
Step 1: Get Tokens
There are two approaches for getting tokens. Choose the one that fits your integration:- Bulk Fetch + Cache
- Token Search
Fetch all CEX-supported tokens once and store them in your backend database. This is the best approach for production integrations — it keeps your UI fast and avoids hammering the API.
Step 2: Get Quotes
CallGET /quotes using token IDs (not symbols). The response includes quotes from all available providers across all swap types.
Quotes Response
quoteId: Pass this to/exchangesto create the ordertype:"standard"for single-hop CEX routingswap/swapName: CEX provider code and human-readable nameamountOut: Output amountduration: Estimated completion time in minutesmin/max: Valid input amount range
Step 3: Create Order
Pass thequoteId and destination address to POST /exchanges:
Order Response
houdiniId: Unique order identifier — use for status pollingdepositAddress: Send input funds hereinAmount/inSymbol: Exact amount and token to sendexpires: Deposit deadline (typically 30 minutes)statusLabel: Human-readable order statuseta: Estimated completion time in minutes
Step 4: Send Deposit
After creating the order, send the input tokens todepositAddress. The status will advance automatically once the deposit is detected on-chain.
Step 5: Monitor Order Status
PollGET /orders/{houdiniId} to track progress, or subscribe via the WebSocket API for real-time updates:
Status Progression
Best Practices
Token Fetching
Token Fetching
- Bulk fetch + cache: Paginate through
/v2/tokens?hasCex=trueon server startup and store in your DB. Refresh every 24 hours. - Search: Use
?term=<query>for on-demand token lookup — good for lightweight integrations. - Never call
/tokenson every user request in production.
Transaction Monitoring
Transaction Monitoring
- Poll
/orders/{houdiniId}every 30 seconds - Store
houdiniIdfor future reference and support lookups - Handle all
statusLabelvalues: FINISHED, FAILED, EXPIRED, REFUNDED
Error Handling
Error Handling
- Re-fetch quotes if quote is expired before calling
/exchanges - Validate
addressToformat before submitting - Implement retry logic with backoff for API calls
Security
Security
- Never expose API keys in frontend code
- Use backend-only API integration
- Validate all addresses before submitting
- Store order records for audit trail
Common Issues
Swap Taking Longer Than Expected
Swap Taking Longer Than Expected
Causes: Network congestion, CEX processing delays, slow block confirmations.Solution: Continue monitoring. Most swaps complete within 2× the estimated time.
Wrong Amount Deposited
Wrong Amount Deposited
Issue: User sent an incorrect amount to the deposit address.Solution: A partial refund may be processed. Contact support with the
houdiniId.Order Expired
Order Expired
Cause: Deposit was not received before the
expires timestamp.Solution: Fetch a new quote and create a new order.Status Stuck at CONFIRMING
Status Stuck at CONFIRMING
Solution: Wait for blockchain confirmations. Check the deposit transaction on a block explorer and verify the correct amount was sent.
Example Repositories
See full working integrations on GitHub:Next.js Example
Full Next.js integration showing standard, private, and DEX swap flows
Node.js Example
Backend Node.js integration with token fetching, quoting, and order tracking