Blog
Introducing the Swap API: Crosschain Swa...
Add crosschain swaps to your app with only one contract call using the Across Swap API. Abstract away bridges and deliver seamless experiences to your users.
Sep 01, 2025
5 min read

Introducing the Swap API: Crosschain Swaps in One Call

Share this article

TLDR

The Across Swap API lets you initiate seamless crosschain swaps within your app with a single contract call, abstracting away bridges, DEXs, and glue logic. It supports multiple routing paths, returns ready-to-execute calldata (not just quotes), and integrates with 0x, Uniswap, and LI.FI for DEX routing under the hood. Already live with Lens and Infinex, the Swap API offers a composable, intent-based way to build better crosschain experiences for your users.

Introduction

Adding crosschain swaps to your application shouldn’t feel like solving a Rubik’s Cube with your eyes closed. Yet it does.

That's why we built the Across Swap API.

Whether you're building on Ethereum mainnet, L2s, or BSC, the Swap API is designed to help you build crosschain swaps faster and easier.

Here's what you need to know.

The Problem: Crosschain Swaps are Hard to Build

Crosschain applications are taking off, but building them is notoriously difficult.

As a developer, you have to stitch together multiple bridges, decentralized exchanges (DEXs), and custom contracts just to move a token from Chain A to Chain B, and then swap it. You end up stuck maintaining brittle glue logic between APIs, quoting endpoints, relayer logic, and contract calls.

The result? High development overhead, bad UX, and fragile integrations. Ultimately, your users bounce before a single transaction is confirmed. There is a serious need for simplicity, reliability, and composability across EVM chains and beyond...

So we decided to clean up this mess once and for all.

Building crosschain apps from scratch results in high developer overhead, bad UX, and fragile integrations.

Building crosschain apps from scratch results in high developer overhead, bad UX, and fragile integrations.

Meet the Swap API: Simple On the Surface, Modular Under the Hood

The Across Swap API unlocks your ability to initiate 1-click crosschain swaps directly from your application.

With it, your users can bridge and swap tokens at the same time without ever leaving your platform. The complexity is abstracted away, and it all happens with a single, composable contract call.

It's chain-agnostic and meets you where you're building. Perfect for developers building on the modular, multi-chain stack.

How It Works

To understand how the API works in practice, let’s look at the core contract interaction. At a high level, the API lets you specify:

  • An input token (what the user has)

  • An output token (what the user wants)

  • The origin chain (where the user is coming from)

  • The destination chain (where the user is going)

It then returns a ready-to-execute contract call including all the calldata your dApp needs to send the transaction, performing the full swap-bridge-swap logic needed to make that transaction happen. The entire process happens trustlessly via intents, with Across relayers handling the heavy lifting on behalf of the user.

You don’t need to manage quotes. You don’t need to split logic across contracts. And while you know the exact chain on which the swap occurs, your users never have to. It all just works.

Everything happens in one transaction, from your dApp to the user’s wallet.

The Across Swap API executes a bridge and swap in one contract call.

The Across Swap API executes a bridge and swap in one contract call.

A Deeper Look Under the Hood

Behind the scenes, the Swap API determines the optimal flow from source to destination based on your token inputs. It supports four routing paths:

  1. Custom input → canonical output
    Example: $FROG on Chain A → $USDC on Chain B.
    The API triggers a swap on the origin chain from $FROG to a supported canonical token like $USDC. Once swapped, it bridges that canonical token to the destination chain.

  2. Canonical input → custom output
    Example: $USDC on Chain A → $CAT on Chain B.
    The canonical token is bridged first using Across. On arrival, a swap is performed on the destination chain to convert $USDC into the desired output token, $CAT.

  3. Custom input → custom output
    Example: $FROG on Chain A → $CAT on Chain B.
    The API first swaps $FROG for a canonical token like $USDC on the origin chain, bridges it to the destination, and finally swaps it again for $CAT. This is a full swap-bridge-swap flow.

  4. Same token on both ends
    Example: $USDC on Chain A → $USDC on Chain B.
    This is the simplest case. The API recognizes no swap is needed and initiates a pure bridge transaction using Across’s standard mechanism.

