Cross-Chain

Get the quotes for a cross chain swap

get/cross-chain/quotes

Request

  • Base URL
    https://api.0x.org
  • Auth
    none declared. Required headers: 0x-api-key

Query parameters

originChainstring required

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

destinationChainstring required

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

sellTokenstring required

The contract address of the token to sell on the origin chain. Format varies by chain type (EVM address for EVM/HyperCore chains, token mint address for Solana, base58check address for Tron). For Bitcoin, the only accepted value is bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8.

buyTokenstring required

The contract address of the token to buy on the destination chain. Format varies by chain type (EVM address for EVM/HyperCore chains, token mint address for Solana, base58check address for Tron). For Bitcoin, the only accepted value is bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8.

sellAmountstring required

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

originAddressstring required

The wallet address on the origin chain that holds the sellToken balance and will initiate the cross-chain transaction. For Bitcoin, quotes are supported from one native SegWit (P2WPKH, bc1q) address with confirmed coins. The quote returns a PSBT to sign with SIGHASH_ALL.

destinationAddressstring

The wallet address on the destination chain that will receive the buyToken. If not specified, defaults to originAddress on the destination chain. A Bitcoin destination accepts any mainnet address type.

gasPayerstring

The Solana address that will pay for transaction fees when the origin chain is Solana. Only applicable for Solana origin chains

solanaEphemeralSignerPubkeystring

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

slippageBpsinteger

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

excludedBridgesstring

Comma-separated list of bridge providers to exclude from routing

includedBridgesstring

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

excludedSwapSourcesstring

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

feeBpsstring

The trading fee amounts in basis points to charge on the origin chain (supports single or comma-separated values). Mutually exclusive with feePpm. 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 or Bitcoin-originated routes.

feePpmstring

The trading fee amounts in parts-per-million (PPM) to charge on the origin chain (supports single or comma-separated values). Mutually exclusive with feeBps. Must be used together with feeRecipient. Each value must be an integer from 0 to 1000000. When multiple values are provided, must match the length of feeRecipient. e.g. 5000 PPM = 50 BPS = 0.5%. Note: integrator fee collection is not yet supported for Tron-originated or Bitcoin-originated routes.

feeRecipientstring

The wallet addresses to receive trading fees on the origin chain (supports single or comma-separated values). Must be used together with feeBps or feePpm. When multiple values are provided, must match the length of feeBps or feePpm. Note: integrator fee collection is not yet supported for Tron-originated or Bitcoin-originated routes.

feeTokenstring

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 or feePpm. If omitted, defaults to sellToken. Some routes collect the integrator fee through the bridge provider instead of on-chain; the fee still goes to feeRecipient, but it comes out of the token entering the bridge, which is not sellToken when the route swaps before bridging. Read fees.integratorFee.token for the token actually charged. Note: integrator fee collection is not yet supported for Tron-originated or Bitcoin-originated routes.

sortQuotesBy'speed' | 'price' required

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

maxNumQuotesinteger

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

Headers

0x-api-keystring required

Visit dashboard.0x.org to get your API Key

Response

Successful response

OR

Changes

    • info

      added subschema #4 to the /// response property anyOf list for the response status

    • info

      added subschema #5 to the / response property anyOf list for the response status

    • info

      added subschema #5 to the / response property anyOf list for the response status

    • info

      added subschema #5 to the /// response property anyOf list for the response status

    • info

      added subschema #5 to the /// response property anyOf list for the response status

    • info

      added subschema #5 to the ///// response property anyOf list for the response status

    • info

      added subschema #5 to the ///// response property anyOf list for the response status

    • info

      added subschema #5 to the ///// response property anyOf list for the response status

    • info

      added subschema #5 to the ///// response property anyOf list for the response status

    • info

      added subschema #5 to the ////// response property anyOf list for the response status

    • info

      added subschema #5 to the ////// response property anyOf list for the response status

    • info

      added subschema #5 to the / response property anyOf list for the response status

    • info

      added the new optional query request parameter feePpm