streamQuotes

View as Markdown

Stream cross-chain quotes as they become available

Headers

0x-api-keystringRequired
Visit dashboard.0x.org to get your API Key

Query parameters

originChainstringRequired
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
destinationChainstringRequired
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
sellTokenstringRequired

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)

buyTokenstringRequired

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)

sellAmountstringRequiredformat: "^-?(0|[1-9]\d*)$"

The amount of sellToken (in sellToken’s base units) to sell on the origin chain

originAddressstringRequired

The wallet address on the origin chain that holds the sellToken balance and will initiate the cross-chain transaction

destinationAddressstringOptional
The wallet address on the destination chain that will receive the buyToken. If not specified, defaults to originAddress on the destination chain
gasPayerstringOptional
The Solana address that will pay for transaction fees when the origin chain is Solana. Only applicable for Solana origin chains
solanaEphemeralSignerPubkeystringOptional
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
slippageBpsintegerOptional0-10000Defaults to 100

The maximum acceptable slippage for each swap or bridge step of the cross-chain swap in basis points (100 = 1%)

excludedBridgesstringOptional

Comma-separated list of bridge providers to exclude from routing

includedBridgesstringOptional

Comma-separated list of bridge providers to include in routing. Mutually exclusive with excludedBridges

excludedSwapSourcesstringOptional

Comma-separated list of DEX sources to exclude from routing on both chains

feeBpsstringOptionalDefaults to

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.

feeRecipientstringOptionalDefaults to

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.

feeTokenstringOptionalDefaults to

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. Note: integrator fee collection is not yet supported for Tron-originated routes.

maxNumQuotesintegerOptional1-10Defaults to 5

The maximum number of cross-chain quotes to return, between 1 and 10. Each quote represents a different combination of bridges and DEXs

Response

Successful response
zidstring
The unique ZeroEx identifier of the request
eventobject
The streaming event containing either quote data or final result

Errors

400
Bad Request Error
500
Internal Server Error