Build on a clear contract

Exchange API.
Made understandable.

Read the local asset catalogue, request a quote, create an account-owned order, and track its status using Next.js route handlers.

Local endpointGET /api/quote

JSON requests and responses.
Explicit demo and live modes.

Try a quote request

This console calls the running local endpoint. It never creates an order or sends funds.

Response
Run a request to inspect the response.
curl 'https://simpleswap.world/api/quote?from=btc&to=eth&amount=0.1&fixed=false'

Endpoints at a glance

MethodRoutePurpose
GET/api/currenciesSupported asset and network options
GET/api/quoteEstimate, limits, fees, expiry, and mode
POST/api/exchangesCreate an order with recipient validation
GET/api/exchanges/{id}Read an order owned by your account or browser
POST/api/exchanges/{id}/cancelCancel a waiting demo order
POST/api/exchanges/{id}/advanceAdvance one simulated demo stage

Authenticate your integration

Create a local API key in your account, copy it once, and store it as a server environment variable. Use the bearer header for account-owned exchange requests. Anonymous demo quotes do not need a secret. For live exchanges, request and submit the quote using the same Bearer key or browser session and include the returned quoteToken.

Authorization: Bearer YOUR_LOCAL_API_KEY
API key guide

Handle errors deliberately

Read the HTTP status and error message. Correct invalid addresses or amount limits before retrying, wait when rate limited, and inspect an existing order before recreating it.

Error reference
Local API keys identify accounts in this installation. A live exchange provider key is a separate server configuration. Demo mode never creates a deposit address.