Public quote (no key)

A public, unauthenticated quote endpoint for price-display and comparison sites (aggregators, wallets, dashboards). It returns GhostSwap's standard rate, needs no API key, and is rate-limited so it can be polled safely.

Use this for displaying prices. To execute a swap and earn commission, use the authenticated POST /v1/quotes + POST /v1/swaps endpoints with your Bearer key.

GET/v1/public/quote

Query parameters

NameTypeRequiredDescription
fromstringrequiredSource ticker (canonical ticker from /v1/currencies, e.g. xmr). Common aliases like usdttrx are accepted and normalized.
tostringrequiredDestination ticker (e.g. usdtrx for USDT-TRON, usdt20 for USDT-ERC20, btc).
amountstringoptionalSource amount as a decimal string. Defaults to "1".

Example

curl "https://partners-api.ghostswap.io/v1/public/quote?from=xmr&to=usdtrx&amount=1"
{
  "quote": {
    "from": "xmr",
    "to": "usdtrx",
    "amountFrom": "1",
    "amountTo": "285.35",
    "networkFee": "0.94",
    "amountUserReceives": "284.41",
    "rate": "285.63",
    "min": "0.10",
    "max": "2337.97",
    "rateType": "float",
    "feeNote": "Standard GhostSwap rate (service fee included)."
  }
}

Display rate as the unit price, or amountTo as the "you get" amount. The rate already includes GhostSwap's standard service fee, so it is the real, executable number — do not add anything on top for display.

Authentication

None. This is the only /v1 endpoint that does not require a Bearer key.

Rate limits & caching

  • 60 requests per minute per IP. Responses carry standard RateLimit-Limit / RateLimit-Remaining / RateLimit-Reset headers.
  • Responses set Cache-Control: public, max-age=10. Cache each (from, to, amount) result for 10–30s and serve cached values to your visitors instead of calling per page view.
  • On 429, back off and retry after RateLimit-Reset.
  • CORS is open (Access-Control-Allow-Origin: *), so it can be called from a browser — but a small server-side cache is strongly recommended.

Errors

StatusMeaning
400Invalid params (bad/missing ticker, non-positive amount, or from == to).
429Rate limit exceeded — retry after RateLimit-Reset.
503Service temporarily unavailable — retry later.