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

Compare prices

Our bid for XMR2 next to the XMR/USDC reference price and the XMR1/USDC book on Hyperliquid mainnet.

GET/api/compare

Without parameters: top-of-book comparison (cached about 15 seconds). With amount: also walks the XMR/USDC and XMR1/USDC bid books to show what selling that many XMR fetches at depth, falling back to Hyperliquid's aggregated book when 20 levels are not deep enough.

Query parameters

NameTypeDescription
amountnumberXMR to price at depth. Optional; greater than 0, at most 100000.

Responses

200Prices; depth only with amount.
FieldTypeDescription
atstringTime of the snapshot (ISO 8601).
referencePxnumberXMR/USDC reference: Hyperliquid's XMR perp mark price.
ours.bidnumberOur bid per XMR2 in USDC.
ours.premiumPctnumberPremium over the reference, in percent.
ours.livebooleanWhether the bid is currently placed on Hyperliquid.
xmr1objectXMR1/USDC book: bid, ask, bidVsRefPct, bidDepthUsd1pct (USD of bids within 1% of the reference), avg50 (average fill selling 50 XMR1).
advantagePctnumberOur bid versus selling 50 XMR1, in percent.
depthoptionalobjectWith amount: ours, market and xmr1, each with value (USDC) and avg; books also filled (XMR the book can take) and full.
400amount above 100000.
{
  "error": "amount too large"
}
429Rate limit reached; retry after the current minute.
{
  "error": "rate limit"
}