Skip to main content
The DZap SDK provides functionality to request trade quotes, as well as to execute them. This guide will walk you through the process of making a request using getTradeQuotes.
Rate Limits: Our API and SDK have rate limits in place to ensure fair usage. If you need increased rate limits for your application, please reach out to our team on Telegram.

How to Request Trade Quotes

To get started, here is a simple example of how to request quotes to bridge and swap 1 USDC on Arbitrum to ETH on Base.
When you request quotes, you receive an object keyed by pair identifier; each entry contains recommendedSource, bestReturnSource (fallback), and quoteRates. Transaction data is not included and must be built separately for trade() or buildTradeTxn().

Trade Quotes Request Parameters

The getTradeQuotes function expects a TradeQuotesRequest object, which specifies a desired trade and includes all the information needed to calculate the most efficient routes.

Request Parameters

TradeQuotesRequestData Parameters

Quote Filter Options

You can filter quotes based on different criteria:
  • all - Returns all available quotes. This is the default option and provides the fastest response time.
  • best - Return only the best quote
  • fastest - Return the fastest execution time quote (for bridge operations)

Advanced Quote Configuration

For applications requiring fine-tuned control over quote optimization, the SDK provides advanced configuration options:

Advanced Parameters

TimingStrategy Configuration

The timingStrategy parameter allows fine-grained control over how the SDK optimizes quote collection:

minWaitTimeMs

maxWaitTimeMs

subsequentDelayMs

preferredResultCount

relaxMinSuccessOnDelay

Advanced Configuration Example

TypeScript Type Definition

Understanding the Response

The response contains detailed information about available routes:

Key Response Fields

  • pair - Unique identifier for the trade pair (e.g., 42161_0xaf88..._8453_0x4200...). Can be generated using getTokensPairKey.
  • recommendedSource - The provider ID of the recommended route; use this when building the trade request.
  • bestReturnSource - Best return provider for this pair;
  • quoteRates - Object containing detailed quotes per provider (keyed by provider ID).
  • tokensWithoutPrice - Tokens that don’t have price data available.

Working with Quote Results

Next Steps

Once you have received quotes, you can proceed to:
  1. Execute the trade (build TradeBuildTxnRequestData from the quote, then call trade())
  2. Track the status of your trade
Before executing trades, tokens typically require approval to allow the DZap contracts to spend them on your behalf. Learn more about gas-optimized approval mechanisms in the Approval Mechanisms section.
Last modified on July 14, 2026