> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-get-quotes/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.0x.org/_mcp/server. # getQuotes GET https://api.0x.org/cross-chain/quotes Get the quotes for a cross chain swap Reference: https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-get-quotes ## Request ### Query parameters - `originChain` (string, required) — The source chain from which the cross-chain swap will originate. Can be specified as chain ID or name. See [here](https://0x-docs.gitbook.io/0x-cross-chain-api-beta/developer-resources/supported-chains-and-providers) for the list of supported chains - `destinationChain` (string, required) — The destination chain where tokens will be received after the cross-chain swap. Can be specified as chain ID or name. See [here](https://0x-docs.gitbook.io/0x-cross-chain-api-beta/developer-resources/supported-chains-and-providers) for the list of supported chains - `sellToken` (string, required) — The contract address of the token to sell on the origin chain. Format varies by chain type (EVM address for EVM/HyperCore chains, token mint address for Solana, base58check address for Tron) - `buyToken` (string, required) — The contract address of the token to buy on the destination chain. Format varies by chain type (EVM address for EVM/HyperCore chains, token mint address for Solana, base58check address for Tron) - `sellAmount` (string, required) — The amount of `sellToken` (in `sellToken`'s base units) to sell on the origin chain - `originAddress` (string, required) — The wallet address on the origin chain that holds the sellToken balance and will initiate the cross-chain transaction - `destinationAddress` (string, optional) — The wallet address on the destination chain that will receive the buyToken. If not specified, defaults to originAddress on the destination chain - `gasPayer` (string, optional) — The Solana address that will pay for transaction fees when the origin chain is Solana. Only applicable for Solana origin chains - `solanaEphemeralSignerPubkey` (string, optional) — Pubkey of an integrator-held ephemeral keypair used as a one-shot extra transaction signer for Solana origin routes that require one (e.g. the CCTP event account). Generate a fresh keypair per request and sign the returned transaction with it; the account must not already exist on-chain and is not reusable afterwards. Routes requiring an ephemeral signer are only quoted when this is set. Only applicable for Solana origin chains - `slippageBps` (integer, optional, default: 100) — The maximum acceptable slippage for each swap or bridge step of the cross-chain swap in basis points (100 = 1%) - `excludedBridges` (string, optional) — Comma-separated list of bridge providers to exclude from routing - `includedBridges` (string, optional) — Comma-separated list of bridge providers to include in routing. Mutually exclusive with excludedBridges - `excludedSwapSources` (string, optional) — Comma-separated list of DEX sources to exclude from routing on both chains - `feeBps` (string, optional, default: ) — The trading fee amounts in basis points to charge on the origin chain (supports single or comma-separated values). Must be used together with feeRecipient. When multiple values are provided, must match the length of feeRecipient. Note: integrator fee collection is not yet supported for Tron-originated routes. - `feeRecipient` (string, optional, default: ) — The wallet addresses to receive trading fees on the origin chain (supports single or comma-separated values). Must be used together with feeBps. When multiple values are provided, must match the length of feeBps. Note: integrator fee collection is not yet supported for Tron-originated routes. - `feeToken` (string, optional, default: ) — The token addresses for fee collection on the origin chain (supports single or comma-separated values). Must be the same as sellToken. When multiple values are provided, must match the length of feeBps. If omitted, defaults to sellToken. Some routes collect the integrator fee through the bridge provider instead of on-chain; the fee still goes to feeRecipient, but it comes out of the token entering the bridge, which is not sellToken when the route swaps before bridging. Read fees.integratorFee.token for the token actually charged. Note: integrator fee collection is not yet supported for Tron-originated routes. - `sortQuotesBy` (enum, required) — How to sort the returned quotes - either by speed (fastest execution time) or price (best exchange rate) - Allowed values: `speed`, `price` - `maxNumQuotes` (integer, optional, default: 3) — The maximum number of cross-chain quotes to return, between 1 and 10. Each quote represents a different combination of bridges and DEXs ### Headers - `0x-api-key` (string, required) — Visit dashboard.0x.org to get your API Key ## Response ### 200 Successful response - `Cross-Chain_crossChain::getQuotes_Response_200` ## Errors ### 400 Bad Request Error 400 error response - `CrossChain::getQuotesRequestBadRequestError` ### 403 Forbidden Error 403 error response - `CrossChain::getQuotesRequestForbiddenError` ### 422 Unprocessable Entity Error 422 error response - `CrossChain::getQuotesRequestUnprocessableEntityError` ### 500 Internal Server Error 500 error response - `CrossChain::getQuotesRequestInternalServerError` ## Types ### CrossChainCrossChainGetQuotesResponse2000 - `liquidityAvailable` (boolean, required) — Whether sufficient liquidity exists across bridges and DEXs to execute the cross-chain swap - `allowanceTarget` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0AllowanceTarget, required, nullable) — The contract address to set the allowance on, if necessary - `originChainId` (double, required) — The numeric chain ID of the origin chain where the swap begins - `originChain` (string, required) — The name of the origin chain where the swap begins - `destinationChainId` (double, required) — The numeric chain ID of the destination chain where tokens will be received - `destinationChain` (string, required) — The name of the destination chain where tokens will be received - `sellToken` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0SellToken, required) — The contract address of the token being sold on the origin chain - `buyToken` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0BuyToken, required) — The contract address of the token being bought on the destination chain - `issues` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0Issues, required) - `zid` (string, required) — The unique ZeroEx identifier of the request - `quotes` (list of CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItems, required) — Array of available cross-chain quotes, each representing a different combination of bridges and DEXs ### CrossChainCrossChainGetQuotesResponse2001 - `liquidityAvailable` (boolean, required) — Whether sufficient liquidity exists across bridges and DEXs to execute the cross-chain swap - `zid` (string, required) — The unique ZeroEx identifier of the request ### INPUT_INVALID - `name` (enum, required) - Allowed values: `INPUT_INVALID` - `message` (string, required) - `data` (InputInvalidData, required) ### RECIPIENT_NOT_AUTHORIZED_FOR_TRADE - `name` (enum, required) - Allowed values: `RECIPIENT_NOT_AUTHORIZED_FOR_TRADE` - `message` (string, required) - `data` (RecipientNotAuthorizedForTradeData, required) ### TAKER_NOT_AUTHORIZED_FOR_TRADE - `name` (enum, required) - Allowed values: `TAKER_NOT_AUTHORIZED_FOR_TRADE` - `message` (string, required) - `data` (TakerNotAuthorizedForTradeData, required) ### BUY_TOKEN_NOT_AUTHORIZED_FOR_TRADE - `name` (enum, required) - Allowed values: `BUY_TOKEN_NOT_AUTHORIZED_FOR_TRADE` - `message` (string, required) - `data` (BuyTokenNotAuthorizedForTradeData, required) ### SELL_TOKEN_NOT_AUTHORIZED_FOR_TRADE - `name` (enum, required) - Allowed values: `SELL_TOKEN_NOT_AUTHORIZED_FOR_TRADE` - `message` (string, required) - `data` (SellTokenNotAuthorizedForTradeData, required) ### INTERNAL_SERVER_ERROR - `name` (enum, required) - Allowed values: `INTERNAL_SERVER_ERROR` - `message` (string, required) - `data` (InternalServerErrorData, required) ### UNCATEGORIZED - `name` (enum, required) - Allowed values: `UNCATEGORIZED` - `message` (string, required) - `data` (UncategorizedData, required) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0AllowanceTarget The contract address to set the allowance on, if necessary ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0SellToken The contract address of the token being sold on the origin chain ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0BuyToken The contract address of the token being bought on the destination chain ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0Issues - `allowance` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesAllowance, required, nullable) — The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required - `balance` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesBalance, required, nullable) — The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance - `simulationIncomplete` (boolean, required) — This is set to `true` when 0x cannot validate the transaction. This happens when the `originAddress` has an insufficient balance of `sellToken` and 0x is unable to perform enhanced quote validation with such low balance. Note that this does not necessarily mean that the trade will revert - `invalidSwapSourcesPassed` (list of string, required) — List of invalid swap sources specified in the `excludedSwapSources` parameter - `invalidBridgesPassed` (list of string, required) — List of invalid bridge providers specified in the `excludedBridges` or `includedBridges` parameter ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItems - `sellAmount` (string, required) — The amount of sellToken (in sellToken base units) required on the origin chain - `buyAmount` (string, required) — The estimated amount of `buyToken` (in `buyToken`'s base units) to be received on the destination chain - `minBuyAmount` (string, required) — The minimum amount of buyToken guaranteed across the entire cross-chain quote. This price is influenced by the `slippageBps` parameter - `fees` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFees, required) — All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees - `gasCosts` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCosts, required) — Estimated gas costs for executing the transaction on the origin chain, formatted by chain type - `steps` (list of CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems, required) — Sequential steps required to complete the cross-chain swap, including wrapping, swaps, and bridge operations - `transaction` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransaction, required) — The transaction details to execute on the origin chain to initiate the cross-chain swap - `estimatedTimeSeconds` (double, required, nullable) — Estimated total time in seconds for the cross-chain swap to complete, including bridge confirmation time - `issues` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssues, required) - `quoteId` (string, required) — The unique ID for this cross-chain quote ### InputInvalidData - `zid` (string, required) — The unique ZeroEx identifier of the request - `details` (list of InputInvalidDataDetailsItems, required) — The list of invalid inputs ### RecipientNotAuthorizedForTradeData - `zid` (string, required) — The unique ZeroEx identifier of the request ### TakerNotAuthorizedForTradeData - `zid` (string, required) — The unique ZeroEx identifier of the request ### BuyTokenNotAuthorizedForTradeData - `zid` (string, required) — The unique ZeroEx identifier of the request ### SellTokenNotAuthorizedForTradeData - `zid` (string, required) — The unique ZeroEx identifier of the request ### InternalServerErrorData - `zid` (string, required) — The unique ZeroEx identifier of the request ### UncategorizedData - `zid` (string, required) — The unique ZeroEx identifier of the request ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesAllowance The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required - `actual` (string, required) — The `originAddress`'s current allowance of the `spender` - `spender` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesAllowanceSpender, required) — The address to set the allowance on ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesBalance The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesBalanceToken, required) — The contract address of the `sellToken` - `actual` (string, required) — The current balance of the `sellToken` in the `originAddress` address - `expected` (string, required) — The balance of `sellToken` required for the swap to execute successfully ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFees All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees - `integratorFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFee, required, nullable) — The details about the first fee collected by the integrator - `integratorFees` (list of CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeesItems, required, nullable) — The details about the fees collected by the integrator - `zeroExFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesZeroExFee, required, nullable) — The details about the fee collected by 0x - `providerAppFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesProviderAppFee, required, nullable) — Provider-native app fee collected by the bridge provider (currently only Relay). The chain ID identifies the fee currency and may differ from the origin and destination chains - `bridgeNativeFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesBridgeNativeFee, required, nullable) — Native fee required by the bridge provider for cross-chain message passing that will be added to the transaction value - `reimbursementFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesReimbursementFee, optional) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCosts Estimated gas costs for executing the transaction on the origin chain, formatted by chain type ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransaction The transaction details to execute on the origin chain to initiate the cross-chain swap ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssues - `allowance` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesAllowance, required, nullable) — The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required - `balance` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesBalance, required, nullable) — The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance - `simulationIncomplete` (boolean, required) — This is set to `true` when 0x cannot validate the transaction. This happens when the `originAddress` has an insufficient balance of `sellToken` and 0x is unable to perform enhanced quote validation with such low balance. Note that this does not necessarily mean that the trade will revert ### InputInvalidDataDetailsItems - `field` (string, required) — The input field name - `reason` (string, required) — The validation failure reason ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesAllowanceSpender The address to set the allowance on ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0IssuesBalanceToken The contract address of the `sellToken` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFee The details about the first fee collected by the integrator - `amount` (string, required) — The amount of the integrator fee in token's base units - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeeToken, required) — The contract address of the token in which the integrator collected a fee - `type` (enum, required) — The fee type indicating it is calculated as a percentage of trade volume - Allowed values: `volume` - `collectedBy` (enum, required, nullable) — How this fee is collected. null: transferred on-chain as part of the trade. "relay": collected and paid out by Relay, so it is not a transfer in the origin transaction and may use the token entering the bridge rather than feeToken - Allowed values: `relay` - `chainId` (double, optional) — The chain ID where this fee will be collected ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeesItems - `amount` (string, required) — The amount of the integrator fee in token's base units - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeesItemsToken, required) — The contract address of the token in which the integrator collected a fee - `type` (enum, required) — The fee type indicating it is calculated as a percentage of trade volume - Allowed values: `volume` - `collectedBy` (enum, required, nullable) — How this fee is collected. null: transferred on-chain as part of the trade. "relay": collected and paid out by Relay, so it is not a transfer in the origin transaction and may use the token entering the bridge rather than feeToken - Allowed values: `relay` - `chainId` (double, optional) — The chain ID where this fee will be collected ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesZeroExFee The details about the fee collected by 0x - `amount` (string, required) — The 0x fee in token's base units - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesZeroExFeeToken, required) — The contract address of the token in which 0x collected a fee - `type` (enum, required) — The fee type indicating it is calculated as a percentage of trade volume - Allowed values: `volume` - `collectedBy` (enum, required, nullable) — How this fee is collected. null: transferred on-chain as part of the trade. "relay": collected and paid out by Relay, so it is not a transfer in the origin transaction and may use the token entering the bridge rather than feeToken - Allowed values: `relay` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesProviderAppFee Provider-native app fee collected by the bridge provider (currently only Relay). The chain ID identifies the fee currency and may differ from the origin and destination chains - `amount` (string, required) — The provider app fee amount in token's base units - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesProviderAppFeeToken, required) — The contract address of the token in which the provider collected an app fee - `type` (enum, required) — The fee type indicating it is calculated as a percentage of trade volume - Allowed values: `volume` - `chainId` (double, required) — The chain ID of the provider app fee currency ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesBridgeNativeFee Native fee required by the bridge provider for cross-chain message passing that will be added to the transaction value - `amount` (string, required) — The bridge fee amount in token's base units that will be added to the transaction value - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesBridgeNativeFeeToken, required) — The contract address of the token in which the bridge fee is collected - `type` (enum, required) — The fee type indicating it is a native bridge fee - Allowed values: `native` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesReimbursementFee - `amount` (string, required) — The reimbursement fee amount in token's base units - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesReimbursementFeeToken, required) — The contract address of the token in which the reimbursement fee is collected - `recipient` (string, required) — The wallet address that receives the reimbursement fee ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCosts0 - `chainType` (enum, required) — The blockchain type for Ethereum-compatible chains - Allowed values: `evm` - `gasPrice` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf0GasPrice, required, nullable) — The gas price in wei used for cost estimation - `gasLimit` (string, required) — The estimated gas limit required for successful execution - `totalNetworkFee` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf0TotalNetworkFee, required, nullable) — The estimated total network cost of the swap. On chains where there is no L1 data cost, it is calculated as `gas` * `gasPrice`. On chains where there is an L1 data cost, it is calculated as `gas` * `gasPrice + L1 data` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCosts1 - `chainType` (enum, required) — The blockchain type for Solana Virtual Machine - Allowed values: `svm` - `base` (string, required) — The base transaction fee in lamports for Solana - `priority` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf1Priority, required, nullable) — The priority fee in lamports for faster transaction processing - `total` (string, required) — The total fee in lamports (base + priority) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCosts2 - `chainType` (enum, required) — The blockchain type for Tron Virtual Machine - Allowed values: `tvm` - `energyFee` (string, required) — The energy fee in sun for the Tron transaction - `bandwidthFee` (string, required) — The bandwidth fee in sun for the Tron transaction - `total` (string, required) — The total network fee in sun (energyFee + bandwidthFee) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems0 - `chainId` (double, required) — The chain ID where this step will be executed - `sellToken` (string, required) — The input token address for this step - `buyToken` (string, required) — The output token address for this step - `amount` (string, required) — The amount of tokens for this step in token base units - `type` (enum, required) - Allowed values: `wrap` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems1 - `chainId` (double, required) — The chain ID where this step will be executed - `sellToken` (string, required) — The input token address for this step - `buyToken` (string, required) — The output token address for this step - `amount` (string, required) — The amount of tokens for this step in token base units - `type` (enum, required) - Allowed values: `unwrap` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems2 - `type` (enum, required) - Allowed values: `swap` - `chainId` (double, required) — The chain ID where this swap will be executed - `sellToken` (string, required) — The input token address for this swap - `buyToken` (string, required) — The output token address for this swap - `sellAmount` (string, required) — The input amount for this swap in token base units - `buyAmount` (string, required) — The output amount for this swap in token base units - `minBuyAmount` (string, required) — The minimum output amount for this swap in token base units - `estimatedTimeSeconds` (integer, required, nullable) — Estimated time for this swap step to complete ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItems3 - `type` (enum, required) - Allowed values: `bridge` - `originChainId` (double, required) — The chain ID where tokens will be sent from - `destinationChainId` (double, required) — The chain ID where tokens will be received - `sellToken` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItemsOneOf3SellToken, required) — The token address on the origin chain - `buyToken` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItemsOneOf3BuyToken, required) — The token address on the destination chain - `sellAmount` (string, required) — The amount of tokens to bridge from the origin chain in token base units - `buyAmount` (string, required) — The amount of tokens to be received on the destination chain in token base units - `minBuyAmount` (string, required) — The minimum amount of tokens guaranteed on the destination chain in token base units - `provider` (string, required) — The bridge provider name handling this cross-chain transfer - `estimatedTimeSeconds` (integer, required, nullable) — Estimated time for this bridge step to complete ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransaction0 - `chainType` (enum, required) — The blockchain type for Ethereum-compatible chains - Allowed values: `evm` - `details` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0Details, required) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransaction1 - `chainType` (enum, required) — The blockchain type for Solana Virtual Machine - Allowed values: `svm` - `details` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf1Details, required) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransaction2 - `chainType` (enum, required) — The blockchain type for Tron Virtual Machine - Allowed values: `tvm` - `details` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf2Details, required) ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesAllowance The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required - `actual` (string, required) — The `originAddress`'s current allowance of the `spender` - `spender` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesAllowanceSpender, required) — The address to set the allowance on ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesBalance The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance - `token` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesBalanceToken, required) — The contract address of the `sellToken` - `actual` (string, required) — The current balance of `sellToken` in the `originAddress` address - `expected` (string, required) — The balance of `sellToken` required for the swap to execute successfully ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeeToken The contract address of the token in which the integrator collected a fee ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesIntegratorFeesItemsToken The contract address of the token in which the integrator collected a fee ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesZeroExFeeToken The contract address of the token in which 0x collected a fee ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesProviderAppFeeToken The contract address of the token in which the provider collected an app fee ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesBridgeNativeFeeToken The contract address of the token in which the bridge fee is collected ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsFeesReimbursementFeeToken The contract address of the token in which the reimbursement fee is collected ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf0GasPrice The gas price in wei used for cost estimation ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf0TotalNetworkFee The estimated total network cost of the swap. On chains where there is no L1 data cost, it is calculated as `gas` * `gasPrice`. On chains where there is an L1 data cost, it is calculated as `gas` * `gasPrice + L1 data` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsGasCostsOneOf1Priority The priority fee in lamports for faster transaction processing ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItemsOneOf3SellToken The token address on the origin chain ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsStepsItemsOneOf3BuyToken The token address on the destination chain ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0Details - `to` (string, required) — The contract address to send the transaction to on the EVM chain - `data` (string, required) — The calldata containing execution details for the EVM transaction - `gas` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0DetailsGas, required, nullable) — The estimated gas limit required for successful transaction execution - `gasPrice` (CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0DetailsGasPrice, required, nullable) — The gas price in wei for the EVM transaction - `value` (string, required) — The amount of native currency in wei to send with the transaction ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf1Details - `serializedTransaction` (string, required) — The base64-encoded serialized Solana transaction ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf2Details - `to` (string, required) — The Tron contract address to interact with - `data` (string, required) — The calldata for the Tron smart contract call - `value` (string, required) — The amount of TRX in sun to send with the transaction - `ownerAddress` (string, required) — The Tron address of the transaction sender - `memo` (string, optional) — Optional memo attached to the Tron transaction ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesAllowanceSpender The address to set the allowance on ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsIssuesBalanceToken The contract address of the `sellToken` ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0DetailsGas The estimated gas limit required for successful transaction execution ### CrossChainQuotesGetResponsesContentApplicationJsonSchemaOneOf0QuotesItemsTransactionOneOf0DetailsGasPrice The gas price in wei for the EVM transaction ## Examples **Response** ```json { "liquidityAvailable": true, "allowanceTarget": "string", "originChainId": 8453, "originChain": "base", "destinationChainId": 42161, "destinationChain": "arbitrum", "sellToken": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "buyToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "issues": { "allowance": null, "balance": { "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "actual": 0, "expected": 2570 }, "simulationIncomplete": false, "invalidSwapSourcesPassed": [], "invalidBridgesPassed": [] }, "zid": "0xbed7b45844099af94219ba8c", "quotes": [ { "sellAmount": 2570, "buyAmount": 2972100, "minBuyAmount": 2942339, "fees": { "integratorFee": null, "integratorFees": [ { "amount": 1, "token": "string", "type": "volume", "collectedBy": "relay" } ], "zeroExFee": { "amount": 6, "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "type": "volume", "collectedBy": "relay" }, "providerAppFee": null, "bridgeNativeFee": null }, "gasCosts": { "chainType": "evm", "gasPrice": 11550962, "gasLimit": 672945, "totalNetworkFee": 7790577030769 }, "steps": [ { "type": "swap", "chainId": 8453, "sellToken": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "buyToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "sellAmount": 2564, "buyAmount": 2979865, "minBuyAmount": 2950101, "estimatedTimeSeconds": 0 }, { "type": "bridge", "originChainId": 8453, "destinationChainId": 42161, "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "buyToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "sellAmount": 2979865, "buyAmount": 2972100, "minBuyAmount": 2942339, "provider": "across_v3", "estimatedTimeSeconds": 3 } ], "transaction": { "chainType": "evm", "details": { "to": "0x0000000000001ff3684f28c67538d4d072c22734", "data": "0x2213bc0b...", "gas": 672945, "gasPrice": 0, "value": 0 } }, "estimatedTimeSeconds": 3, "issues": { "allowance": null, "balance": { "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "actual": 0, "expected": 2570 }, "simulationIncomplete": false }, "quoteId": "0xbed7b45844099af94219ba8c00000001" } ] } ``` **SDK Code** ```python Cross-Chain_crossChain::getQuotes_example import requests url = "https://api.0x.org/cross-chain/quotes" querystring = {"originChain":"8453","destinationChain":"42161","sellToken":"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","buyToken":"0xaf88d065e77c8cc2239327c5edb3a432268e5831","sellAmount":"2570","originAddress":"0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C","destinationAddress":"0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C","sortQuotesBy":"speed"} headers = {"0x-api-key": "0x-api-key"} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Cross-Chain_crossChain::getQuotes_example const url = 'https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed'; const options = {method: 'GET', headers: {'0x-api-key': '0x-api-key'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cross-Chain_crossChain::getQuotes_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("0x-api-key", "0x-api-key") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cross-Chain_crossChain::getQuotes_example require 'uri' require 'net/http' url = URI("https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["0x-api-key"] = '0x-api-key' response = http.request(request) puts response.read_body ``` ```java Cross-Chain_crossChain::getQuotes_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed") .header("0x-api-key", "0x-api-key") .asString(); ``` ```php Cross-Chain_crossChain::getQuotes_example request('GET', 'https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed', [ 'headers' => [ '0x-api-key' => '0x-api-key', ], ]); echo $response->getBody(); ``` ```csharp Cross-Chain_crossChain::getQuotes_example using RestSharp; var client = new RestClient("https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed"); var request = new RestRequest(Method.GET); request.AddHeader("0x-api-key", "0x-api-key"); IRestResponse response = client.Execute(request); ``` ```swift Cross-Chain_crossChain::getQuotes_example import Foundation let headers = ["0x-api-key": "0x-api-key"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.0x.org/cross-chain/quotes?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&sortQuotesBy=speed")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Developer documentation for the 0x API. Embed swaps in your onchain app. Access 10+ million tokens with liquidity from 150+ exchanges with a single API.