> 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-stream-quotes/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.0x.org/_mcp/server. # streamQuotes GET https://api.0x.org/cross-chain/quotes/stream Stream cross-chain quotes as they become available Reference: https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-stream-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. - `maxNumQuotes` (integer, optional, default: 5) — 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 - `zid` (string, required) — The unique ZeroEx identifier of the request - `event` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEvent, required) — The streaming event containing either quote data or final result ## Errors ### 400 Bad Request Error 400 error response - `CrossChain::streamQuotesRequestBadRequestError` ### 403 Forbidden Error 403 error response - `CrossChain::streamQuotesRequestForbiddenError` ### 422 Unprocessable Entity Error 422 error response - `CrossChain::streamQuotesRequestUnprocessableEntityError` ### 500 Internal Server Error 500 error response - `CrossChain::streamQuotesRequestInternalServerError` ## Types ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEvent The streaming event containing either quote data or final result ### 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) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEvent0 - `type` (enum, required) — Event type indicating a new quote has been found - Allowed values: `quote` - `data` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0Data, required) — The quote data containing swap details and allowance information ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEvent1 - `type` (enum, required) — Event type indicating the final result of the quote search - Allowed values: `result` - `data` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf1Data, required) — The final result indicating whether any liquidity was available ### 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0Data The quote data containing swap details and allowance information - `quote` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuote, required) — The cross-chain quote details including steps, fees, and transaction information - `allowanceTarget` (string, optional) — The contract address that needs token allowance approval for this quote ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf1Data The final result indicating whether any liquidity was available - `liquidityAvailable` (boolean, required) — Whether any liquidity was found for the requested cross-chain swap ### InputInvalidDataDetailsItems - `field` (string, required) — The input field name - `reason` (string, required) — The validation failure reason ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuote The cross-chain quote details including steps, fees, and transaction information - `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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFees, required) — All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees - `gasCosts` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCosts, required) — Estimated gas costs for executing the transaction on the origin chain, formatted by chain type - `steps` (list of CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems, required) — Sequential steps required to complete the cross-chain swap, including wrapping, swaps, and bridge operations - `transaction` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransaction, 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssues, required) - `quoteId` (string, required) — The unique ID for this cross-chain quote ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFees All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees - `integratorFee` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFee, required, nullable) — The details about the first fee collected by the integrator - `integratorFees` (list of CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeesItems, required, nullable) — The details about the fees collected by the integrator - `zeroExFee` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesZeroExFee, required, nullable) — The details about the fee collected by 0x - `providerAppFee` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesProviderAppFee, 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesBridgeNativeFee, required, nullable) — Native fee required by the bridge provider for cross-chain message passing that will be added to the transaction value - `reimbursementFee` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesReimbursementFee, optional) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCosts Estimated gas costs for executing the transaction on the origin chain, formatted by chain type ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransaction The transaction details to execute on the origin chain to initiate the cross-chain swap ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssues - `allowance` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesAllowance, required, nullable) — The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required - `balance` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesBalance, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFee 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeeToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeesItems - `amount` (string, required) — The amount of the integrator fee in token's base units - `token` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeesItemsToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesZeroExFee The details about the fee collected by 0x - `amount` (string, required) — The 0x fee in token's base units - `token` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesZeroExFeeToken, 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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesProviderAppFee 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesProviderAppFeeToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesBridgeNativeFee 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesBridgeNativeFeeToken, 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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesReimbursementFee - `amount` (string, required) — The reimbursement fee amount in token's base units - `token` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesReimbursementFeeToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCosts0 - `chainType` (enum, required) — The blockchain type for Ethereum-compatible chains - Allowed values: `evm` - `gasPrice` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf0GasPrice, required, nullable) — The gas price in wei used for cost estimation - `gasLimit` (string, required) — The estimated gas limit required for successful execution - `totalNetworkFee` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf0TotalNetworkFee, 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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCosts1 - `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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf1Priority, required, nullable) — The priority fee in lamports for faster transaction processing - `total` (string, required) — The total fee in lamports (base + priority) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCosts2 - `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) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems0 - `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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems1 - `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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems2 - `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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItems3 - `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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItemsOneOf3SellToken, required) — The token address on the origin chain - `buyToken` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItemsOneOf3BuyToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransaction0 - `chainType` (enum, required) — The blockchain type for Ethereum-compatible chains - Allowed values: `evm` - `details` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0Details, required) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransaction1 - `chainType` (enum, required) — The blockchain type for Solana Virtual Machine - Allowed values: `svm` - `details` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf1Details, required) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransaction2 - `chainType` (enum, required) — The blockchain type for Tron Virtual Machine - Allowed values: `tvm` - `details` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf2Details, required) ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesAllowance 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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesAllowanceSpender, required) — The address to set the allowance on ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesBalance The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance - `token` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesBalanceToken, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeeToken The contract address of the token in which the integrator collected a fee ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesIntegratorFeesItemsToken The contract address of the token in which the integrator collected a fee ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesZeroExFeeToken The contract address of the token in which 0x collected a fee ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesProviderAppFeeToken The contract address of the token in which the provider collected an app fee ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesBridgeNativeFeeToken The contract address of the token in which the bridge fee is collected ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteFeesReimbursementFeeToken The contract address of the token in which the reimbursement fee is collected ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf0GasPrice The gas price in wei used for cost estimation ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf0TotalNetworkFee 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` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteGasCostsOneOf1Priority The priority fee in lamports for faster transaction processing ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItemsOneOf3SellToken The token address on the origin chain ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteStepsItemsOneOf3BuyToken The token address on the destination chain ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0Details - `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` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0DetailsGas, required, nullable) — The estimated gas limit required for successful transaction execution - `gasPrice` (CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0DetailsGasPrice, 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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf1Details - `serializedTransaction` (string, required) — The base64-encoded serialized Solana transaction ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf2Details - `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 ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesAllowanceSpender The address to set the allowance on ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteIssuesBalanceToken The contract address of the `sellToken` ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0DetailsGas The estimated gas limit required for successful transaction execution ### CrossChainQuotesStreamGetResponsesContentApplicationJsonSchemaEventOneOf0DataQuoteTransactionOneOf0DetailsGasPrice The gas price in wei for the EVM transaction ## Examples **Response** ```json { "zid": "0xbed7b45844099af94219ba8c", "event": { "type": "quote", "data": { "quote": { "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" }, "allowanceTarget": "0x0000000000001ff3684f28c67538d4d072c22734" } } } ``` **SDK Code** ```python Cross-Chain_crossChain::streamQuotes_example import requests url = "https://api.0x.org/cross-chain/quotes/stream" querystring = {"originChain":"8453","destinationChain":"42161","sellToken":"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","buyToken":"0xaf88d065e77c8cc2239327c5edb3a432268e5831","sellAmount":"2570","originAddress":"0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C","destinationAddress":"0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C"} headers = {"0x-api-key": "0x-api-key"} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Cross-Chain_crossChain::streamQuotes_example const url = 'https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C'; 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::streamQuotes_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C" 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::streamQuotes_example require 'uri' require 'net/http' url = URI("https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C") 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::streamQuotes_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C") .header("0x-api-key", "0x-api-key") .asString(); ``` ```php Cross-Chain_crossChain::streamQuotes_example request('GET', 'https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C', [ 'headers' => [ '0x-api-key' => '0x-api-key', ], ]); echo $response->getBody(); ``` ```csharp Cross-Chain_crossChain::streamQuotes_example using RestSharp; var client = new RestClient("https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C"); var request = new RestRequest(Method.GET); request.AddHeader("0x-api-key", "0x-api-key"); IRestResponse response = client.Execute(request); ``` ```swift Cross-Chain_crossChain::streamQuotes_example import Foundation let headers = ["0x-api-key": "0x-api-key"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.0x.org/cross-chain/quotes/stream?originChain=8453&destinationChain=42161&sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831&sellAmount=2570&originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C&destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C")! 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.