Developers
How we rank swap routes: minimum received, not headline rate
XAUConnect compares 1inch, 0x, and Jupiter by net tokens after the disclosed platform fee — why a quieter path often beats a marketing mid-price.
Most aggregator landing pages say “best price.” That phrase is meaningless until you specify the ranking key. XAUConnect ranks candidate routes by minimum received after our disclosed platform fee — the floor encoded in the transaction you sign — not by the mid-market rate on a screenshot.
This post is the engineering note behind the new Learn article on routing. It is written for integrators who are about to hard-code the wrong comparison in a bot.
What we query
EVM quotes fan out to configured 1inch and 0x graphs plus any path our AggregatorRouter can build. Solana quotes go through Jupiter. Each provider returns estimated output, a gas hint, and a hop list. Quotes that fail simulation or return zero output are dropped before ranking.
Why headline rate lies
A route can show a better mid price and still deliver fewer tokens after LP fees, partner fees, and price impact. Ranking on mid price is how you ship a UI that looks winning in a thread and losing in a wallet. Compare the minimum-received field in POST /swap/quote against a single-DEX UI on the same block, same addresses, same size.
Build is not quote
POST /swap/build returns unsigned EVM { to, data, value } or Solana VersionedTransaction bytes. If the pool moved, simulation fails or the on-chain minimum check reverts. Re-quote. Do not reuse calldata. We still do not submit EVM transactions for you.
Further reading
- Learn: How XAUConnect routing works
- Learn: How XAUConnect fees work
- Docs: /developers/api/swap
Ready to integrate?
Follow the quickstart or explore the OpenAPI reference.