Skip to content

Cross-chain swap API approvals and bridge transactions

A cross-chain swap is complete only after the destination transaction settles. A cross-chain swap API defines whether a specific input and output...

Cross-chain swap API approvals and bridge transactions
On this page

A cross-chain swap is complete only after the destination transaction settles. A cross-chain swap API defines whether a specific input and output token pair can move between the selected origin and destination chains. Account for approvals and bridge status as well as the quote.

It may seem that one integration should handle everything from approval through delivery, but each stage has its own transaction requirements. This article explains how approvals and bridge transactions fit together, how to assess route support, and how to integrate USDC and ETH swaps. It also covers implementation details that affect reliable execution, including token decimals, quote amounts, and tracking progress until delivery is confirmed.

Key Takeaways

  • Assess route support by the specific input and output tokens and the origin and destination chains, not by chain names alone.
  • Build transaction handling around separate approval, origin-chain submission, and destination-delivery stages so users can see meaningful progress.
  • Use the USDC route example to understand how token amounts are represented in their smallest units, and apply the same precision to ETH routes.
  • For API integration, account for token decimals on each chain, quote expiry, amount type, and the required request parameters.
  • Choose an exchange API or white-label solution when you need to embed crypto exchange functionality into a product or trading service.

Executing approval and bridge transactions

A cross-chain swap API may require an approval transaction before it can move tokens from the source wallet. For an ERC-20 asset, approval authorizes a designated contract to spend a specified amount. The wallet must sign that transaction separately when the route requires it. Native ETH generally follows a different transaction path because it is not an ERC-20 token.

After approval, execution proceeds in distinct stages: submit the source-chain transaction, wait for the required processing, and track the bridge through destination delivery. Submitting the origin transaction does not complete the swap. Show clear progress states, such as approval needed, source transaction submitted, bridge processing, and destination funds delivered. This prevents a pending transfer from appearing complete.

Use a clear execution sequence:

  1. Request a route for the chosen source token, destination token, and chains.
  2. Present the quoted output and transaction details before requesting signatures.
  3. Ask for approval only when the route requires token allowance, then submit the swap or bridge transaction.
  4. Track each transaction stage and show completion only after destination delivery.

Bridge aggregation can compare eligible routes for a token pair and chain pair. Assess expected output, estimated completion, route requirements, and whether the destination asset matches the user’s request. For example, a route that supports USDC on one source chain does not necessarily support USDC on every destination chain. Support depends on the exact input and output tokens and both chains.

Build provider controls into the integration. Specify which chains, tokens, and bridge routes the application will show, then validate the returned transaction data before presenting it for signing. Treat an unavailable route as a limitation, not as a successful quote. Keep approval and bridge status visible so users can distinguish a wallet action from a transfer still in progress.

Compare fees and exchange rates using the estimated destination amount for the same input, token pair, and chain pair. That figure reflects the quoted conversion and applicable route costs. Compare the quote’s assumptions and execution requirements, not just a headline rate. Supported tokens also vary by route, so a broad chain list does not mean every asset on those chains is supported.

Across Swap API combines swap and bridging flows for a specific input and output token pair and origin and destination chains. Its quote and route details guide transaction preparation, while the bridge transaction must still be tracked through delivery. Treat the returned route as a transaction plan, with approval, source submission, and destination completion shown as separate steps.

Supported blockchains

Chain support is route-specific, not a universal checklist. Each route combines an input token, an output token, an origin chain, and a destination chain. An API may support one combination without supporting every asset on those networks. Treat each response as information about a specific route, not proof of broad network coverage.

Across Swap API and 0x Cross-Chain API are examples of cross-chain integrations. Their available routes depend on the requested tokens and chains. No single chain list describes every possible route across these APIs. Swap duration also depends on the networks and route: source-chain processing, bridge execution, and destination-chain settlement each affect completion. Bitcoin confirmation times vary, so sending its origin transaction alone does not establish delivery.

For an integration, identify supported networks and assets in the relevant API’s current documentation and response. Then evaluate the exact pair your application needs. A chain listed in an API’s capabilities does not mean every token on it has a usable route. Liquidity and route availability can also vary by token combination, affecting whether the API can return a quote.

Use this sequence to build route checks into your application:

  1. Set the origin and destination chains required by the user’s transaction.
  2. Select the intended input and output tokens on those chains.
  3. Request route information for that exact combination and inspect the response.
  4. Present only routes returned for the requested assets and networks.

Keep chain and token identifiers attached to each asset in your application. A familiar ticker may not distinguish assets deployed on different networks. Token decimals are specific to each token on each chain. Applying one chain’s token metadata to another can distort displayed amounts and transaction parameters.

Network support also shapes transaction handling. A cross-chain swap may require destination details before it can be submitted. Without that address, the request returns HTTP 400. This is a useful example of why destination requirements belong in route validation, before the user signs or submits a transaction.

For Bitcoin-origin swaps through 0x, use the status endpoint to track progress. The bridge_filled status confirms delivery. Displaying that status distinguishes an initiated transfer from a completed one. Bitcoin confirmation times vary, so the interface should represent progress rather than treating source submission as completion.

