Skip to main content
This walkthrough takes you from zero to a created swap: activate a key, list assets, validate an address, quote, swap, poll.

1. Get your API key

Sign in on lightswap.me, open Account → Business, and select Activate business account. The API key is shown once. Copy it and store it somewhere safe. Set it on your backend:
API keys are backend credentials. Never put one in browser code, a mobile app, or a public repository.

2. List assets

The response gives you canonical lowercase network values, decimals, and memo requirements. Use these exact values in later calls.

3. Validate the destination address

Do this before quoting so your users catch address mistakes early.

4. Create a quote

Quotes live for 3 minutes. Amounts are decimal strings.

5. Create the swap

The response contains the deposit instructions: address, amount, network, token, and deadline. Only now should your user send funds. A quote response never carries deposit details.

6. Poll the status

Poll every 30 seconds until the status is terminal: completed, refunded, failed, or expired.

Next steps

Integration flow

Memos, refund addresses, and retry behavior in detail.

Statuses and errors

Every status and error code, with suggested handling.

Limits

Rate limits, quote lifetime, and deposit windows.

API Reference

Request and response fields for every endpoint.