curl --request POST \
--url https://lightswap.me/api/partner/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"from": {
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"network": "tron",
"token": "USDT"
},
"customerId": "u_123",
"externalId": "order-123"
}
'{
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"expiresAt": "2026-04-19T10:03:00.000Z",
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"rate": "10000",
"minAmountIn": "0.001",
"maxAmountIn": "1",
"estimatedTimeSeconds": 900
}API Reference
Create quote
Create a short-lived exact-input quote with selected assets, amount, destination network, and optional external tracking fields.
POST
/
quote
curl --request POST \
--url https://lightswap.me/api/partner/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"from": {
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"network": "tron",
"token": "USDT"
},
"customerId": "u_123",
"externalId": "order-123"
}
'{
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"expiresAt": "2026-04-19T10:03:00.000Z",
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"rate": "10000",
"minAmountIn": "0.001",
"maxAmountIn": "1",
"estimatedTimeSeconds": 900
}Authorizations
API key. Keep this key on your backend.
Body
application/json
Response
Short-lived quote.
Pattern:
^pq_[a-f0-9]{24}$Example:
"pq_aaaaaaaaaaaaaaaaaaaaaaaa"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Estimated output per one input unit.
Example:
"10000"
Example:
"0.001"
Example:
"1"
Required range:
x >= 0Example:
900