Across route capabilities also depend on the exact input and output tokens and both chains. Build support checks around that full combination. This gives users a clear response when a requested route is unavailable and keeps chain coverage, token coverage, and execution status distinct in your integration.

Across Swap API and 0x Cross-Chain API are examples of available cross-chain integrations. Their supported chains depend on the requested token pair and route, so check each API’s current documentation and response for the exact combination.

Cross-chain USDC and ETH route examples

A USDC route begins with an exact source token, destination token, and chain pair. Its quote should identify the requested input amount and estimated output. For a documented USDC transfer, the input is 10000000 and the output is 9989218, both expressed in the token’s smallest units. Treat these as route values, not as whole-token amounts.

This example shows why an interface should preserve the API’s amount units. You can format values for display, but transaction parameters must retain the exact units the route expects. Do not apply one token’s decimals to another. USDC and ETH can have different token representations across networks, so associate each amount with its specific token and chain.

An ETH route follows the same selection logic. Specify the source ETH asset, destination asset, and both networks before requesting a quote. If ETH is also the destination asset, make sure the response identifies the intended token instead of relying on the ticker alone. If ETH is the source and another token is the output, present that exact pair and its quoted amount.

To optimize routes, compare options using consistent inputs. Keep the source amount, token pair, and chain pair fixed while assessing each route’s estimated output and execution requirements. A fallback should offer another route to the same outcome, not a substitute token or destination chain. Request a fresh quote before using a route if its quote has expired.

Use route data to build the confirmation screen. Show the source amount, estimated destination amount, token identities, networks, and required transaction steps. Distinguish quoted output from the amount ultimately delivered. The quote describes the proposed route; execution status indicates progress. This avoids presenting an estimate as a completed transfer.

Security risks and failure modes include entering incorrect destination details, submitting an expired quote, or treating source-chain submission as final delivery. Keep a failed route or pending bridge visibly distinct from a completed swap.

Error handling should preserve those distinctions. If a quote request returns no usable route, explain that the selected combination cannot proceed using that response. If execution fails, show which stage failed and retain relevant transaction status. Across quote requests also use amountType to specify which side has the stated amount. This makes input-based and output-based requests clear.

For a USDC or ETH integration, build route handling around explicit token and chain identifiers, exact amount units, fresh quotes, and clear status states. This lets the application compare eligible routes without silently changing the requested asset or destination.

Cross-chain swap API approvals and bridge transactions

Developer documentation and integration

Across API requests require a bearer token in the Authorization header and an integratorId query parameter. Quote requests also use amountType to identify which side of the transfer has the specified amount. These fields shape the request before route evaluation begins.

Across API supports quote and route requests, while 0x Cross-Chain API provides a status endpoint for tracking Bitcoin-origin swaps. A status endpoint is a polling mechanism, not evidence of webhook delivery. Keep webhook behavior separate in your integration design, and rely only on documented API events when implementing it.

Map each request field to a decision in your application. For example, decide whether users enter the source amount or target amount, then set amountType accordingly. A clear mapping helps prevent the interface from treating an output-based request as input-based, or vice versa.

Handle token precision for each chain. Across integrations should use each token’s decimals on its specific chain instead of hardcoding a single value. Store the token and chain identifiers with the decimals used to format and submit amounts. This keeps USDC on one network distinct from the same ticker on another.

Quote freshness also affects execution. Across clients should request a fresh quote rather than submit one after it expires. Treat the quote as time-sensitive route data: refresh it before showing final transaction details, and base the user’s action on the updated response. This avoids building an execution flow around stale terms.

Present integrator fees carefully. Compare the quoted input and expected output for the requested route, and show fee components when the response provides them. Do not infer a fee from the difference between amounts alone, because conversion rates and route costs can both affect the output. Tie each fee label to the field it describes.

Use status handling to represent progress accurately. For a Bitcoin-origin transaction through 0x Cross-Chain API, poll the status endpoint as confirmation progresses. Bitcoin confirmation times vary, so submission of the origin transaction should not trigger a completed state. The bridge_filled status confirms delivery.

A practical integration sequence is:

  1. Authenticate the Across request with its bearer token and integrator identifier.
  2. Set the intended amount side, then request a route quote.
  3. Use chain-specific token decimals when preparing amounts.
  4. Refresh an expired quote before transaction submission.
  5. Track 0x Bitcoin-origin progress until bridge_filled confirms delivery.

These controls connect documentation to concrete application actions: request, interpret, refresh, submit, and track. Across handles quote and route parameters; 0x status tracking illustrates why transaction state belongs in the integration, not just the confirmation screen.

Cross-chain swap API

A cross-chain swap API connects route discovery with transaction execution across networks. Its core response relates to a specific input token, output token, origin chain, and destination chain. That combination defines what the API can quote, rather than promising general support for every asset on every network.

Which API is right for a wallet, exchange, or dApp? It depends on the exact token and chain routes required, and on the integration’s needs for quotes, execution data, and transaction status. Evaluate each API against representative routes, such as USDC between two supported networks, before choosing an integration.

