Docs › Build with Beluga › API reference › Prices & quotes

Exchange quote

What an exchange order between any two of BTC, ETH, SOL and XMR pays at the current market rate, with Wagyu's quote for the same amount.

GET/api/quote

The market rate between two non-Monero coins is the mean of Hyperliquid's oracle cross rate and KuCoin's cross (the two USDT mids). With Monero it is the other coin's USD price over the XMR median (Hyperliquid XMR perp mark, KuCoin XMR-USDT, Kraken XMR/USD, HTX XMR/USDT), and Monero-Bitcoin must also stay within 1% of KuCoin's XMR-BTC book. The request is refused with 503 while the sources differ by more than 1% (for Monero: after setting aside the one furthest from the median). Our answer is immediate. Wagyu's quote is returned if our server already has it for this amount (rounded to 2 significant figures, cached 60 seconds); otherwise wagyu is {"pending": true} and you can wait for it with Wagyu quote.

Query parameters

NameTypeDescription
fromrequiredstringBTC, ETH, SOL or XMR.
torequiredstringAny of the four other than from.
amountrequirednumberAmount of from: at least $100 worth at the live rate (limits.min in the answer), at most 5 BTC, 180 ETH, 4,400 SOL or 650 XMR.

Responses

200Quote.
FieldTypeDescription
limits.min / limits.maxnumberAccepted amount range in from right now (minimum $100 at the live rate).
rate.pxnumberMarket rate used: units of to per from.
rate.hl / rate.kucoinnumberThe two sources it is averaged from.
ours.outnumberWhat you receive, in to.
ours.feePctnumberOur fee in percent.
market.outnumberOutput at the market rate without fee.
wagyuobject{out, tool, costPct, vsUsPct}, {"pending": true}, {"error": "…"}, or {"notCompared": true} for pairs without XMR (we compare with Wagyu only on Monero pairs).
atstringQuote time.
400Unsupported pair or amount out of range.
{
  "error": "amount must be 0.00132–5 BTC (minimum $100)"
}
503No reliable market rate right now.
{
  "error": "price sources disagree, try again shortly"
}
429Rate limit reached; retry after the current minute.
{
  "error": "rate limit"
}