routing

Quote a gasless route

Best gasless route for a single intent. POST a JSON body (preferred from code); the same fields are also accepted as GET query parameters with an identical response. EVM<->EVM runs best-of-N over the bridge aggregators; a Stellar/Solana/Bitcoin/Tron side is dispatched to its dedicated leg. Rate limit 40/min.

post/api/route/quote

Request

  • Base URL: https://api.anygas.xyz/svc
  • URL: https://api.anygas.xyz/svc/api/route/quote
  • Auth: none declared

Headers

x-anygas-passstring

Anonymous quota raise: base64(JSON {preparedMsg, sig}) of a one-time Plus blind pass (RFC 9474). Exempts THIS request from the rate limit and, unlike x-anygas-key, is unlinkable to any identity or other request. Free passes: POST /api/plus/trial (20/day). Over the OHTTP relay put the pass in body.pass instead (headers do not cross the envelope).

Request body

amountstring required

Source-token smallest units.

fromTokenstring

Symbol or address; omit for native.

toTokenstring

Symbol or address; omit for native.

toAddressstring

Recipient; defaults to fromAddress.

fromAddressstring

Quote origin; anonymous default used if omitted.

slippagenumber

Fraction, e.g. 0.005.

tokenstring

Shorthand: sets BOTH fromToken and toToken (e.g. "USDC"). Accepted on POST bodies and as a GET query parameter. Explicit fromToken/toToken win when present.

Example request

{
  "amount": "50000000",
  "fromToken": "USDC",
  "toToken": "BTC",
  "token": "USDC"
}

Response

Best route quote

gaslessboolean
toobject
bridgestring
viastring[]
bestOfinteger

EVM<->EVM: number of aggregators compared

comparedobject[]

EVM<->EVM: per-aggregator outputs

durationSecnumber
robynRouteFeeBpsinteger
robynRouteFeestring
quoteOnlyboolean

TRUE means this corridor can be PRICED but NOT settled: POST /api/route/execute will refuse it with status UNSUPPORTED_DIRECTION. Absent or false means the route is executable. ALWAYS branch on this before presenting a quote as actionable - a quoteOnly route is for price comparison only. Currently set for Solana (both directions) and stellar->evm.

executeReadyboolean

False alongside quoteOnly:true. Present so a client can gate on a single positive assertion of executability rather than inferring it from the absence of an error.

quoteOnlyReasonstring

Human-readable explanation of why this corridor cannot settle, and what would lift the restriction.

notestring

Example response

{
  "gasless": true,
  "from": {
    "chain": 42161,
    "token": "USDC",
    "amount": "50000000"
  },
  "to": {
    "chain": "bitcoin",
    "token": "BTC",
    "estimated": "78660",
    "min": "76693",
    "recipient": "bc1q…"
  },
  "bridge": "chainflip",
  "via": [
    "Chainflip (REGULAR)"
  ],
  "bestOf": 3,
  "durationSec": 408,
  "robynRouteFeeBps": 25,
  "robynRouteFee": "125000",
  "quoteOnly": true,
  "quoteOnlyReason": "Solana settlement is not proven in either direction - this quote is for comparison only.",
  "floatlane": {
    "fee": "0",
    "capNow": "15020000"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.