LayerHopDocsLaunch app (opens in a new tab)

LayerHop developer documentation

Hop any token across any layer.

LayerHop is a non-custodial swap and bridge API that compares Jupiter, Relay, deBridge, 0x, KyberSwap, LI.FI and Across on every trade and returns a ready-to-sign transaction for the best route.

LayerHop is a non-custodial meta-aggregator for token swaps and bridging across 71 chains, EVM and Solana. One API call asks every liquidity provider that can serve a route, ranks the answers by what the user receives, and returns a transaction the user's own wallet signs.

What is LayerHop?#

LayerHop sits one level above existing routing engines. It does not hold liquidity or funds. For each trade it requests quotes from Jupiter, Relay, deBridge, 0x, KyberSwap and LI.FI in parallel, picks the route with the best time-adjusted output, and hands back the provider's own transaction for the user to sign.

  • One integration, seven live routing providers. Jupiter, Relay, deBridge, 0x, KyberSwap, LI.FI and Across sit behind a single REST API. Mayan is built and available on request.
  • 71 chains. Ethereum, Base, Arbitrum, BNB Chain, Solana and the long tail, including Berachain, HyperEVM, Monad and Robinhood Chain. See Supported chains & tokens.
  • Ranked for the user. Quotes are ranked by what the user receives; only near-identical quotes (within 0.1%) go to the one that supports LayerHop.
  • Non-custodial. LayerHop never holds funds or keys. See Non-custodial model.
  • Fees shown up front. LayerHop's fee is reported on every quote as fees.ourFeeBps, separately from provider fees and gas. See Fees & channels.

Which LayerHop products can I use?#

Surface Where Use it for
REST API v1 https://api.layerhop.com/v1 Quotes, transactions, order status, chains, tokens, prices, balances. See the API reference.
Swap app layerhop.com/swap Swapping in the browser with an EVM or Solana wallet.
Widget https://layerhop.com/embed A swap card inside your site. See Embed the widget and the widget reference.
Deep links https://layerhop.com/swap?… Prefilled swaps from a link, post or bot. See Deep links.
Developer dashboard dashboard.layerhop.com Wallet sign-in, API keys, usage, logs, orders, webhooks, deposit addresses, partner program with payouts. See Dashboard & API keys.
Checkout, invoices and subscriptions layerhop.com/pay/…, layerhop.com/invoice/… Get paid in USDC or USDT while customers pay with any token, once or every period. See Checkout, Invoices, Subscriptions and Refunds.
Deposit addresses POST /v1/deposit-addresses Users swap or bridge by sending tokens to an address, with no wallet connection. See Deposit addresses.
Webhooks your HTTPS endpoint Signed order.*, checkout.session.*, invoice.* and subscription.* events instead of polling. See Webhooks.
Telegram bot @layerhop_bot Quotes, swap links, price alerts, deposit addresses and invite links in Telegram. See Telegram bot.
MCP server https://mcp.layerhop.com/mcp Quotes and transactions for AI agents. See AI agents & MCP.
SDKs and CLI TypeScript, React, Python, Go, Rust, Kotlin (Android), C# (Unity), layerhop CLI Typed clients for the API. See the SDK reference.

How does a LayerHop swap work?#

  1. Quote: GET /v1/quote with the source and destination chain, token, amount and addresses. The response has best, every other quote, and per-provider errors.
  2. Build: POST /v1/orders with the quoteId. You get an EvmTx (sometimes with an approval) or a base64 Solana SvmTx. Optionally simulate it first.
  3. Sign and send: the user's wallet signs and broadcasts. A Solana transaction marked submitViaApi: true goes back through POST /v1/orders/submit instead.
  4. Report: POST /v1/orders/{quoteId}/submitted with the transaction hash, so the order is tracked and webhooks fire.
  5. Track: poll GET /v1/orders/{provider}/{id} or wait for a webhook until the order is filled, refunded or failed. See Order tracking.
TypeScript
import { LayerHop } from "@layerhop/sdk";

const lh = new LayerHop({ apiKey: process.env.LAYERHOP_API_KEY }); // baseUrl defaults to https://api.layerhop.com
const { best } = await lh.quote({
  srcChain: "base", srcToken: "USDC", amount: "100000000", // 100 USDC (6 decimals)
  dstChain: "solana", dstToken: "SOL",
  sender: "0xYourEvmAddress", recipient: "YourSolanaAddress",
});
const tx = await lh.buildTx(best.quoteId);
// sign and send `tx` with the user's wallet, then:
await lh.reportSubmitted(best.quoteId, srcTxHash);
for await (const s of lh.watch(best.provider, srcTxHash)) console.log(s.state);

Where should I start?#

What is live today?#

Area Status
REST API v1 at api.layerhop.com Live
Providers: Jupiter, Relay, deBridge, 0x, KyberSwap, LI.FI Live
Mayan (Solana ↔ EVM) Built; held back in production, available on request
Swap app, widget, deep links, explorer Live at layerhop.com
Developer dashboard, API keys, rate limits, request logs Live at dashboard.layerhop.com
Webhooks, POST /v1/simulate, order history (GET /v1/orders) Live
Partner (integrator) fees, instant activation, payouts and statements Live
Telegram bot @layerhop_bot Live
MCP server (mcp.layerhop.com/mcp, or @layerhop/mcp over stdio) Live
SDKs: TypeScript, React, Python, Go, Rust, CLI On npm, PyPI, crates.io and pkg.go.dev
SDKs: Swift, Kotlin (JVM + Android), C# (.NET + Unity) Swift Package Manager; Kotlin on Maven Central; C# on NuGet and for Unity via git URL
Checkout, invoices, subscriptions, refunds, payment analytics Live
Gas on arrival, deposits to Hyperliquid Live
Deposit addresses Live
Limit orders (Solana) Built; test keys only, live mode not enabled in production yet
Status page (status.layerhop.com, GET /v1/status) Live. See Status and monitoring
Testnets, forked local devnet Not available yet

LayerHop's own intent protocol (solvers and per-order escrow) is a later phase. Partner routes remain the source of liquidity today.

Last updated