These flows are abstracted away from you as a developer. The API determines the best route, generates the calldata, and lets the user's wallet handle the execution.

The Across Swap API supports four different routing paths, each executable with one click.

The Across Swap API supports four different routing paths, each executable with one click.

Built for Builders: What Makes It Different

The Across Swap API is a convenience layer for builders. It is a deliberate design choice rooted in Across’ intent-based architecture, giving you modular, composable building blocks without locking you into rigid logic.

Here’s what makes it different:

1. Calldata > Quotes

Unlike most APIs that return only a quote, the Across Swap API generates a full contract call. It delivers a complete transaction ready for execution, no assembly required.

No more hours of glue code and edge case handling.

2. Modular DEX Integration via 0x, Uniswap’s Trading API, and LI.FI

Across uses 0x, Uniswap's Trading API, and LI.FI to handle DEX aggregation and routing. Instead of aggregating DEXs directly, we plug into the best available infra and wrap it into the Swap API’s crosschain flow. 

The Across Swap API uses 0x, Uniswap, and LI.FI to handle DEX aggregation and routing under the hood.

The Across Swap API uses 0x, Uniswap, and LI.FI to handle DEX aggregation and routing under the hood.

3. Relayers Handle Bridge + Swap

Relayers manage the bridge and swap execution logic off-chain, allowing developers to stay focused on intent construction, not execution. This also ensures reliable behavior across dApps and frontends.

All intents are secured and verified by UMA.

4. Across V4

The recent launch of Across V4 supercharges faster deployment to more chains. For Swap API integrators, this unlocks instant access to new chains as we roll them out.

Already Live: Lens and Infinex are Swapping with Across

Lens and Infinex integrated the Across Swap API to power crosschain functionality on their platforms.

Lens and Infinex integrated the Across Swap API to power crosschain functionality on their platforms.

The Swap API is already powering real-world swaps in production.

Lens is web3’s social L2, empowering users to own and control their social media data and connections. The chain integrated the Across Swap API to enable crosschain bridging experiences within the Lens ecosystem.

When a Lens user claims rewards or completes actions that require moving tokens between chains, the API handles the routing logic behind the scenes. It powers frictionless bridging, swap execution, and optional gas payment, all initiated by a single transaction call. This integration is a prime example of how the Swap API can be used beyond typical dApps to unlock smoother UX for social protocols and app-specific flows. (Check out the technical details here)

Lens integrated the Across Swap API to enable crosschain bridging experiences within the Lens ecosystem.

Lens integrated the Across Swap API to enable crosschain bridging experiences within the Lens ecosystem.

Infinex is a DEX and non-custodial wallet platform that offers CEX-like simplicity for trading, yield, NFTs, and more across multiple chains. The platform recently integrated the Across Swap API to streamline crosschain swaps within its platform. Infinex is a non-custodial crosschain DeFi platform offering a unified “Swidge” (swap + bridge) experience across 13+ blockchains.

Infinex integrated the Across Swap API to streamline crosschain swaps within its platform.

Infinex integrated the Across Swap API to streamline crosschain swaps within its platform.

Together, these integrations showcase the power and flexibility of the Swap API to improve real-world user experiences across very different types of applications.

A Note on Solana Support

Swap API support for Solana is on the roadmap, but not included in the initial release.

Right now, crosschain flows involving Solana will use Across’s Suggested Fee API and contract-level logic via the Across app, not the Swap API endpoint. We’re working toward deeper integration and will update docs as Solana support rolls out.

Start Building

Building crosschain swaps doesn’t have to suck.

If you’re building a wallet, aggregator, DEX, or any app across chains, the Across Swap API is for you.

Ready to get started?

Join the Across community:

Back to top