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

getQuotes

||View as Markdown|
GET
https://api.0x.org/cross-chain/quotes
GET
/cross-chain/quotes
$curl -G https://api.0x.org/cross-chain/quotes \
> -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 \
> -d sortQuotesBy=speed
1{
2 "liquidityAvailable": true,
3 "allowanceTarget": "string",
4 "originChainId": 8453,
5 "originChain": "base",
6 "destinationChainId": 42161,
7 "destinationChain": "arbitrum",
8 "sellToken": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
9 "buyToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
10 "issues": {
11 "allowance": null,
12 "balance": {
13 "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
14 "actual": 0,
15 "expected": 2570
16 },
17 "simulationIncomplete": false,
18 "invalidSwapSourcesPassed": [],
19 "invalidBridgesPassed": []
20 },
21 "zid": "0xbed7b45844099af94219ba8c",
22 "quotes": [
23 {
24 "sellAmount": 2570,
25 "buyAmount": 2972100,
26 "minBuyAmount": 2942339,
27 "fees": {
28 "integratorFee": null,
29 "integratorFees": [
30 {
31 "amount": 1,
32 "token": "string",
33 "type": "volume"
34 }
35 ],
36 "zeroExFee": {
37 "amount": 6,
38 "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
39 "type": "volume"
40 },
41 "bridgeNativeFee": null
42 },
43 "gasCosts": {
44 "chainType": "evm",
45 "gasPrice": 11550962,
46 "gasLimit": 672945,
47 "totalNetworkFee": 7790577030769
48 },
49 "steps": [
50 {
51 "type": "swap",
52 "chainId": 8453,
53 "sellToken": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
54 "buyToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
55 "sellAmount": 2564,
56 "buyAmount": 2979865,
57 "minBuyAmount": 2950101,
58 "estimatedTimeSeconds": 0
59 },
60 {
61 "type": "bridge",
62 "originChainId": 8453,
63 "destinationChainId": 42161,
64 "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
65 "buyToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
66 "sellAmount": 2979865,
67 "buyAmount": 2972100,
68 "minBuyAmount": 2942339,
69 "provider": "across_v3",
70 "estimatedTimeSeconds": 3
71 }
72 ],
73 "transaction": {
74 "chainType": "evm",
75 "details": {
76 "to": "0x0000000000001ff3684f28c67538d4d072c22734",
77 "data": "0x2213bc0b...",
78 "gas": 672945,
79 "gasPrice": 0,
80 "value": 0
81 }
82 },
83 "estimatedTimeSeconds": 3,
84 "issues": {
85 "allowance": null,
86 "balance": {
87 "token": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
88 "actual": 0,
89 "expected": 2570
90 },
91 "simulationIncomplete": false
92 },
93 "quoteId": "0xbed7b45844099af94219ba8c00000001"
94 }
95 ]
96}
Get the quotes for a cross chain swap
Was this page helpful?
Previous

Swap Instructions

Next

getStatus

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.

sortQuotesByenumRequired

How to sort the returned quotes - either by speed (fastest execution time) or price (best exchange rate)

Allowed values:
maxNumQuotesintegerOptional1-10Defaults to 3

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

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