For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact SupportDiscordGo to dashboard
HomeDocsAPI ReferenceLiquidity IntegrationChangelog
HomeDocsAPI ReferenceLiquidity IntegrationChangelog
    • API Overview
  • EVM APIs
  • Solana Swap APIs
  • Cross-Chain APIs
      • GETgetQuotes
      • GETgetStatus
      • GETlistSources
      • GETgetTxHistory
      • GETstreamQuotes
LogoLogo
Contact SupportDiscordGo to dashboard
Cross-Chain APIsCross Chain

streamQuotes

||View as Markdown|
GET
https://api.0x.org/cross-chain/quotes/stream
GET
/cross-chain/quotes/stream
$curl -G https://api.0x.org/cross-chain/quotes/stream \
> -H "0x-api-key: 0x-api-key" \
> -d originChain=8453 \
> -d destinationChain=42161 \
> -d sellToken=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf \
> -d buyToken=0xaf88d065e77c8cc2239327c5edb3a432268e5831 \
> -d sellAmount=2570 \
> -d originAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C \
> -d destinationAddress=0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C
1{
2 "zid": "0xbed7b45844099af94219ba8c",
3 "event": {
4 "type": "quote",
5 "data": {
6 "quote": {
7 "sellAmount": 2570,
8 "buyAmount": 2972100,
9 "minBuyAmount": 2942339,
10 "fees": {
11 "integratorFee": null,
12 "integratorFees": [
13 {
14 "amount": 1,
15 "token": "string",
16 "type": "volume"
17 }
18 ],
19 "zeroExFee": {
20 "amount": 6,
21 "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
22 "type": "volume"
23 },
24 "bridgeNativeFee": null
25 },
26 "gasCosts": {
27 "chainType": "evm",
28 "gasPrice": 11550962,
29 "gasLimit": 672945,
30 "totalNetworkFee": 7790577030769
31 },
32 "steps": [
33 {
34 "type": "swap",
35 "chainId": 8453,
36 "sellToken": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
37 "buyToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
38 "sellAmount": 2564,
39 "buyAmount": 2979865,
40 "minBuyAmount": 2950101,
41 "estimatedTimeSeconds": 0
42 },
43 {
44 "type": "bridge",
45 "originChainId": 8453,
46 "destinationChainId": 42161,
47 "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
48 "buyToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
49 "sellAmount": 2979865,
50 "buyAmount": 2972100,
51 "minBuyAmount": 2942339,
52 "provider": "across_v3",
53 "estimatedTimeSeconds": 3
54 }
55 ],
56 "transaction": {
57 "chainType": "evm",
58 "details": {
59 "to": "0x0000000000001ff3684f28c67538d4d072c22734",
60 "data": "0x2213bc0b...",
61 "gas": 672945,
62 "gasPrice": 0,
63 "value": 0
64 }
65 },
66 "estimatedTimeSeconds": 3,
67 "issues": {
68 "allowance": null,
69 "balance": {
70 "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
71 "actual": 0,
72 "expected": 2570
73 },
74 "simulationIncomplete": false
75 },
76 "quoteId": "0xbed7b45844099af94219ba8c00000001"
77 },
78 "allowanceTarget": "0x0000000000001ff3684f28c67538d4d072c22734"
79 }
80 }
81}

Stream cross-chain quotes as they become available

Was this page helpful?
Previous

getTxHistory

Built with

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
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

The source chain from which the cross-chain swap will originate. Can be specified as chain ID or name. See here for the list of supported chains

The destination chain where tokens will be received after the cross-chain swap. Can be specified as chain ID or name. See here for the list of supported chains