Welcome to Across
Crosschain interoperability with ~2 second fills across 23+ chains.
MegaETH is now live on Across. Bridge to and from MegaETH (Chain ID 4326) using the Swap API.
What is Across?
Across is a crosschain interoperability protocol that provides the fastest, cheapest, and most secure way to move assets across blockchains. With ~2 second fills on mainnet and support for 23+ chains, Across powers crosschain swaps, bridges, and embedded actions through a single unified API.
Unlike single-mechanism bridges, Across intelligently routes through three distinct settlement pathways to optimize for speed, cost, and transfer size.
The Swap API automatically selects the optimal pathway — you don't need to choose.
API key required for production. Request your API key and integrator ID or reach out on Telegram.
Quick Start
Get a crosschain swap executing in three steps:
Get a Quote
Call the Swap API with your transfer parameters to get executable calldata.
const params = new URLSearchParams({
tradeType: "minOutput",
originChainId: "42161", // Arbitrum
destinationChainId: "8453", // Base
inputToken: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on Arbitrum
outputToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
amount: "1000000000", // 1000 USDC (6 decimals)
depositor: "0xYourWalletAddress",
integratorId: "0xdead", // Your integrator ID
});
const response = await fetch(
`https://app.across.to/api/swap/approval?${params}`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const quote = await response.json();Approve Token Spending
If the quote includes approval transactions, execute them first.
import { createWalletClient, http } from "viem";
import { arbitrum } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const walletClient = createWalletClient({
account,
chain: arbitrum,
transport: http(),
});
if (quote.approvalTxns?.length) {
for (const approvalTx of quote.approvalTxns) {
const hash = await walletClient.sendTransaction({
to: approvalTx.to,
data: approvalTx.data,
});
console.log("Approval tx:", hash);
}
}Execute the Swap
Send the main swap transaction using the calldata from the quote.
const hash = await walletClient.sendTransaction({
to: quote.swapTx.to,
data: quote.swapTx.data,
value: quote.swapTx.value ? BigInt(quote.swapTx.value) : 0n,
gas: quote.swapTx.gas ? BigInt(quote.swapTx.gas) : undefined,
});
console.log("Swap tx:", hash);
// Funds arrive on Base in ~2 seconds