curl --request POST \
--url https://lightswap.me/api/partner/v1/swap \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteId": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"destination": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null
},
"refundAddress": "bc1qrefund",
"notificationEmail": "optional@example.com"
}
'{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "waiting_deposit",
"errorMessage": null,
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"deposit": {
"address": "bc1qdeposit",
"memo": null,
"amount": "0.01",
"network": "bitcoin",
"token": "BTC",
"deadline": "2026-04-19T14:00:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:00:30.000Z",
"customerId": "u_123"
}API Reference
Swap
Create a swap from an accepted quote and return the deposit address, amount, status, and tracking identifiers.
POST
/
swap
curl --request POST \
--url https://lightswap.me/api/partner/v1/swap \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteId": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"destination": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null
},
"refundAddress": "bc1qrefund",
"notificationEmail": "optional@example.com"
}
'{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "waiting_deposit",
"errorMessage": null,
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"deposit": {
"address": "bc1qdeposit",
"memo": null,
"amount": "0.01",
"network": "bitcoin",
"token": "BTC",
"deadline": "2026-04-19T14:00:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:00:30.000Z",
"customerId": "u_123"
}Authorizations
API key. Keep this key on your backend.
Body
application/json
Pattern:
^pq_[a-f0-9]{24}$Example:
"pq_aaaaaaaaaaaaaaaaaaaaaaaa"
Show child attributes
Show child attributes
Optional email address. LightSwap emails it when the swap reaches a final state: completed, failed, or refunded.
Example:
"optional@example.com"
Optional address on the sending network that receives the funds back if the swap is refunded. When omitted, LightSwap uses its configured network refund address.
Example:
"bc1qrefund"
Response
Created swap.
Pattern:
^[A-Z0-9]{12}$Example:
"AB12CD34EF56"
Example:
"order-123"
Available options:
waiting_deposit, deposit_detected, underpaid, processing, completed, refunded, failed, expired Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"u_123"

