Skip to main content
Reference for the main types used with getTradeQuotes, trade, buildTradeTxn, and getAllowance. Import from @dzapio/sdk.

Trade quotes

TradeQuotesRequest

TradeQuotesRequestData

TradeQuotesResponse

Returned directly by getTradeQuotes() (object keyed by pair key):
Use recommendedSource ?? bestReturnSource when building trade data.

Trade build & execute

TradeBuildTxnRequest

TradeBuildTxnRequestData

TradeBuildTxnResponse (buildTradeTxn / build response, non-gasless)

Returned by buildTradeTxn(request) (when gasless: false) and passed as txnData to trade(). transaction is the chain-specific payload; several fields are also mirrored at the top level for backwards compatibility (@deprecated, EVM-only):
When gasless: true is requested instead, the response is a GaslessTradeBuildTxnResponse:

DZapTransactionResponse (trade / zap execution result)

Allowance

getAllowance() returns { status, code, data }. data is keyed by token address — there is no approvalNeeded/signatureNeeded field; derive those from allowance/type:

HexString

Addresses and hashes use the type HexString = `0x${string}`.

Next steps

Last modified on July 14, 2026