Across Swap API and 0x Cross-Chain API illustrate different integration considerations. Across capabilities are defined by the input and output token combination and both chains. The 0x Cross-Chain API includes status tracking for Bitcoin-origin swaps. These examples show why a product requirement should name the route and lifecycle state, not just ask for “cross-chain support.”

A wallet may prioritize clear quotes and transaction states. Users need to know which asset leaves their wallet, which asset they expect to receive, and whether execution is still in progress. An exchange may need route handling that fits its trading interface and supported asset pairs. A dApp can assess whether a route connects directly to its target-chain action.

Use a route-based evaluation:

  • List the required source and destination chains.
  • Specify the input and output tokens for each route.
  • Compare quote fields and required transaction actions.
  • Identify how the integration reports pending, failed, and completed states.
  • Test how the API handles an unavailable route or an expired quote.

That process exposes integration gaps before they become confusing interface states. For example, if a requested pair has no returned route, the application should not imply that a swap can proceed. If an API returns a quote, show its output as an estimate, then distinguish it from confirmed delivery. For Bitcoin-origin transactions through 0x, status tracking matters because source submission alone does not establish completion.

Operational fit also depends on request structure. Across uses a bearer token in the Authorization header and an integratorId query parameter. Its amountType field determines which side has the specified amount. These requirements affect backend authentication, quote construction, and the values shown in the interface.

The strongest choice is the API whose documented route model matches the product’s actual token pairs and transaction states. Start with one high-priority route, test the full request-to-status flow, then expand to additional pairs. Review the exchange integration path as you plan how swap functionality fits your product.

N.exchange: crypto swap

n.exchange offers crypto swaps through its non-custodial exchange, alongside an Exchange API and White Label Exchange Solution for businesses building trading services. These options suit businesses that want to integrate exchange functionality into a product or launch a branded exchange experience. Cross-chain routes depend on the exact supported assets and networks, so align product requirements with the transaction flow before implementation.

For a direct swap experience, consider n.exchange. For a product integration, the Exchange API or White Label Exchange Solution may better fit your architecture and operating model. The right option depends on whether you need a standalone exchange experience or exchange functionality within your own service.

Contact n.exchange to discuss your exchange integration requirements.

Build the Next Integration Step

Turn your route requirements into a focused implementation plan. Define the user journey, decide how transaction progress will appear, and map API responses to clear application states. A deliberate scope makes it easier to assess whether a cross-chain swap API fits your product architecture and the experience you intend to deliver.

Connect the technical plan to your broader exchange strategy. The right integration should serve a defined product goal, whether that means enabling swaps within an existing platform or creating a dedicated trading experience. Keep the initial scope practical, document key decisions, and refine the flow as your requirements develop.

To discuss how your integration goals could take shape, Discuss integration with n.exchange. A clear next step can turn your route design into a more actionable product plan.

Frequently Asked Questions

What are the API pricing, rate limits, and access requirements for leading providers?

Pricing and rate limits depend on the provider and integration model. Compare the applicable fee structure and request limits when estimating transaction costs and application capacity. Across API requests require a bearer token in the Authorization header and an integratorId query parameter. For n.exchange crypto swaps, the service fee is 2-3% per crypto pair, with no hidden fees. That swap fee is not a universal API pricing benchmark.

How do I integrate a cross-chain swap API step by step?

Start by defining a route your product needs, such as a specific asset pair between two networks. Match the quote request to the user’s chosen input or output amount, then show the returned route details for review. Before execution, validate destination data and required wallet actions. A cross-chain swap API integration should separate quote review, authorization, transaction submission, and destination delivery into clear interface states. Test both successful and unavailable-route responses.

How do refunds, failed transactions, and slippage work with cross-chain swap APIs?

Refunds and recovery depend on the transaction stage and the provider’s route-handling process; an API quote alone does not establish refund eligibility. Slippage describes how the executed exchange rate can differ from the quote as market conditions or route liquidity change. For a cross-chain swap API, present the quote as an estimate unless its terms explicitly lock the output, and show failed, pending, and completed states separately. Never label a pending transfer as refunded or delivered.

Which cross-chain swap APIs are available and what chains do they support?

Across Swap API and 0x Cross-Chain API are examples. Their supported chains depend on the requested input and output tokens and the origin and destination chains, so check the relevant API’s current documentation and response for the exact route.

Which APIs support quotes, routing, transaction status, and webhooks?

Across provides quote and route details, and 0x provides a status endpoint for tracking Bitcoin-origin swaps; its bridge_filled status confirms delivery. The article does not establish webhook support.

How long do cross-chain swaps take on different networks?

Swap duration depends on the networks and route, including source-chain processing, bridge execution, and destination settlement. Bitcoin confirmation times vary, so track progress through the status endpoint rather than treating origin submission as completion.

For recurring readers

Keep practical crypto guidance within reach.

Follow the Journal feed for new explainers, integration notes and product updates without giving up your inbox.

Follow the RSS feed

Put it into practice

Exchange directly—or build it into your product.

n.exchange provides wallet-based swaps for individuals and exchange infrastructure for businesses.