Gold price › Gold API

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.

How it works. Your user chooses an amount. Our API returns a transaction that buys UAS (United Africa Shilling, a digital currency backed by physical gold and redeemable for gold) on the open market. The user's own wallet signs it. The UAS goes straight to the user's wallet, and your commission goes straight to your wallet, in the same transaction. We never hold anyone's money.
LivePartner commission boardMachine-readableOpenAPI 3 specLive dataGold prices in 24 currenciesRulesTerms for partners

Why your users want it

Your commission

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.