Gold API: offer gold-backed savings in your app
For wallets, exchanges, fintech apps, Telegram bots and websites. No sign-up, no API key. Earn up to 1% on every buy.
Why your users want it
- Gold is the savings people already trust. UAS lets them start from about $1 instead of a whole bar or coin.
- The gold reserve is published in a signed reserve statement and proven on-chain, and UAS can be redeemed for physical gold through our offices and partners.
- They keep control: UAS sits in their own wallet and they can sell it at any time.
Your commission
- Add
partner(your Solana wallet) andpartnerFeeBps(0 to 100; 100 = 1%) to quote and build calls. - The buyer sees the commission in the quote and in their wallet's preview, and pays it straight to your wallet in the same transaction. No invoices, no waiting, no minimum.
- Every confirmed order appears on the public board with your totals, live.
- Your wallet must be a normal Solana wallet holding a little SOL (at least 0.00089). No commission on sells.
Base URL
https://unitedafricashilling.com/api/gold/v1
1. Prices and quote
GET /prices
GET /quote?sol=0.1&partner=<your wallet>&partnerFeeBps=50
The quote returns what the buyer pays, your commission, the UAS they receive (and the minimum), its USD value, its gold value at today's redemption rate, and a ready sentence for your screen in display.
2. Build, sign, send
POST /buy/build {"sol":0.1,"wallet":"<buyer>","partner":"<your wallet>","partnerFeeBps":50}
-> {"id":"…","tx":"<base64 transaction>","expiresInSeconds":120,"quote":{…}}
POST /buy/submit {"id":"…","tx":"<signed base64>"} -> {"signature":"…"}
POST /buy/confirm {"id":"…","signature":"…"} (if the wallet sent it itself)
The buyer's wallet is the fee payer and the only signer. If the market moves beyond the minimum, the transaction fails and nothing is taken.
3. Balance and selling
GET /balance?wallet=<buyer> UAS held, USD value, gold value at today's rate, redemption eligibility
GET /sell/quote?uas=1000000
POST /sell/build {"uas":1000000,"wallet":"<buyer>"}
POST /sell/submit {"id":"…","tx":"<signed base64>"}
Example (JavaScript)
const API = "https://unitedafricashilling.com/api/gold/v1";
const b = await (await fetch(API + "/buy/build", { method: "POST", headers: { "content-type": "application/json" },
body: JSON.stringify({ sol: 0.1, wallet: user.publicKey.toBase58(), partner: MY_WALLET, partnerFeeBps: 50 }) })).json();
const tx = VersionedTransaction.deserialize(Buffer.from(b.tx, "base64"));
const signed = await wallet.signTransaction(tx); // the user approves in their own wallet
const r = await (await fetch(API + "/buy/submit", { method: "POST", headers: { "content-type": "application/json" },
body: JSON.stringify({ id: b.id, tx: Buffer.from(signed.serialize()).toString("base64") }) })).json();
Showing it to users
Say what it is, simply and correctly. Good: "Buy gold-backed UAS. Worth 0.077 g of gold at today's rate." Not allowed: "0.077 g of gold saved", "guaranteed", "fixed value", "savings account", "returns". The display text in each quote is already correct. Full rules: terms.
Limits
120 reads and 20 builds or submits a minute per IP. Buys from 0.001 SOL; large buys are refused when the market cannot fill them fairly. Need more? support@unitedafricashilling.com.