Skip to main content
The L2Pass SwapKit API lets wallets, apps and AI agents add cross-chain swaps to their own product. It works the same way as L2Pass RFQ by NEAR Intents: you request a quote, get a one-time deposit address, and the user pays from any wallet or exchange. The API returns the platform fee, your partner fee and the net output for each quote, and it notifies you of status changes by signed webhooks. Access needs a partner API key, issued at onboarding. Reference docs are at api.l2pass.com/docs.

What you can build

  • Wallets: cross-chain stablecoin swaps inside your wallet, including Tron, Solana, Bitcoin and Zcash.
  • Payment apps: accept USDT on one network and settle on another.
  • Exchanges and merchants: deposit-address flows that work from any wallet or exchange.
  • AI agents: quote and execute swaps through a simple REST API.

Endpoints

Base URL: https://api.l2pass.com. Send your key in the X-API-Key header. The full OpenAPI specification is in the API reference.

How a swap works through the API

1

Get an estimate

Call POST /v1/swap/estimate with the source and destination assets and the amount to show the user what they will receive.
2

Request a quote

Call POST /v1/swap/quote with the receiving and refund addresses. The response includes a one-time deposit address and the fee breakdown: platform_fee, partner_fee, total_fee and net_output.
3

Let the user pay

The user sends the quoted amount to the deposit address from any wallet or exchange.
4

Track the status

Poll GET /v1/swap/status/{quoteId} or receive webhooks signed with HMAC-SHA256 in the X-Webhook-Signature header.

Things to know

  • Partner fee. You can add your own fee, returned as partner_fee_bps and partner_fee in each quote.
  • Rate limits. Limits are set per partner for quotes and for status requests. Over the limit, the API returns 429 with a Retry-After header.
  • Key rotation. Rotate your key with POST /v1/partner/rotate-key.
  • Refunds and failures. A swap that cannot complete is refunded to the refund address, and its status becomes REFUNDED.

FAQ

API keys are issued at partner onboarding. Contact L2Pass support to request access.
No. Users pay to a one-time deposit address for their quote, and the swap is filled by solvers on NEAR Intents. L2Pass never holds user tokens or private keys.
Yes. Set a partner fee, and each quote returns it as partner_fee_bps and partner_fee next to the platform fee.
Yes, @l2pass/swapkit-sdk on npm. See the API reference for details.
Last updated: October 19, 2026