Guide · Developers
How to swap with the XAUConnect API
Written by XAUConnect Labs · Reviewed against live product behavior · Updated August 2026
How to swap with the XAUConnect API. 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
What is the best way to swap with the XAUConnect API?
This is a working walkthrough, not a marketing page: endpoints, the EVM vs Solana fork, identification headers, and the mistakes that drain test wallets.
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
Create an ERC-20 on Ethereum mainnet via XAUConnect TokenFactory: budget ETH gas, mint supply to a hardware wallet, lock
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
Rug pulls are engineered, so the warning signs are usually visible first. Unlocked liquidity, dangerous permissions, con
What happens when you sign a swap
What your wallet signature actually authorizes on XAUConnect: connect vs approve vs swap, and what a compromised site st
What is a token swap?
What a token swap is: an on-chain pool trade, not a send or a bridge. How aggregators quote minimum received on XAUConne
Build programmatically
Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.