Use a reachable address
The generated code uses this site’s origin. A loopback address works only on the computer hosting the site.
Generate a server-side quote request for a selected network pair.
Copy the example below, or run a request in the API console.
Open console// Run this on your server. Keep account keys out of browser code.
const response = await fetch(
'https://simpleswap.world/api/quote?from=btc&to=eth&amount=0.1&fixed=false',
{ headers: { Accept: 'application/json' } }
);
const quote = await response.json();
if (!response.ok) throw new Error(quote.error);
console.log(quote.estimatedAmount, quote.mode);The generated code uses this site’s origin. A loopback address works only on the computer hosting the site.
Show the selected asset and network together so recipients can confirm compatibility.
Local account keys and provider credentials should never be inserted into a public embed.