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_bpsandpartner_feein 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-Afterheader. - 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
How do I get an API key?
How do I get an API key?
API keys are issued at partner onboarding. Contact L2Pass support to request access.
Does the API hold user funds?
Does the API hold user funds?
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.
Can I earn a fee on swaps?
Can I earn a fee on swaps?
Yes. Set a partner fee, and each quote returns it as
partner_fee_bps and partner_fee next to the platform fee.Is there an SDK?
Is there an SDK?
Yes,
@l2pass/swapkit-sdk on npm. See the API reference for details.Links
- API reference
- What is L2Pass RFQ by NEAR Intents
- L2Pass Swap fees explained
- Referrals and volume terms
- Contact support