Skip to main content
POST /quote gives you a short-lived estimate. POST /swap creates the actual swap and returns deposit instructions.
Deposit details are created only after POST /swap. Do not ask users to send funds from a quote response.
1

Load assets

Call GET /asset when your app needs supported networks, token symbols, decimals, logos, and memo requirements.
2

Validate the payout address

Call POST /address after the user enters a destination address.
3

Create a quote

Call POST /quote with the send asset, receive asset, and exact send amount.
4

Create the swap

Call POST /swap with the quote ID and destination address.
5

Show deposit instructions

Display the deposit.address, deposit.memo, deposit.amount, deposit.network, deposit.token, and deposit.deadline from the swap response.
6

Track the swap

Call GET /swap/{id} every 30 seconds until the status is terminal.

Retries

POST /swap is retry-safe per quoteId. If you repeat the same create-swap call for a quote that already created a swap, LightSwap returns the existing swap instead of creating a new one.

Amounts and rates

Amount fields are strings. Treat them as decimal strings, not JavaScript numbers. Quote amounts are estimates. The final received amount can change with floating-rate swaps and network conditions before execution.