Guide · Developers
How to swap with the XAUConnect API
Written by XAUConnect Labs · Reviewed against live product behavior · Updated August 2026
The same quote and build pipeline the website uses is a public REST API at `https://xauconnect.com/api`. There is no API key required to compare routes. Your bot — or an LLM tool call — asks for a quote, receives unsigned transaction data, signs with its own key manager, then optionally records the hash for analytics.
This is a working walkthrough, not a marketing page: endpoints, the EVM vs Solana fork, identification headers, and the mistakes that drain test wallets.
Map the flow before you write code
Identify the agent
EVM: you broadcast, we do not
Solana: sign first, then relay
Cross-chain from a bot
Rate limits and hygiene
Errors you should treat as fatal vs retryable
Legal
Risk disclosure
XAUConnect is a non-custodial swap aggregator. Digital assets are volatile and may lose value rapidly. Content on this page is educational and not investment advice. Verify every contract address on the official block explorer before approving a transaction.
Frequently asked questions
Do I need KYC to use the Swap API?
No. It is a non-custodial quote/build API. You still must follow the laws that apply to your bot and your jurisdiction. The API will not KYC you because it never holds the funds.
Can an LLM call this directly?
Yes, as a tool: quote is read-only; build still requires a signer the model does not control. Never paste a private key into a prompt. Use Turnkey, KMS, or a session signer with spending limits.
Where is the interactive spec?
https://xauconnect.com/developers/api and https://xauconnect.com/openapi.json
What if quote succeeds and build fails?
Liquidity moved or the provider rejected the size. Re-quote. Do not reuse calldata from a previous block.
Trade on XAUConnect
Open the swap page to compare live routes, set slippage, and sign from your own wallet — fully non-custodial.
Continue exploring
Related markets, guides & networks
Curated next steps based on this topic — deepen your research before you trade.
How to create a token on Ethereum
Mainnet TokenFactory deploy: budget ETH gas, mint supply to hardware, lock canonical LP, treat L2 as cheaper iteration.
How to set slippage tolerance
How to choose a slippage tolerance that protects you from sandwich attacks without causing failed transactions, with con
How to spot a rug pull
Concrete on-chain warning signs of a rug: unlocked liquidity, concentrated holders, mint/blacklist permissions, and anon
What happens when you sign a swap
Connect vs approve vs swap: what each wallet signature authorizes on XAUConnect, and what a compromised site still canno
What is a token swap?
A DEX swap is a pool trade, not a send and not a bridge. How aggregators quote minimum received on XAUConnect.
Build programmatically
Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.