0x

0x Cross-Chain API

Cross-Chain API endpoints

Documentation

Specifications

Code Examples

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/0x-cross-chain-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

0x-cross-chain-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: 0x Cross-Chain API
  description: This is the official API reference for the latest 0x API (v2).
  version: v2
  x-source-url: https://github.com/0xProject/0x-docs/blob/main/fern/openapi.json
  x-last-validated: '2026-05-28'
servers:
- url: https://api.0x.org
tags:
- name: Cross-Chain
  description: Cross-Chain API endpoints
paths:
  /cross-chain/quotes:
    get:
      operationId: crossChain::getQuotes
      summary: Get Cross-Chain Quotes
      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
        example: 8453
      - 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
        example: 42161
      - 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)
        example: '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf'
      - 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)
        example: '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
      - 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
        example: '2570'
      - 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
        example: '0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C'
      - 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
        example: '0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C'
      - 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. Note: integrator fee collection is not yet supported for Tron-originated routes.'
      - 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. Note: integrator fee collection is not yet supported for Tron-originated routes.'
      - name: feeToken
        in: query
        required: false
        schema:
          type: string
          default: ''
        description: '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.'
      - 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)
        example: speed
      - 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 of the 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
                                  chainId:
                                    type: number
                                    description: The chain ID where this fee will be collected
                                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
                                    chainId:
                                      type: number
                                      description: The chain ID where this fee will be collected
                                  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:

# --- truncated at 32 KB (153 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/0x/refs/heads/main/openapi/0x-cross-chain-api-openapi.yml