Skip to main content
By default, the Biconomy API performs an exhaustive query across all underlying liquidity providers (DEXs, aggregators, bridges) to find the optimal route for your swap. While this ensures the best possible price, it takes longer to respond. For applications where speed is more important than finding the absolute best price, you can use fast-quote mode to get the first viable quote immediately.

Using Fast-Quote Mode

Add routeSelectionMode: "fast-quote" to the data field of your request:
const quote = await fetch('https://api.biconomy.io/v1/quote', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    mode: 'eoa',
    ownerAddress: userAddress,
    composeFlows: [{
      type: '/instructions/intent-simple',
      data: {
        srcChainId: 8453,
        dstChainId: 42161,
        srcToken: USDC_BASE,
        dstToken: ETH_ARBITRUM,
        amount: '100000000',
        slippage: 0.01,
        routeSelectionMode: "fast-quote"  // Return first viable quote
      }
    }]
  })
});

Comparison

ModeBehaviorResponse TimePrice Optimization
DefaultQueries all providers, compares routesSlowerBest price guaranteed
fast-quoteReturns first viable routeFasterGood price, not necessarily optimal

When to Use Fast-Quote

Good For

  • Real-time price displays
  • Quick previews in UI
  • High-frequency quote refreshes
  • Time-sensitive applications

Consider Default For

  • Large trade amounts
  • Final execution quotes
  • Price-sensitive users
  • Low-frequency requests

Best Practice: Preview Then Execute

A common pattern is to use fast-quote for UI previews, then fetch a full quote before execution:
// Fast quote for immediate UI feedback
const previewQuote = await getQuote({
  ...params,
  data: { ...data, routeSelectionMode: "fast-quote" }
});

// Show preview to user
displayQuote(previewQuote);

// When user clicks "Swap", get optimized quote for execution
const executionQuote = await getQuote({
  ...params
  // No routeSelectionMode = exhaustive search
});

// Execute with best price
await executeQuote(executionQuote);
Fast-quote mode typically reduces response times significantly, especially for cross-chain swaps where multiple bridge providers need to be queried.