# Cross Chain

Cross-Chain API endpoints

## getQuotes

> Get the quotes for a cross chain swap

```json
{"openapi":"3.0.3","info":{"title":"0x Cross-Chain API","version":"v1"},"tags":[{"name":"Cross-Chain","description":"Cross-Chain API endpoints"}],"servers":[{"url":"https://api.0x.org"}],"paths":{"/cross-chain/quotes":{"get":{"operationId":"crossChain::getQuotes","summary":"getQuotes","description":"Get the quotes for a cross chain swap","tags":["Cross-Chain"],"parameters":[{"description":"Visit dashboard.0x.org to get your API Key","in":"header","name":"0x-api-key","required":true,"schema":{"type":"string"}},{"name":"originChain","in":"query","required":true,"schema":{"type":"string"},"description":"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"},{"name":"destinationChain","in":"query","required":true,"schema":{"type":"string"},"description":"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"},{"name":"sellToken","in":"query","required":true,"schema":{"type":"string"},"description":"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)"},{"name":"buyToken","in":"query","required":true,"schema":{"type":"string"},"description":"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)"},{"name":"sellAmount","in":"query","required":true,"schema":{"type":"string","pattern":"^-?(0|[1-9]\\d*)$"},"description":"The amount of `sellToken` (in `sellToken`'s base units) to sell on the origin chain"},{"name":"originAddress","in":"query","required":true,"schema":{"type":"string"},"description":"The wallet address on the origin chain that holds the sellToken balance and will initiate the cross-chain transaction"},{"name":"destinationAddress","in":"query","required":false,"schema":{"type":"string"},"description":"The wallet address on the destination chain that will receive the buyToken. If not specified, defaults to originAddress on the destination chain"},{"name":"gasPayer","in":"query","required":false,"schema":{"type":"string"},"description":"The Solana address that will pay for transaction fees when the origin chain is Solana. Only applicable for Solana origin chains"},{"name":"slippageBps","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":10000,"default":100},"description":"The maximum acceptable slippage for each swap or bridge step of the cross-chain swap in basis points (100 = 1%)"},{"name":"excludedBridges","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of bridge providers to exclude from routing"},{"name":"includedBridges","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of bridge providers to include in routing. Mutually exclusive with excludedBridges"},{"name":"excludedSwapSources","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of DEX sources to exclude from routing on both chains"},{"name":"feeBps","in":"query","required":false,"schema":{"type":"string","default":""},"description":"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."},{"name":"feeRecipient","in":"query","required":false,"schema":{"type":"string","default":""},"description":"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."},{"name":"feeToken","in":"query","required":false,"schema":{"type":"string","default":""},"description":"The EVM 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."},{"name":"sortQuotesBy","in":"query","required":true,"schema":{"type":"string","enum":["speed","price"]},"description":"How to sort the returned quotes - either by speed (fastest execution time) or price (best exchange rate)"},{"name":"maxNumQuotes","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10,"default":3},"description":"The maximum number of cross-chain quotes to return, between 1 and 10. Each quote represents a different combination of bridges and DEXs"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"liquidityAvailable":{"type":"boolean","enum":[true],"description":"Whether sufficient liquidity exists across bridges and DEXs to execute the cross-chain swap"},"allowanceTarget":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"nullable":true,"description":"The contract address to set the allowance on, if necessary"},"originChainId":{"type":"number","description":"The numeric chain ID of the origin chain where the swap begins"},"originChain":{"type":"string","description":"The name of the origin chain where the swap begins"},"destinationChainId":{"type":"number","description":"The numeric chain ID of the destination chain where tokens will be received"},"destinationChain":{"type":"string","description":"The name of the destination chain where tokens will be received"},"sellToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the token being sold on the origin chain"},"buyToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the token being bought on the destination chain"},"issues":{"type":"object","properties":{"allowance":{"type":"object","properties":{"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The `originAddress`'s current allowance of the `spender`"},"spender":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The address to set the allowance on"}},"required":["actual","spender"],"additionalProperties":false,"description":"The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required","nullable":true},"balance":{"type":"object","properties":{"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the `sellToken`"},"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The current balance of the `sellToken` in the `originAddress` address"},"expected":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The balance of `sellToken` required for the swap to execute successfully"}},"required":["token","actual","expected"],"additionalProperties":false,"description":"The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance","nullable":true},"simulationIncomplete":{"type":"boolean","description":"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":{"type":"array","items":{"type":"string"},"description":"List of invalid swap sources specified in the `excludedSwapSources` parameter"},"invalidBridgesPassed":{"type":"array","items":{"type":"string"},"description":"List of invalid bridge providers specified in the `excludedBridges` or `includedBridges` parameter"}},"required":["allowance","balance","simulationIncomplete","invalidSwapSourcesPassed","invalidBridgesPassed"],"additionalProperties":false},"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"quotes":{"type":"array","items":{"type":"object","properties":{"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of sellToken (in sellToken base units) required on the origin chain"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The estimated amount of `buyToken` (in `buyToken`'s base units) to be received on the destination chain"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum amount of buyToken guaranteed across the entire cross-chain quote. This price is influenced by the `slippageBps` parameter"},"fees":{"type":"object","properties":{"integratorFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of the integrator fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the integrator collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"The details about the first fee collected by the integrator"},"integratorFees":{"type":"array","items":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of the integrator fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the integrator collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false},"nullable":true,"description":"The details about the fees collected by the integrator"},"zeroExFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The 0x fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which 0x collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"The details about the fee collected by 0x"},"bridgeNativeFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The bridge fee amount in token's base units that will be added to the transaction value"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the token in which the bridge fee is collected"},"type":{"type":"string","enum":["native"],"description":"The fee type indicating it is a native bridge fee"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"Native fee required by the bridge provider for cross-chain message passing that will be added to the transaction value"},"reimbursementFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The reimbursement fee amount in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the reimbursement fee is collected"},"recipient":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The wallet address that receives the reimbursement fee"}},"required":["amount","token","recipient"],"additionalProperties":false}},"required":["integratorFee","integratorFees","zeroExFee","bridgeNativeFee"],"additionalProperties":false,"description":"All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees"},"gasCosts":{"anyOf":[{"type":"object","properties":{"chainType":{"type":"string","enum":["evm"],"description":"The blockchain type for Ethereum-compatible chains"},"gasPrice":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The gas price in wei used for cost estimation"},"gasLimit":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The estimated gas limit required for successful execution"},"totalNetworkFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"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`"}},"required":["chainType","gasPrice","gasLimit","totalNetworkFee"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["svm"],"description":"The blockchain type for Solana Virtual Machine"},"base":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The base transaction fee in lamports for Solana"},"priority":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The priority fee in lamports for faster transaction processing"},"total":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The total fee in lamports (base + priority)"}},"required":["chainType","base","priority","total"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["tvm"],"description":"The blockchain type for Tron Virtual Machine"},"energyFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The energy fee in sun for the Tron transaction"},"bandwidthFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The bandwidth fee in sun for the Tron transaction"},"total":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The total network fee in sun (energyFee + bandwidthFee)"}},"required":["chainType","energyFee","bandwidthFee","total"],"additionalProperties":false}],"description":"Estimated gas costs for executing the transaction on the origin chain, formatted by chain type"},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"type":{"type":"string","enum":["wrap"]}},"required":["chainId","sellToken","buyToken","amount","type"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"type":{"type":"string","enum":["unwrap"]}},"required":["chainId","sellToken","buyToken","amount","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["swap"]},"chainId":{"type":"number","description":"The chain ID where this swap will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this swap"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this swap"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The input amount for this swap in token base units"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The output amount for this swap in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum output amount for this swap in token base units"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this swap step to complete"}},"required":["type","chainId","sellToken","buyToken","sellAmount","buyAmount","minBuyAmount","estimatedTimeSeconds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bridge"]},"originChainId":{"type":"number","description":"The chain ID where tokens will be sent from"},"destinationChainId":{"type":"number","description":"The chain ID where tokens will be received"},"sellToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The token address on the origin chain"},"buyToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The token address on the destination chain"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens to bridge from the origin chain in token base units"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens to be received on the destination chain in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum amount of tokens guaranteed on the destination chain in token base units"},"provider":{"type":"string","description":"The bridge provider name handling this cross-chain transfer"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this bridge step to complete"}},"required":["type","originChainId","destinationChainId","sellToken","buyToken","sellAmount","buyAmount","minBuyAmount","provider","estimatedTimeSeconds"],"additionalProperties":false}]},"description":"Sequential steps required to complete the cross-chain swap, including wrapping, swaps, and bridge operations"},"transaction":{"anyOf":[{"type":"object","properties":{"chainType":{"type":"string","enum":["evm"],"description":"The blockchain type for Ethereum-compatible chains"},"details":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The contract address to send the transaction to on the EVM chain"},"data":{"type":"string","description":"The calldata containing execution details for the EVM transaction"},"gas":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The estimated gas limit required for successful transaction execution"},"gasPrice":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The gas price in wei for the EVM transaction"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of native currency in wei to send with the transaction"}},"required":["to","data","gas","gasPrice","value"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["svm"],"description":"The blockchain type for Solana Virtual Machine"},"details":{"type":"object","properties":{"serializedTransaction":{"type":"string","description":"The base64-encoded serialized Solana transaction"}},"required":["serializedTransaction"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["tvm"],"description":"The blockchain type for Tron Virtual Machine"},"details":{"type":"object","properties":{"to":{"type":"string","description":"The Tron contract address to interact with"},"data":{"type":"string","description":"The calldata for the Tron smart contract call"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of TRX in sun to send with the transaction"},"ownerAddress":{"type":"string","description":"The Tron address of the transaction sender"},"memo":{"type":"string","description":"Optional memo attached to the Tron transaction"}},"required":["to","data","value","ownerAddress"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false}],"description":"The transaction details to execute on the origin chain to initiate the cross-chain swap"},"estimatedTimeSeconds":{"type":"number","minimum":0,"nullable":true,"description":"Estimated total time in seconds for the cross-chain swap to complete, including bridge confirmation time"},"issues":{"type":"object","properties":{"allowance":{"type":"object","properties":{"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The `originAddress`'s current allowance of the `spender`"},"spender":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The address to set the allowance on"}},"required":["actual","spender"],"additionalProperties":false,"description":"The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required","nullable":true},"balance":{"type":"object","properties":{"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the `sellToken`"},"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The current balance of `sellToken` in the `originAddress` address"},"expected":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The balance of `sellToken` required for the swap to execute successfully"}},"required":["token","actual","expected"],"additionalProperties":false,"description":"The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance","nullable":true},"simulationIncomplete":{"type":"boolean","description":"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"}},"required":["allowance","balance","simulationIncomplete"],"additionalProperties":false},"quoteId":{"type":"string","description":"The unique ID for this cross-chain quote"}},"required":["sellAmount","buyAmount","minBuyAmount","fees","gasCosts","steps","transaction","estimatedTimeSeconds","issues","quoteId"],"additionalProperties":false},"minItems":1,"description":"Array of available cross-chain quotes, each representing a different combination of bridges and DEXs"}},"required":["liquidityAvailable","allowanceTarget","originChainId","originChain","destinationChainId","destinationChain","sellToken","buyToken","issues","zid","quotes"],"additionalProperties":false},{"type":"object","properties":{"liquidityAvailable":{"type":"boolean","enum":[false],"description":"Whether sufficient liquidity exists across bridges and DEXs to execute the cross-chain swap"},"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["liquidityAvailable","zid"],"additionalProperties":false}]}}}},"400":{"description":"400 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INPUT_INVALID"}]}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INTERNAL_SERVER_ERROR"},{"$ref":"#/components/schemas/UNCATEGORIZED"}]}}}}}}}},"components":{"schemas":{"INPUT_INVALID":{"type":"object","properties":{"name":{"type":"string","enum":["INPUT_INVALID"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The input field name"},"reason":{"type":"string","description":"The validation failure reason"}},"required":["field","reason"],"additionalProperties":false},"description":"The list of invalid inputs"}},"required":["zid","details"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"INTERNAL_SERVER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"UNCATEGORIZED":{"type":"object","properties":{"name":{"type":"string","enum":["UNCATEGORIZED"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false}}}}
```

## getStatus

> Get the status of a cross chain transaction

```json
{"openapi":"3.0.3","info":{"title":"0x Cross-Chain API","version":"v1"},"tags":[{"name":"Cross-Chain","description":"Cross-Chain API endpoints"}],"servers":[{"url":"https://api.0x.org"}],"paths":{"/cross-chain/status":{"get":{"operationId":"crossChain::getStatus","summary":"getStatus","description":"Get the status of a cross chain transaction","tags":["Cross-Chain"],"parameters":[{"description":"Visit dashboard.0x.org to get your API Key","in":"header","name":"0x-api-key","required":true,"schema":{"type":"string"}},{"name":"originChain","in":"query","required":true,"schema":{"type":"string"},"description":"The origin chain where the cross-chain transaction was initiated"},{"name":"originTxHash","in":"query","required":true,"schema":{"type":"string"},"description":"The transaction hash on the origin chain to track. Format varies by chain type (32-byte hex for EVM/HyperCore, base58 signature for Solana, 64-char hex for Tron)"},{"name":"quoteId","in":"query","required":false,"schema":{"type":"string"},"description":"The quote ID associated with the cross-chain transaction"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["origin_tx_pending","origin_tx_succeeded","origin_tx_confirmed","origin_tx_reverted","bridge_pending","bridge_filled","bridge_failed","unknown"],"description":"The current status of the cross-chain transaction"},"bridge":{"type":"string","description":"The bridge provider handling the cross-chain transfer"},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"The transactions involved in this step"},"type":{"type":"string","enum":["wrap"]}},"required":["chainId","sellToken","buyToken","amount","transactions","type"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"The transactions involved in this step"},"type":{"type":"string","enum":["unwrap"]}},"required":["chainId","sellToken","buyToken","amount","transactions","type"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this swap will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this swap"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this swap"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The input amount for this swap in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum output amount for this swap in token base units"},"quotedBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The quoted output amount for this swap in token base units"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this swap step to complete"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"The transactions involved in this step"},"type":{"type":"string","enum":["swap"]}},"required":["chainId","sellToken","buyToken","sellAmount","minBuyAmount","quotedBuyAmount","estimatedTimeSeconds","transactions","type"],"additionalProperties":false},{"type":"object","properties":{"bridge":{"type":"string","description":"The bridge provider"},"originChainId":{"type":"number","description":"The origin chain ID"},"destinationChainId":{"type":"number","description":"The destination chain ID"},"sellToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The input token address for this bridge"},"buyToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The output token address for this bridge"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The input amount for this bridge in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum output amount for this bridge in token base units"},"quotedBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The quoted output amount for this bridge in token base units"},"settledBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The settled output amount for this bridge in token base units"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this bridge step to complete"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"The transactions involved in this step"},"type":{"type":"string","enum":["bridge"]}},"required":["bridge","originChainId","destinationChainId","sellToken","buyToken","sellAmount","minBuyAmount","quotedBuyAmount","settledBuyAmount","estimatedTimeSeconds","transactions","type"],"additionalProperties":false}]},"description":"The steps involved in the cross-chain transaction"},"failure":{"type":"object","properties":{"reason":{"type":"string","description":"The reason for the failure"},"status":{"type":"string","enum":["refund_pending","refund_succeeded","manual_action_required","no_actions_required","failed"],"description":"The status of the failure"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"The transactions involved in the failure"},"recovery":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this recovery step will be executed"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The token address of the funds to be recovered"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens to be recovered in token base units"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this recovery step to finish, measured from when the recovery process begins"},"deadline":{"type":"integer","minimum":0,"nullable":true,"description":"The deadline timestamp of which the funds are available for recovery, if applicable. Not initiating the recovery process within this deadline may result in funds being forever lost"},"manualTransaction":{"anyOf":[{"type":"object","properties":{"chainType":{"type":"string","enum":["evm"],"description":"The blockchain type for Ethereum-compatible chains"},"details":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The contract address to send the transaction to on the EVM chain"},"data":{"type":"string","description":"The calldata containing execution details for the EVM transaction"},"gas":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The estimated gas limit required for successful transaction execution"},"gasPrice":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The gas price in wei for the EVM transaction"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of native currency in wei to send with the transaction"}},"required":["to","data","gas","gasPrice","value"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["svm"],"description":"The blockchain type for Solana Virtual Machine"},"details":{"type":"object","properties":{"serializedTransaction":{"type":"string","description":"The base64-encoded serialized Solana transaction"}},"required":["serializedTransaction"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["tvm"],"description":"The blockchain type for Tron Virtual Machine"},"details":{"type":"object","properties":{"to":{"type":"string","description":"The Tron contract address to interact with"},"data":{"type":"string","description":"The calldata for the Tron smart contract call"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of TRX in sun to send with the transaction"},"ownerAddress":{"type":"string","description":"The Tron address of the transaction sender"},"memo":{"type":"string","description":"Optional memo attached to the Tron transaction"}},"required":["to","data","value","ownerAddress"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false}],"nullable":true,"description":"The manual transaction for submission, if applicable. This transaction may be submitted by anyone to initiate the recovery process"},"settledAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The actual settled refund amount in token base units"}},"required":["chainId","token","amount","estimatedTimeSeconds","deadline","manualTransaction","settledAmount"],"additionalProperties":false,"nullable":true,"description":"The recovery step for the failure"}},"required":["reason","status","transactions","recovery"],"additionalProperties":false,"nullable":true,"description":"The failure context for the cross-chain transaction"},"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this transaction occurred"},"chain":{"type":"string","description":"The name of the chain where this transaction occurred"},"txHash":{"type":"string","nullable":true,"description":"The transaction hash on this specific chain"},"timestamp":{"type":"integer","exclusiveMinimum":true,"minimum":0,"description":"Unix timestamp when this transaction was confirmed on-chain"}},"required":["chainId","chain","txHash","timestamp"],"additionalProperties":false},"description":"List of all blockchain transactions involved in this cross-chain swap, across multiple chains"},"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["status","steps","failure","transactions","zid"],"additionalProperties":false}}}},"400":{"description":"400 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INPUT_INVALID"}]}}}},"404":{"description":"404 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BRIDGE_UNKNOWN"},{"$ref":"#/components/schemas/TRANSACTION_NOT_FOUND"}]}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BRIDGE_PROVIDER_ERROR"},{"$ref":"#/components/schemas/INTERNAL_SERVER_ERROR"},{"$ref":"#/components/schemas/UNCATEGORIZED"}]}}}}}}}},"components":{"schemas":{"INPUT_INVALID":{"type":"object","properties":{"name":{"type":"string","enum":["INPUT_INVALID"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The input field name"},"reason":{"type":"string","description":"The validation failure reason"}},"required":["field","reason"],"additionalProperties":false},"description":"The list of invalid inputs"}},"required":["zid","details"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"BRIDGE_UNKNOWN":{"type":"object","properties":{"name":{"type":"string","enum":["BRIDGE_UNKNOWN"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"originChain":{"type":"string","description":"The origin chain of the transaction"},"originTxHash":{"type":"string","description":"The hash of the transaction on the origin chain"}},"required":["zid","originChain","originTxHash"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"TRANSACTION_NOT_FOUND":{"type":"object","properties":{"name":{"type":"string","enum":["TRANSACTION_NOT_FOUND"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"originChain":{"type":"string"},"originTxHash":{"type":"string","description":"The hash of the transaction on the origin chain"}},"required":["zid","originChain","originTxHash"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"BRIDGE_PROVIDER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["BRIDGE_PROVIDER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"bridge":{"type":"string","description":"The bridge provider"}},"required":["zid","bridge"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"INTERNAL_SERVER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"UNCATEGORIZED":{"type":"object","properties":{"name":{"type":"string","enum":["UNCATEGORIZED"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false}}}}
```

## listSources

> List available swap and bridge sources for a cross chain swap

```json
{"openapi":"3.0.3","info":{"title":"0x Cross-Chain API","version":"v1"},"tags":[{"name":"Cross-Chain","description":"Cross-Chain API endpoints"}],"servers":[{"url":"https://api.0x.org"}],"paths":{"/cross-chain/sources":{"get":{"operationId":"crossChain::listSources","summary":"listSources","description":"List available swap and bridge sources for a cross chain swap","tags":["Cross-Chain"],"parameters":[{"description":"Visit dashboard.0x.org to get your API Key","in":"header","name":"0x-api-key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"bridges":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the bridge provider"},"chainPairs":{"type":"array","items":{"type":"object","properties":{"originChainId":{"type":"number","description":"The numeric chain ID of the origin chain"},"destinationChainId":{"type":"number","description":"The numeric chain ID of the destination chain"}},"required":["originChainId","destinationChainId"],"additionalProperties":false},"description":"Origin-destination chain pairs supported by the bridge provider"}},"required":["name","chainPairs"],"additionalProperties":false},"description":"The array of bridge providers and their supported chain pairs"},"swapSources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the liquidity sources aggregated by 0x"},"chainIds":{"type":"array","items":{"type":"number"},"description":"The numeric chain IDs of the chains supported by the liquidity source"}},"required":["name","chainIds"],"additionalProperties":false},"description":"The array of liquidity sources and their supported chains"},"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["bridges","swapSources","zid"],"additionalProperties":false}}}},"400":{"description":"400 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INPUT_INVALID"}]}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INTERNAL_SERVER_ERROR"},{"$ref":"#/components/schemas/UNCATEGORIZED"}]}}}}}}}},"components":{"schemas":{"INPUT_INVALID":{"type":"object","properties":{"name":{"type":"string","enum":["INPUT_INVALID"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The input field name"},"reason":{"type":"string","description":"The validation failure reason"}},"required":["field","reason"],"additionalProperties":false},"description":"The list of invalid inputs"}},"required":["zid","details"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"INTERNAL_SERVER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"UNCATEGORIZED":{"type":"object","properties":{"name":{"type":"string","enum":["UNCATEGORIZED"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false}}}}
```

## getTxHistory

> Get cross-chain transaction history for a user wallet address

```json
{"openapi":"3.0.3","info":{"title":"0x Cross-Chain API","version":"v1"},"tags":[{"name":"Cross-Chain","description":"Cross-Chain API endpoints"}],"servers":[{"url":"https://api.0x.org"}],"paths":{"/cross-chain/tx-history-beta":{"get":{"operationId":"crossChain::getTxHistory","summary":"getTxHistory","description":"Get cross-chain transaction history for a user wallet address","tags":["Cross-Chain"],"parameters":[{"description":"Visit dashboard.0x.org to get your API Key","in":"header","name":"0x-api-key","required":true,"schema":{"type":"string"}},{"name":"user","in":"query","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string"}]},"description":"The wallet address of the user to get transaction history for. Accepts EVM (0x...), Solana, and Tron addresses"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Maximum number of transactions to return"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"originChain":{"type":"number","description":"The origin chain ID"},"originTx":{"type":"string","description":"The transaction hash on the origin chain"},"destinationChain":{"type":"number","nullable":true,"description":"The destination chain ID"},"destinationTx":{"type":"string","nullable":true,"description":"The transaction hash on the destination chain"},"status":{"type":"string","description":"The current status of the transaction"},"bridge":{"type":"string","nullable":true,"description":"The bridge provider used"}},"required":["originChain","originTx","destinationChain","destinationTx","status","bridge"],"additionalProperties":false},"description":"List of transaction history records"},"pagination":{"type":"object","properties":{"limit":{"type":"number","description":"The limit used for this query"},"nextCursor":{"type":"string","nullable":true,"description":"Cursor for next page. Null if no more results"},"hasMore":{"type":"boolean","description":"Whether there are more transactions available"}},"required":["limit","nextCursor","hasMore"],"additionalProperties":false,"description":"Pagination information"},"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["transactions","pagination","zid"],"additionalProperties":false}}}},"400":{"description":"400 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INPUT_INVALID"}]}}}},"404":{"description":"404 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TRANSACTION_NOT_FOUND"}]}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INTERNAL_SERVER_ERROR"},{"$ref":"#/components/schemas/UNCATEGORIZED"}]}}}}}}}},"components":{"schemas":{"INPUT_INVALID":{"type":"object","properties":{"name":{"type":"string","enum":["INPUT_INVALID"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The input field name"},"reason":{"type":"string","description":"The validation failure reason"}},"required":["field","reason"],"additionalProperties":false},"description":"The list of invalid inputs"}},"required":["zid","details"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"TRANSACTION_NOT_FOUND":{"type":"object","properties":{"name":{"type":"string","enum":["TRANSACTION_NOT_FOUND"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"originChain":{"type":"string"},"originTxHash":{"type":"string","description":"The hash of the transaction on the origin chain"}},"required":["zid","originChain","originTxHash"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"INTERNAL_SERVER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"UNCATEGORIZED":{"type":"object","properties":{"name":{"type":"string","enum":["UNCATEGORIZED"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false}}}}
```

## streamQuotes

> Stream cross-chain quotes as they become available

```json
{"openapi":"3.0.3","info":{"title":"0x Cross-Chain API","version":"v1"},"tags":[{"name":"Cross-Chain","description":"Cross-Chain API endpoints"}],"servers":[{"url":"https://api.0x.org"}],"paths":{"/cross-chain/quotes/stream":{"get":{"operationId":"crossChain::streamQuotes","summary":"streamQuotes","description":"Stream cross-chain quotes as they become available","tags":["Cross-Chain"],"parameters":[{"description":"Visit dashboard.0x.org to get your API Key","in":"header","name":"0x-api-key","required":true,"schema":{"type":"string"}},{"name":"originChain","in":"query","required":true,"schema":{"type":"string"},"description":"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"},{"name":"destinationChain","in":"query","required":true,"schema":{"type":"string"},"description":"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"},{"name":"sellToken","in":"query","required":true,"schema":{"type":"string"},"description":"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)"},{"name":"buyToken","in":"query","required":true,"schema":{"type":"string"},"description":"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)"},{"name":"sellAmount","in":"query","required":true,"schema":{"type":"string","pattern":"^-?(0|[1-9]\\d*)$"},"description":"The amount of `sellToken` (in `sellToken`'s base units) to sell on the origin chain"},{"name":"originAddress","in":"query","required":true,"schema":{"type":"string"},"description":"The wallet address on the origin chain that holds the sellToken balance and will initiate the cross-chain transaction"},{"name":"destinationAddress","in":"query","required":false,"schema":{"type":"string"},"description":"The wallet address on the destination chain that will receive the buyToken. If not specified, defaults to originAddress on the destination chain"},{"name":"gasPayer","in":"query","required":false,"schema":{"type":"string"},"description":"The Solana address that will pay for transaction fees when the origin chain is Solana. Only applicable for Solana origin chains"},{"name":"slippageBps","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":10000,"default":100},"description":"The maximum acceptable slippage for each swap or bridge step of the cross-chain swap in basis points (100 = 1%)"},{"name":"excludedBridges","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of bridge providers to exclude from routing"},{"name":"includedBridges","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of bridge providers to include in routing. Mutually exclusive with excludedBridges"},{"name":"excludedSwapSources","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of DEX sources to exclude from routing on both chains"},{"name":"feeBps","in":"query","required":false,"schema":{"type":"string","default":""},"description":"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."},{"name":"feeRecipient","in":"query","required":false,"schema":{"type":"string","default":""},"description":"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."},{"name":"feeToken","in":"query","required":false,"schema":{"type":"string","default":""},"description":"The EVM 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."},{"name":"maxNumQuotes","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10,"default":5},"description":"The maximum number of cross-chain quotes to return, between 1 and 10. Each quote represents a different combination of bridges and DEXs"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["quote"],"description":"Event type indicating a new quote has been found"},"data":{"type":"object","properties":{"quote":{"type":"object","properties":{"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of sellToken (in sellToken base units) required on the origin chain"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The estimated amount of `buyToken` (in `buyToken`'s base units) to be received on the destination chain"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum amount of buyToken guaranteed across the entire cross-chain quote. This price is influenced by the `slippageBps` parameter"},"fees":{"type":"object","properties":{"integratorFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of the integrator fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the integrator collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"The details about the first fee collected by the integrator"},"integratorFees":{"type":"array","items":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of the integrator fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the integrator collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false},"nullable":true,"description":"The details about the fees collected by the integrator"},"zeroExFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The 0x fee in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which 0x collected a fee"},"type":{"type":"string","enum":["volume"],"description":"The fee type indicating it is calculated as a percentage of trade volume"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"The details about the fee collected by 0x"},"bridgeNativeFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The bridge fee amount in token's base units that will be added to the transaction value"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the token in which the bridge fee is collected"},"type":{"type":"string","enum":["native"],"description":"The fee type indicating it is a native bridge fee"}},"required":["amount","token","type"],"additionalProperties":false,"nullable":true,"description":"Native fee required by the bridge provider for cross-chain message passing that will be added to the transaction value"},"reimbursementFee":{"type":"object","properties":{"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The reimbursement fee amount in token's base units"},"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"}],"description":"The contract address of the token in which the reimbursement fee is collected"},"recipient":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The wallet address that receives the reimbursement fee"}},"required":["amount","token","recipient"],"additionalProperties":false}},"required":["integratorFee","integratorFees","zeroExFee","bridgeNativeFee"],"additionalProperties":false,"description":"All fees associated with this cross-chain quote, including integrator fees, 0x protocol fees, and bridge native fees"},"gasCosts":{"anyOf":[{"type":"object","properties":{"chainType":{"type":"string","enum":["evm"],"description":"The blockchain type for Ethereum-compatible chains"},"gasPrice":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The gas price in wei used for cost estimation"},"gasLimit":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The estimated gas limit required for successful execution"},"totalNetworkFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"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`"}},"required":["chainType","gasPrice","gasLimit","totalNetworkFee"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["svm"],"description":"The blockchain type for Solana Virtual Machine"},"base":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The base transaction fee in lamports for Solana"},"priority":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The priority fee in lamports for faster transaction processing"},"total":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The total fee in lamports (base + priority)"}},"required":["chainType","base","priority","total"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["tvm"],"description":"The blockchain type for Tron Virtual Machine"},"energyFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The energy fee in sun for the Tron transaction"},"bandwidthFee":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The bandwidth fee in sun for the Tron transaction"},"total":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The total network fee in sun (energyFee + bandwidthFee)"}},"required":["chainType","energyFee","bandwidthFee","total"],"additionalProperties":false}],"description":"Estimated gas costs for executing the transaction on the origin chain, formatted by chain type"},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"type":{"type":"string","enum":["wrap"]}},"required":["chainId","sellToken","buyToken","amount","type"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"number","description":"The chain ID where this step will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this step"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this step"},"amount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens for this step in token base units"},"type":{"type":"string","enum":["unwrap"]}},"required":["chainId","sellToken","buyToken","amount","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["swap"]},"chainId":{"type":"number","description":"The chain ID where this swap will be executed"},"sellToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The input token address for this swap"},"buyToken":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The output token address for this swap"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The input amount for this swap in token base units"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The output amount for this swap in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum output amount for this swap in token base units"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this swap step to complete"}},"required":["type","chainId","sellToken","buyToken","sellAmount","buyAmount","minBuyAmount","estimatedTimeSeconds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bridge"]},"originChainId":{"type":"number","description":"The chain ID where tokens will be sent from"},"destinationChainId":{"type":"number","description":"The chain ID where tokens will be received"},"sellToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The token address on the origin chain"},"buyToken":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The token address on the destination chain"},"sellAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens to bridge from the origin chain in token base units"},"buyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of tokens to be received on the destination chain in token base units"},"minBuyAmount":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The minimum amount of tokens guaranteed on the destination chain in token base units"},"provider":{"type":"string","description":"The bridge provider name handling this cross-chain transfer"},"estimatedTimeSeconds":{"type":"integer","minimum":0,"nullable":true,"description":"Estimated time for this bridge step to complete"}},"required":["type","originChainId","destinationChainId","sellToken","buyToken","sellAmount","buyAmount","minBuyAmount","provider","estimatedTimeSeconds"],"additionalProperties":false}]},"description":"Sequential steps required to complete the cross-chain swap, including wrapping, swaps, and bridge operations"},"transaction":{"anyOf":[{"type":"object","properties":{"chainType":{"type":"string","enum":["evm"],"description":"The blockchain type for Ethereum-compatible chains"},"details":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$","description":"The contract address to send the transaction to on the EVM chain"},"data":{"type":"string","description":"The calldata containing execution details for the EVM transaction"},"gas":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The estimated gas limit required for successful transaction execution"},"gasPrice":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"nullable":true,"description":"The gas price in wei for the EVM transaction"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of native currency in wei to send with the transaction"}},"required":["to","data","gas","gasPrice","value"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["svm"],"description":"The blockchain type for Solana Virtual Machine"},"details":{"type":"object","properties":{"serializedTransaction":{"type":"string","description":"The base64-encoded serialized Solana transaction"}},"required":["serializedTransaction"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false},{"type":"object","properties":{"chainType":{"type":"string","enum":["tvm"],"description":"The blockchain type for Tron Virtual Machine"},"details":{"type":"object","properties":{"to":{"type":"string","description":"The Tron contract address to interact with"},"data":{"type":"string","description":"The calldata for the Tron smart contract call"},"value":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The amount of TRX in sun to send with the transaction"},"ownerAddress":{"type":"string","description":"The Tron address of the transaction sender"},"memo":{"type":"string","description":"Optional memo attached to the Tron transaction"}},"required":["to","data","value","ownerAddress"],"additionalProperties":false}},"required":["chainType","details"],"additionalProperties":false}],"description":"The transaction details to execute on the origin chain to initiate the cross-chain swap"},"estimatedTimeSeconds":{"type":"number","minimum":0,"nullable":true,"description":"Estimated total time in seconds for the cross-chain swap to complete, including bridge confirmation time"},"issues":{"type":"object","properties":{"allowance":{"type":"object","properties":{"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The `originAddress`'s current allowance of the `spender`"},"spender":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The address to set the allowance on"}},"required":["actual","spender"],"additionalProperties":false,"description":"The allowances that the `originAddress` must set in order to execute the swap successfully. Null if no allowance is required","nullable":true},"balance":{"type":"object","properties":{"token":{"anyOf":[{"type":"string","pattern":"^0x(?!0{40})[a-fA-F0-9]{40}$"},{"type":"string"},{"type":"string","pattern":"^0x[a-fA-F0-9]{32}$"},{"type":"string"}],"description":"The contract address of the `sellToken`"},"actual":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The current balance of `sellToken` in the `originAddress` address"},"expected":{"allOf":[{"type":"integer","format":"int64"},{"type":"string","pattern":"^[-+]?(0|[1-9]\\d*)(\\.\\d+)?$"}],"description":"The balance of `sellToken` required for the swap to execute successfully"}},"required":["token","actual","expected"],"additionalProperties":false,"description":"The balance of `sellToken` that the `originAddress` must hold. Null if the `originAddress` has sufficient balance","nullable":true},"simulationIncomplete":{"type":"boolean","description":"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"}},"required":["allowance","balance","simulationIncomplete"],"additionalProperties":false},"quoteId":{"type":"string","description":"The unique ID for this cross-chain quote"}},"required":["sellAmount","buyAmount","minBuyAmount","fees","gasCosts","steps","transaction","estimatedTimeSeconds","issues","quoteId"],"additionalProperties":false,"description":"The cross-chain quote details including steps, fees, and transaction information"},"allowanceTarget":{"type":"string","description":"The contract address that needs token allowance approval for this quote"}},"required":["quote"],"additionalProperties":false,"description":"The quote data containing swap details and allowance information"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["result"],"description":"Event type indicating the final result of the quote search"},"data":{"type":"object","properties":{"liquidityAvailable":{"type":"boolean","description":"Whether any liquidity was found for the requested cross-chain swap"}},"required":["liquidityAvailable"],"additionalProperties":false,"description":"The final result indicating whether any liquidity was available"}},"required":["type","data"],"additionalProperties":false}],"description":"The streaming event containing either quote data or final result"}},"required":["zid","event"],"additionalProperties":false,"description":"A Server-Sent Event containing cross-chain quote information as it becomes available"}}}},"400":{"description":"400 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INPUT_INVALID"}]}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/INTERNAL_SERVER_ERROR"},{"$ref":"#/components/schemas/UNCATEGORIZED"}]}}}}}}}},"components":{"schemas":{"INPUT_INVALID":{"type":"object","properties":{"name":{"type":"string","enum":["INPUT_INVALID"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The input field name"},"reason":{"type":"string","description":"The validation failure reason"}},"required":["field","reason"],"additionalProperties":false},"description":"The list of invalid inputs"}},"required":["zid","details"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"INTERNAL_SERVER_ERROR":{"type":"object","properties":{"name":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false},"UNCATEGORIZED":{"type":"object","properties":{"name":{"type":"string","enum":["UNCATEGORIZED"]},"message":{"type":"string"},"data":{"type":"object","properties":{"zid":{"type":"string","description":"The unique ZeroEx identifier for tracking this cross-chain request"}},"required":["zid"],"additionalProperties":false}},"required":["name","message","data"],"additionalProperties":false}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0x-docs.gitbook.io/0x-cross-chain-api-beta/api-reference/cross-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
