Skip to main content
Use the Layerswap API to integrate swaps directly into your own system. You can look up available routes and prices, create swaps, get the instructions for funding them, and track each swap until it completes.

Base URL and authentication

Send your app key in the X-LS-APIKEY header:
Mainnet and testnet use the same base URL; the key selects the environment. See API keys & environments. An invalid key returns 403 API_KEY_FORBIDDEN.

Endpoints by task

For full request and response details for every endpoint, see the API reference.

Response envelopes

Successful JSON responses use a data envelope:
API errors normally use:
Binding and enum validation can return 400 with an empty body. Your client must handle both JSON errors and bodyless failures; see Errors.

First integration path

Start with Build your first API swap, then choose a funding method and implement tracking.