curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/quote?fromCurrency=DOGE&toCurrency=BTC&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'DOGE',
toCurrency: 'BTC',
fromAmount: '100'
})
const res = await fetch(`https://api.liddie.io/api/v1/conversions/quote?${params}`, {
headers: { Authorization: 'Bearer lid_live_...' }
})
const quote = await res.json()
{
"fromCurrency": "DOGE",
"toCurrency": "BTC",
"fromAmount": 100,
"exchangeRate": 0.0000011573046036242277,
"commissionRate": 0.004,
"commissionAmount": 0.4,
"netFromAmount": 99.6,
"toAmount": 0.00011526,
"fromAmountStr": "100.00000000",
"toAmountStr": "0.00011526",
"validUntil": "2026-07-14T00:43:26.258Z"
}
Conversions
Get a quote
Get a real-time quote for a crypto currency conversion in the Liddie API, including the rate, commission, and quoted output amount. No funds are moved.
GET
/
api
/
v1
/
conversions
/
quote
curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/quote?fromCurrency=DOGE&toCurrency=BTC&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'DOGE',
toCurrency: 'BTC',
fromAmount: '100'
})
const res = await fetch(`https://api.liddie.io/api/v1/conversions/quote?${params}`, {
headers: { Authorization: 'Bearer lid_live_...' }
})
const quote = await res.json()
{
"fromCurrency": "DOGE",
"toCurrency": "BTC",
"fromAmount": 100,
"exchangeRate": 0.0000011573046036242277,
"commissionRate": 0.004,
"commissionAmount": 0.4,
"netFromAmount": 99.6,
"toAmount": 0.00011526,
"fromAmountStr": "100.00000000",
"toAmountStr": "0.00011526",
"validUntil": "2026-07-14T00:43:26.258Z"
}
Prices a conversion. No funds move. The commission you see here comes from the fee floors described in the Conversions Overview.
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: 30/min.
curl -H "Authorization: Bearer lid_live_..." \
"https://api.liddie.io/api/v1/conversions/quote?fromCurrency=DOGE&toCurrency=BTC&fromAmount=100"
const params = new URLSearchParams({
fromCurrency: 'DOGE',
toCurrency: 'BTC',
fromAmount: '100'
})
const res = await fetch(`https://api.liddie.io/api/v1/conversions/quote?${params}`, {
headers: { Authorization: 'Bearer lid_live_...' }
})
const quote = await res.json()
{
"fromCurrency": "DOGE",
"toCurrency": "BTC",
"fromAmount": 100,
"exchangeRate": 0.0000011573046036242277,
"commissionRate": 0.004,
"commissionAmount": 0.4,
"netFromAmount": 99.6,
"toAmount": 0.00011526,
"fromAmountStr": "100.00000000",
"toAmountStr": "0.00011526",
"validUntil": "2026-07-14T00:43:26.258Z"
}
Carry the quote forward verbatim: echo
fromAmountStr as the execute fromAmount, exchangeRate as quotedRate and toAmountStr as quotedToAmount on execute — that arms both drift guards and keeps 18-decimal amounts exact.Query parameters
string
required
Source currency ticker.
string
required
Target currency ticker.
string
required
Validated as a positive decimal string (
^\d{1,30}(\.\d{1,30})?$) and passed through as a string — send the exact decimal, not a float, so 18-decimal assets keep every digit.Response fields
number
Rate used for the conversion. Internal mode: the price oracle’s rate. External mode: the effective rate implied by the quoted output (
toAmount / netFromAmount).number
The effective rate actually charged (
commissionAmount / fromAmount), not the configured percentage. On a small order the fee floors lift this well above 0.4 %.number
Commission in the source currency, rounded up at the source’s on-chain precision.
number
fromAmount − commissionAmount, rounded down.number
What you receive. In external mode this is the quoted minimum output — normally the floor on what you are credited, but a late-deposit shortfall fill can complete below it, so reconcile on the executed conversion’s
creditAmountStr, not on this quote. Prefer toAmountStr.string
The output as an exact decimal string. Prefer this over
toAmount.string
Quote issue time + 60 s.
string
"internal" or "external". Absent means internal. See the execution modes.number
External mode only — the price-protection band applied to this quote.
number
External mode only — settlement time estimate, or
null when unreported.object
Present only when the effective fee exceeds the 0.4 % base — see Fee breakdown. Omitted when the excess is below 0.01 percentage points, so a rounding hair never renders a “0.00 %” line.
liddieFeePct + providerFeePct reconstructs commissionRate × 100.Errors
| Status | Body | Why |
|---|---|---|
| 403 | { "error": "CONVERSIONS_DISABLED", "message": "…" } — flat body, not the envelope | Feature switched off platform-wide. |
| 400 | { "ok": false, "error": { "code": "VALIDATION_ERROR", "message": "…" } } | Missing/malformed field or unsupported currency. |
| 400 | { "ok": false, "error": { "code": "QUOTE_FAILED", "message": "…" } } | Quote refused or failed. message follows the merchant-safe passthrough rule (fallback "Quote failed"); minimum/maximum refusals arrive here with a concrete suggested amount — see learned minimums. If an execution-cost estimate cannot be produced, the quote is refused with Conversion temporarily unavailable — please try again shortly. |
Do not cache minimums. Re-quote; the numbers move.
See also
- Execute a conversion: turn this quote into a real conversion — echo
fromAmountStr,quotedRateandquotedToAmount. - Get cheaper targets: check whether another destination would net more for the same source amount.
- Get liquidity: a quoted target can still be unbacked — verify before executing.
- Conversions Overview: how the commission floors produce the
commissionRateyou see here.