Private swaps route through multiple CEX hops to break the transaction trail, providing enhanced anonymity. Optionally routes through Monero (XMR) as an untraceable intermediate layer. In API v2, private swaps use the same /quotes and /exchanges endpoints as standard and DEX swaps — pass types=private to get only private quotes, or filter the response by type: "private".
Best For: Users who prioritize privacy and are willing to accept longer completion times (15–45 minutes) for enhanced anonymity.
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.
Cache the token list in your backend database. Never call /tokens on every user request — load on server startup or via a scheduled job and refresh every 24 hours.
async function fetchAllCexTokens() { let page = 1; let allTokens = []; while (true) { const response = await fetch( `https://api-partner.houdiniswap.com/v2/tokens?hasCex=true&pageSize=20&page=${page}`, { headers: { 'Authorization': `${API_KEY}:${API_SECRET}` } } ); const { tokens, totalPages } = await response.json(); allTokens = allTokens.concat(tokens); if (page >= totalPages) break; page++; } return allTokens; // save to your DB}
curl -X GET "https://api-partner.houdiniswap.com/v2/tokens?hasCex=true&pageSize=20&page=1" \ -H "Authorization: your_api_key:your_api_secret"
Search for specific tokens by name or symbol on demand.
Pass the quoteId and destination address to POST /exchanges. No additional parameters are needed to enable private routing — the quote type determines the routing.
Private swaps pass through an additional ANONYMIZING stage during the XMR privacy layer:
NEW / WAITING ↓ Deposit sent and detectedCONFIRMING ↓ Blockchain confirmations receivedEXCHANGING ↓ First CEX hop processingANONYMIZING ↓ Routing through XMR privacy layer ↓ Second CEX hop processingFINISHED
Status Fields:
statusLabel: Overall order status
inStatusLabel: First hop status
outStatusLabel: Second hop status (private swaps only)
Poll every 30 seconds. Private swaps typically complete in 15–45 minutes due to multi-hop routing. For real-time updates without polling, use the WebSocket API.
Cause: Multi-hop routing through 2 exchanges takes longer than a direct swap.Solution: This is expected for private swaps. Monitor inStatusLabel and outStatusLabel to see which hop is processing.
Privacy Questions
Question: “How private is this really?”Answer: Private swaps break the transaction trail by routing through multiple exchanges. When XMR routing is used, it adds an untraceable intermediate step. However, this is not absolute anonymity — compliance checks still apply.
Order Expired
Cause: Deposit was not received before the expires timestamp.Solution: Fetch a new quote and create a new order.