Integrator API

REST API for wallets and payment apps that want swaps on Stellar without running their own routing. Flow: quote → build → your user signs → send. Ufama never sees keys — every transaction is signed client-side by your user's wallet.

Base URL & auth
https://atomicswap-aggregator-production.up.railway.app

Every /v1 request needs an API key, sent as x-api-key or Authorization: Bearer. Keys are issued manually — email hello@ufama.trade. Rate limit: 120 requests/min per key.

POST /v1/quote
{ "assetIn": "XLM", // symbol or SAC contract address "assetOut": "USDC", "amount": "1000000000", // base units (7 decimals), EXACT_IN "slippageBps": 50, // optional, default 50 "feeBps": 25, // optional partner fee, max 100 (1%) "referralAddress": "G..." // required when feeBps > 0 }

Returns amountOut (net of protocol fee and your partner fee), minAmountOut, kind ("classic" or "soroban"), partnerFee, partnerFeeCollected, and the venue segments. Quotes are indicative; build re-prices.

POST /v1/quote/build

Same body plus from (the user address that will sign). Returns an unsigned xdr. Hand it to the user's wallet (Freighter, xBull, LOBSTR — any SEP-43 signer) and have them sign against Public Global Stellar Network ; September 2015.

Partner economics: on classic (SDEX) routes your feeBps is a second payment op inside the same transaction — atomic with the swap, paid in the output asset. Your referralAddress must hold a trustline for every output asset you enable. Soroban routes report partnerFeeCollected: false for now.

POST /v1/send
{ "xdr": "<signed transaction XDR>" }

Submits and returns the result. You can also submit yourself via Horizon (classic) or Soroban RPC (soroban) if you prefer.

GET /v1/tokens · GET /v1/health

/v1/tokens: the tradeable universe with contract addresses and venue-volume ranking (sort by venueVolume for a "top tokens" list). /v1/health: auth check — echoes which partner your key belongs to.

Contact

API keys, integration help, or anything else: hello@ufama.trade