curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/cheaper-targets?fromCurrency=TRX&toCurrency=USDT_TRC20&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'TRX',
toCurrency: 'USDT_TRC20',
fromAmount: '100'
})
const res = await fetch(
`https://api.liddie.io/api/v1/conversions/cheaper-targets?${params}`,
{ headers: { Authorization: 'Bearer lid_live_...' } }
)
const { chosen, alternatives } = await res.json()
// alternatives.length === 0 → the picked destination is already fine
{
"chosen": "USDT_TRC20",
"alternatives": [
{
"toCurrency": "USDC_SOL",
"feePct": 1.4990,
"feeUsd": 1.5,
"toAmount": "98.109233",
"receiveUsd": 98.11,
"savingPct": 0.7912,
"savingUsd": 0.77
}
]
}
Conversions
Get cheaper targets
Discover cheaper conversion targets that net you more crypto for the same source amount before executing a swap with the Liddie conversions API.
GET
/
api
/
v1
/
conversions
/
cheaper-targets
curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/cheaper-targets?fromCurrency=TRX&toCurrency=USDT_TRC20&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'TRX',
toCurrency: 'USDT_TRC20',
fromAmount: '100'
})
const res = await fetch(
`https://api.liddie.io/api/v1/conversions/cheaper-targets?${params}`,
{ headers: { Authorization: 'Bearer lid_live_...' } }
)
const { chosen, alternatives } = await res.json()
// alternatives.length === 0 → the picked destination is already fine
{
"chosen": "USDT_TRC20",
"alternatives": [
{
"toCurrency": "USDC_SOL",
"feePct": 1.4990,
"feeUsd": 1.5,
"toAmount": "98.109233",
"receiveUsd": 98.11,
"savingPct": 0.7912,
"savingUsd": 0.77
}
]
}
“You picked X — Y would net you more.” Prices the same source amount into a handful of alternative destinations and returns only those that are materially better. Purely advisory: nothing changes, and an alternative that cannot be priced is simply absent.
Ranking is by what you receive, not by our commission: the platform fee is driven by the source chain and is near-identical across destinations, while the destination chain’s execution cost is deducted from the output. At most 3 alternatives are returned, sorted by
savingPct descending, and anything under a 0.25 % improvement is suppressed as noise — an empty alternatives array means “your pick is already fine”.
Authorization
Dual auth — a secret API key with theconversions:read scope, or a dashboard JWT with the conversions:view permission. Dashboard sessions must belong to a merchant_admin, merchant_member or super_admin role; API-key callers are gated by scope only. See the Authentication guide.
Rate limit: 3/min.
Treat an empty
alternatives array as a positive answer — the user’s pick is already fine. Only render an upsell when an alternative is present; sub-0.25 % improvements are already suppressed server-side as noise.curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/cheaper-targets?fromCurrency=TRX&toCurrency=USDT_TRC20&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'TRX',
toCurrency: 'USDT_TRC20',
fromAmount: '100'
})
const res = await fetch(
`https://api.liddie.io/api/v1/conversions/cheaper-targets?${params}`,
{ headers: { Authorization: 'Bearer lid_live_...' } }
)
const { chosen, alternatives } = await res.json()
// alternatives.length === 0 → the picked destination is already fine
{
"chosen": "USDT_TRC20",
"alternatives": [
{
"toCurrency": "USDC_SOL",
"feePct": 1.4990,
"feeUsd": 1.5,
"toAmount": "98.109233",
"receiveUsd": 98.11,
"savingPct": 0.7912,
"savingUsd": 0.77
}
]
}
Query parameters
string
required
Source currency ticker.
string
required
The destination you picked — alternatives are compared against it.
Response fields
string
The destination you picked.
array
Materially better destinations, sorted by
savingPct descending (max 3; improvements under 0.25 % suppressed). Empty means your pick is already fine.Show properties
Show properties
string
The alternative destination.
number
Effective all-in commission in percent for that destination.
number
USD value of the fee.
string
What you would receive, decimal string.
number
USD value of the output.
number
Extra value versus the currency you chose, in percent.
number
Extra value versus the currency you chose, in USD.
Errors
| Status | Body | Why |
|---|---|---|
| 403 | { "ok": false, "error": { "code": "CONVERSIONS_DISABLED", "message": "…" } } — the envelope (unlike /quote and POST /, which send a flat body) | Feature switched off platform-wide. |
| 400 | { "ok": false, "error": { "code": "VALIDATION_ERROR", "message": "…" } } | Missing/malformed field or unsupported currencies. |
| 400 | { "ok": false, "error": { "code": "NO_SCOPE", "message": "…" } } | No merchant context on the credential. |
See also
- Get best route: the inverse question — same target, cheaper source balance.
- Get a quote: price the destination you settle on.
- Execute a conversion: run the conversion once the destination is chosen.