Skip to main content
POST
/
quote
Create 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": "partner-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

x-api-key
string
header
required

API key. Keep this key on your backend.

Body

application/json
from
object
required
to
object
required
externalId
string | null

Your order or correlation ID.

Maximum string length: 128
Example:

"partner-order-123"

customerId
string | null

Your internal user or customer reference.

Maximum string length: 128
Example:

"u_123"

Response

Short-lived quote.

id
string
required
Pattern: ^pq_[a-f0-9]{24}$
Example:

"pq_aaaaaaaaaaaaaaaaaaaaaaaa"

expiresAt
string<date-time>
required
from
object
required
to
object
required
rate
string | null
required

Estimated output per one input unit.

Example:

"10000"

minAmountIn
string | null
required
Example:

"0.001"

maxAmountIn
string | null
required
Example:

"1"

estimatedTimeSeconds
integer
required
Required range: x >= 0
Example:

900