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.
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.
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.
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.
Submits and returns the result. You can also submit yourself via Horizon (classic) or Soroban RPC (soroban) if you prefer.
/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.
RFQ Maker API
Quote takers directly with firm prices and settle atomically on-chain. You sign one Soroban authorization entry per quote with your own key; Ufama never holds it and never holds funds — there is no escrow. If the taker accepts, their transaction carries your signed entry and both legs settle together or not at all. The protocol fee (0.5 bps) comes out of the taker's payment leg. Issuers can quote their own assets at NAV; the contract can enforce a NAV band on-chain for pairs with an oracle feed.
Maker keys are issued manually (same contact as below); the key's label is the trust badge takers see on your quote card. A reference bot that does all of this is in the repo: backend/src/rfq/maker-bot.ts (npm run maker).
The server simulates the full settlement with your balances before answering, so a quote you cannot fund, or one outside its NAV band, is refused here with the contract's own reason. Sign authEntryXdr with validUntilLedgerSeq = quote.expiryLedger.
Every submission is verified against the live host in enforce mode (signature, nonce, expiry, balances, NAV band) before the taker sees it. One live quote per maker per request — a re-quote supersedes. Requests carry a reference (NAV from RedStone/Reflector or the on-chain feed, the best DEX route, standing-book fills) so you can price off the same anchor the taker compares against.
API keys, integration help, or anything else: hello@ufama.trade