x-api-key header.
Test keys
You can request a separate test API key with thelsk_test_ prefix from support.
Test keys run against the live API with real liquidity, so every test swap is a real transaction. Use small amounts. There is no sandbox environment.
Rate limits
Each API key allows 120 requests per minute. Exceeding it returns429 with the rate_limited code.
When a retry delay is available, the response includes a Retry-After header:
Authentication errors
Errors use the shared error shape:
The full error list, including
rate_limited, is on Statuses and errors.
Order attribution
POST /quote accepts two optional fields that connect a LightSwap swap to your own records:
externalId: your order reference. Set it at quote creation and keep it through support conversations.customerId: your user reference, carried on the swap payload.
- Always set
externalIdon quote creation. - Store the resulting swap ID next to it. The swap ID is the unique reference; LightSwap doesn’t enforce
externalIduniqueness, so treat it as a label, not a key. - Quote the
externalIdfirst when you contact support about an order.

