Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.

QuoteResponseSchema

const QuoteResponseSchema: ZodObject<{ error: ZodOptional<ZodString>; providerErrors: ZodOptional<ZodArray<ZodObject<{ errorCode: ZodOptional<ZodNativeEnum<typeof ErrorCode>>; message: ZodOptional<ZodString>; provider: ZodOptional<ZodNativeEnum<typeof ProviderName>>; }, "strip", ZodTypeAny, { errorCode?: unknownError | test_error | providerDetailsError | blockHeaderNotFound | blockHashNotFoundAtHeight | blockHashNotFoundAtHash | txHashMissing | assetValueMissingInfo | invalidAsset | blockIsRequired | currentBlockHeaderNotFound | failedToRetrieveBalance | failedToRetrieveBlock | failedToRetrieveFees | notImplementedBCH | notImplementedDoge | noPoolsFound | noVaultsFound | noTxFound | noInputCoinFound | noBlockDataFound | multipleCosmosMessages | heightOrHashNotProvided | unknownDenom | invalidBlockHeight | timestampExtrinsicNoArgumentsForBlock | timestampExtrinsicNoTimestampForBlock | noTimestampExtrinsicForHash | timestampExtrinsicNoArgumentsForHash | txMemoUndefined | txMemoIncorrect | txTypeNotFound | txNoMessage | txNotFound | txReceiptNotFound | txParsingError | txLogsParsingError | blockNotFound | balanceNotFound | configError | synthSwapDisallowed | providerQuoteTimeout | noQuoteResponse | noPoolAssetsFound | noThorchainPools | noMayachainPools | noThorchainNetworkInfo | invalidAffiliateFee | invalidBuyAssetAddress | invalidSellAssetAddress | invalidSourceAddress | invalidDestinationAddress | sourceAddressIsSmartContract | destinationAddressIsSmartContract | invalidChainId | unsupportedChainId | unsupportedEVMChainId | unsupportedMethod | unsupportedProvider | invalidParamsForMethod | unsupportedAdapter | noWhitelistTokens | failedFetchGasPrice | failedToCreateDepositChannel | noProviderDetailsFound | noTokenListsFound | tokenNotFound | tokenPriceNotFound | tokenPriceFailedToUpdate | swapAmountTooSmall | legsArrayIsEmpty | failedToFetchQuoteForLeg | noBlockHeaderFound | failedToSimulateSwap | addressScreeningFailed | noLiquidtyProvidersFound | insufficientLiquidity | noSaversFound | noInboundDataFound | noInboundAddressesFound | noInboundAddressFoundForChain | noLastBlocksFound | noVersionFound | noConstantsFound | noMimirsFound | noRoutesFound | quoteNotFound | ledgerSignFailed | ledgerWrongPayload | ledgerFetchSwapFailed | failedToFetchTx | failedBuildTransactionDetails | noLegsForRoute | noRouterAddressFound | noAggregatorAddressFound | noContractInstanceFound | noContractAddressFound | invalidAffiliate | thornameAffiliate | providerNotfound | noRecordFound | slippageTooLow | tradingHalted | noWrappedGasAsset | aggregatorAddressNotFound | routerAddressNotFound | dummyAddressNotFound | trackerError | thorchainPoolUnavailable | noOhlcvDataFound | noTradingPairs | noLoanPositionFound | noLendingAvailability | lendingRepayTooSmall | missingState | ledgerSwapNotFound | ledgerSwapNotReadyForTracking | errorEstimatingGas | apiKeyInvalid | apiKeyFailedToUpdate | apiKeyExpired | unauthorized | failedToCreateMemo | radixIncorrectInstructions | radixTxMissedParam | radixTxMissedAccount | radixManifestParseError | radixManifestBuildError | invalidAddressForChain | riskyAddress | noRoutesToProcess | sellAssetAmountTooSmall | missingPrivateKey | noMemoPriceProtection; message?: string; provider?: CAVIAR_V1 | CAMELOT_V3 | CHAINFLIP | CHAINFLIP_STREAMING | JUPITER | MAYACHAIN | MAYACHAIN_STREAMING | OCISWAP_V1 | ONEINCH | OPENOCEAN_V2 | PANCAKESWAP | PANGOLIN_V1 | SUSHISWAP_V2 | THORCHAIN | THORCHAIN_STREAMING | TRADERJOE_V2 | UNISWAP_V2 | UNISWAP_V3 | KADO; }, { errorCode?: unknownError | test_error | providerDetailsError | blockHeaderNotFound | blockHashNotFoundAtHeight | blockHashNotFoundAtHash | txHashMissing | assetValueMissingInfo | invalidAsset | blockIsRequired | currentBlockHeaderNotFound | failedToRetrieveBalance | failedToRetrieveBlock | failedToRetrieveFees | notImplementedBCH | notImplementedDoge | noPoolsFound | noVaultsFound | noTxFound | noInputCoinFound | noBlockDataFound | multipleCosmosMessages | heightOrHashNotProvided | unknownDenom | invalidBlockHeight | timestampExtrinsicNoArgumentsForBlock | timestampExtrinsicNoTimestampForBlock | noTimestampExtrinsicForHash | timestampExtrinsicNoArgumentsForHash | txMemoUndefined | txMemoIncorrect | txTypeNotFound | txNoMessage | txNotFound | txReceiptNotFound | txParsingError | txLogsParsingError | blockNotFound | balanceNotFound | configError | synthSwapDisallowed | providerQuoteTimeout | noQuoteResponse | noPoolAssetsFound | noThorchainPools | noMayachainPools | noThorchainNetworkInfo | invalidAffiliateFee | invalidBuyAssetAddress | invalidSellAssetAddress | invalidSourceAddress | invalidDestinationAddress | sourceAddressIsSmartContract | destinationAddressIsSmartContract | invalidChainId | unsupportedChainId | unsupportedEVMChainId | unsupportedMethod | unsupportedProvider | invalidParamsForMethod | unsupportedAdapter | noWhitelistTokens | failedFetchGasPrice | failedToCreateDepositChannel | noProviderDetailsFound | noTokenListsFound | tokenNotFound | tokenPriceNotFound | tokenPriceFailedToUpdate | swapAmountTooSmall | legsArrayIsEmpty | failedToFetchQuoteForLeg | noBlockHeaderFound | failedToSimulateSwap | addressScreeningFailed | noLiquidtyProvidersFound | insufficientLiquidity | noSaversFound | noInboundDataFound | noInboundAddressesFound | noInboundAddressFoundForChain | noLastBlocksFound | noVersionFound | noConstantsFound | noMimirsFound | noRoutesFound | quoteNotFound | ledgerSignFailed | ledgerWrongPayload | ledgerFetchSwapFailed | failedToFetchTx | failedBuildTransactionDetails | noLegsForRoute | noRouterAddressFound | noAggregatorAddressFound | noContractInstanceFound | noContractAddressFound | invalidAffiliate | thornameAffiliate | providerNotfound | noRecordFound | slippageTooLow | tradingHalted | noWrappedGasAsset | aggregatorAddressNotFound | routerAddressNotFound | dummyAddressNotFound | trackerError | thorchainPoolUnavailable | noOhlcvDataFound | noTradingPairs | noLoanPositionFound | noLendingAvailability | lendingRepayTooSmall | missingState | ledgerSwapNotFound | ledgerSwapNotReadyForTracking | errorEstimatingGas | apiKeyInvalid | apiKeyFailedToUpdate | apiKeyExpired | unauthorized | failedToCreateMemo | radixIncorrectInstructions | radixTxMissedParam | radixTxMissedAccount | radixManifestParseError | radixManifestBuildError | invalidAddressForChain | riskyAddress | noRoutesToProcess | sellAssetAmountTooSmall | missingPrivateKey | noMemoPriceProtection; message?: string; provider?: CAVIAR_V1 | CAMELOT_V3 | CHAINFLIP | CHAINFLIP_STREAMING | JUPITER | MAYACHAIN | MAYACHAIN_STREAMING | OCISWAP_V1 | ONEINCH | OPENOCEAN_V2 | PANCAKESWAP | PANGOLIN_V1 | SUSHISWAP_V2 | THORCHAIN | THORCHAIN_STREAMING | TRADERJOE_V2 | UNISWAP_V2 | UNISWAP_V3 | KADO; }>, "many">>; quoteId: ZodString; routes: ZodArray<ZodObject<{ buyAsset: ZodString; destinationAddress: ZodString; estimatedTime: ZodOptional<ZodObject<{ inbound: ZodOptional<ZodNumber>; outbound: ZodOptional<ZodNumber>; swap: ZodOptional<ZodNumber>; total: ZodNumber; }, "strip", ZodTypeAny, { inbound?: number; outbound?: number; swap?: number; total: number; }, { inbound?: number; outbound?: number; swap?: number; total: number; }>>; expectedBuyAmount: ZodString; expectedBuyAmountMaxSlippage: ZodString; expiration: ZodOptional<ZodString>; fees: ZodArray<ZodObject<{ amount: ZodString; asset: ZodString; chain: ZodString; protocol: ZodNativeEnum<typeof ProviderName>; type: ZodNativeEnum<typeof FeeTypeEnum>; }, "strip", ZodTypeAny, { amount: string; asset: string; chain: string; protocol: ProviderName; type: FeeTypeEnum; }, { amount: string; asset: string; chain: string; protocol: ProviderName; type: FeeTypeEnum; }>, "many">; inboundAddress: ZodOptional<ZodString>; legs: ZodArray<ZodObject<{ buyAmount: ZodString; buyAmountMaxSlippage: ZodString; buyAsset: ZodString; fees: ZodOptional<ZodArray<ZodObject<…, …, …, …, …>, "many">>; provider: ZodNativeEnum<typeof ProviderName>; sellAmount: ZodString; sellAsset: ZodString; }, "strip", ZodTypeAny, { buyAmount: string; buyAmountMaxSlippage: string; buyAsset: string; fees?: object[]; provider: ProviderName; sellAmount: string; sellAsset: string; }, { buyAmount: string; buyAmountMaxSlippage: string; buyAsset: string; fees?: object[]; provider: ProviderName; sellAmount: string; sellAsset: string; }>, "many">; memo: ZodOptional<ZodString>; meta: ZodObject<{ affiliate: ZodOptional<ZodString>; affiliateFee: ZodOptional<ZodString>; approvalAddress: ZodOptional<ZodString>; assets: ZodOptional<ZodArray<ZodObject<{ asset: …; image: …; price: …; }, "strip", ZodTypeAny, { asset: …; image: …; price: …; }, { asset: …; image: …; price: …; }>, "many">>; chainflip: ZodOptional<ZodObject<{ affiliateFees: ZodOptional<…>; brokerCommissionBps: ZodOptional<…>; buyAsset: ZodObject<…, …, …, …, …>; channelMetadata: ZodOptional<…>; dcaParameters: ZodOptional<…>; destinationAddress: ZodString; maxBoostFeeBps: ZodOptional<…>; refundParameters: ZodOptional<…>; sellAsset: ZodObject<…, …, …, …, …>; }, "strip", ZodTypeAny, { affiliateFees?: … | …; brokerCommissionBps?: … | …; buyAsset: { asset: …; chain: …; }; channelMetadata?: … | …; dcaParameters?: … | …; destinationAddress: string; maxBoostFeeBps?: … | …; refundParameters?: … | …; sellAsset: { asset: …; chain: …; }; }, { affiliateFees?: … | …; brokerCommissionBps?: … | …; buyAsset: { asset: …; chain: …; }; channelMetadata?: … | …; dcaParameters?: … | …; destinationAddress: string; maxBoostFeeBps?: … | …; refundParameters?: … | …; sellAsset: { asset: …; chain: …; }; }>>; maxStreamingQuantity: ZodOptional<ZodNumber>; priceImpact: ZodOptional<ZodNumber>; referrer: ZodOptional<ZodString>; streamingInterval: ZodOptional<ZodNumber>; tags: ZodArray<ZodNativeEnum<typeof PriorityLabel>, "many">; txType: ZodOptional<ZodNativeEnum<typeof RouteQuoteTxType>>; }, "strip", ZodTypeAny, { affiliate?: string; affiliateFee?: string; approvalAddress?: string; assets?: object[]; chainflip?: { affiliateFees?: …[]; brokerCommissionBps?: number; buyAsset: { asset: string; chain: string; }; channelMetadata?: { cfParameters?: …; gasBudget?: …; message?: …; }; dcaParameters?: { chunkInterval?: …; numberOfChunks?: …; }; destinationAddress: string; maxBoostFeeBps?: number; refundParameters?: { minPrice?: …; refundAddress?: …; retryDuration?: …; }; sellAsset: { asset: string; chain: string; }; }; maxStreamingQuantity?: number; priceImpact?: number; referrer?: string; streamingInterval?: number; tags: PriorityLabel[]; txType?: PSBT | EVM | COSMOS | RADIX; }, { affiliate?: string; affiliateFee?: string; approvalAddress?: string; assets?: object[]; chainflip?: { affiliateFees?: …[]; brokerCommissionBps?: number; buyAsset: { asset: string; chain: string; }; channelMetadata?: { cfParameters?: …; gasBudget?: …; message?: …; }; dcaParameters?: { chunkInterval?: …; numberOfChunks?: …; }; destinationAddress: string; maxBoostFeeBps?: number; refundParameters?: { minPrice?: …; refundAddress?: …; retryDuration?: …; }; sellAsset: { asset: string; chain: string; }; }; maxStreamingQuantity?: number; priceImpact?: number; referrer?: string; streamingInterval?: number; tags: PriorityLabel[]; txType?: PSBT | EVM | COSMOS | RADIX; }>; providers: ZodArray<ZodNativeEnum<typeof ProviderName>, "many">; sellAmount: ZodString; sellAsset: ZodString; sourceAddress: ZodString; targetAddress: ZodOptional<ZodString>; totalSlippageBps: ZodNumber; tx: ZodOptional<ZodUnion<[ZodObject<{ data: ZodString; from: ZodString; to: ZodString; value: ZodString; }, "strip", ZodTypeAny, { data: string; from: string; to: string; value: string; }, { data: string; from: string; to: string; value: string; }>, ZodObject<{ accountNumber: ZodNumber; chainId: ZodNativeEnum<…>; fee: ZodObject<…, …, …, …, …>; memo: ZodString; msgs: ZodArray<…, …>; sequence: ZodNumber; }, "strip", ZodTypeAny, { accountNumber: number; chainId: ChainId; fee: { amount: …; gas: …; }; memo: string; msgs: …[]; sequence: number; }, { accountNumber: number; chainId: ChainId; fee: { amount: …; gas: …; }; memo: string; msgs: …[]; sequence: number; }>, ZodString]>>; txType: ZodOptional<ZodNativeEnum<typeof RouteQuoteTxType>>; warnings: ZodArray<ZodObject<{ code: ZodNativeEnum<typeof WarningCodeEnum>; display: ZodString; tooltip: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { code: WarningCodeEnum; display: string; tooltip?: string; }, { code: WarningCodeEnum; display: string; tooltip?: string; }>, "many">; }, "strip", ZodTypeAny, { buyAsset: string; destinationAddress: string; estimatedTime?: { inbound?: number; outbound?: number; swap?: number; total: number; }; expectedBuyAmount: string; expectedBuyAmountMaxSlippage: string; expiration?: string; fees: object[]; inboundAddress?: string; legs: object[]; memo?: string; meta: { affiliate?: string; affiliateFee?: string; approvalAddress?: string; assets?: object[]; chainflip?: { affiliateFees?: object[]; brokerCommissionBps?: number; buyAsset: { asset: string; chain: string; }; channelMetadata?: { cfParameters?: … | …; gasBudget?: … | …; message?: … | …; }; dcaParameters?: { chunkInterval?: … | …; numberOfChunks?: … | …; }; destinationAddress: string; maxBoostFeeBps?: number; refundParameters?: { minPrice?: … | …; refundAddress?: … | …; retryDuration?: … | …; }; sellAsset: { asset: string; chain: string; }; }; maxStreamingQuantity?: number; priceImpact?: number; referrer?: string; streamingInterval?: number; tags: PriorityLabel[]; txType?: PSBT | EVM | COSMOS | RADIX; }; providers: ProviderName[]; sellAmount: string; sellAsset: string; sourceAddress: string; targetAddress?: string; totalSlippageBps: number; tx?: string | { data: string; from: string; to: string; value: string; } | { accountNumber: number; chainId: ChainId; fee: { amount: object[]; gas: string; }; memo: string; msgs: object[]; sequence: number; }; txType?: PSBT | EVM | COSMOS | RADIX; warnings: object[]; }, { buyAsset: string; destinationAddress: string; estimatedTime?: { inbound?: number; outbound?: number; swap?: number; total: number; }; expectedBuyAmount: string; expectedBuyAmountMaxSlippage: string; expiration?: string; fees: object[]; inboundAddress?: string; legs: object[]; memo?: string; meta: { affiliate?: string; affiliateFee?: string; approvalAddress?: string; assets?: object[]; chainflip?: { affiliateFees?: object[]; brokerCommissionBps?: number; buyAsset: { asset: string; chain: string; }; channelMetadata?: { cfParameters?: … | …; gasBudget?: … | …; message?: … | …; }; dcaParameters?: { chunkInterval?: … | …; numberOfChunks?: … | …; }; destinationAddress: string; maxBoostFeeBps?: number; refundParameters?: { minPrice?: … | …; refundAddress?: … | …; retryDuration?: … | …; }; sellAsset: { asset: string; chain: string; }; }; maxStreamingQuantity?: number; priceImpact?: number; referrer?: string; streamingInterval?: number; tags: PriorityLabel[]; txType?: PSBT | EVM | COSMOS | RADIX; }; providers: ProviderName[]; sellAmount: string; sellAsset: string; sourceAddress: string; targetAddress?: string; totalSlippageBps: number; tx?: string | { data: string; from: string; to: string; value: string; } | { accountNumber: number; chainId: ChainId; fee: { amount: object[]; gas: string; }; memo: string; msgs: object[]; sequence: number; }; txType?: PSBT | EVM | COSMOS | RADIX; warnings: object[]; }>, "many">; }, "strip", ZodTypeAny, { error?: string; providerErrors?: object[]; quoteId: string; routes: object[]; }, { error?: string; providerErrors?: object[]; quoteId: string; routes: object[]; }>

Defined in: packages/helpers/src/api/swapkitApi/types.ts:540