Skip to main content
The API separates quote creation from swap creation. 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.
Use the exact lowercase network values returned by GET /asset. Mixed-case partner network values are rejected.
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.

Quote lifetime

Quotes are short-lived. The quote response includes expiresAt. If the quote expires before you create a swap, create a new quote. The API returns quote_expired when a quote is no longer valid.

Safe 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. Wallet, gas, and blockchain network costs are separate third-party costs.

Destination memo

Destination memo is not supported in the MVP. Send null or omit the memo field. If a future asset requires memo support, the asset list will expose that through requiresMemo.