Developers
Relic API
Read Relic drops, prizes, odds, expected value, and creators programmatically — build trackers, bots, dashboards, or your own front-end. No API key required.
Base URL
https://relicdrops.com/api/v1Open + CORS-enabled, so you can call it from a browser or a server. Rate-limited per IP. Responses are JSON with an ok flag. Machine-readable spec: /api/v1/openapi.json.
Endpoints
chain (solana|base), inStock, prizeKind, sort (newest|ev|price), limit, offset.curl "https://relicdrops.com/api/v1/drops?chain=base&inStock=true"curl "https://relicdrops.com/api/v1/drops/1-or-1000"curl "https://relicdrops.com/api/v1/creators/<wallet>"n pulls without scraping the site: the chain, the treasury to pay, the USDC mint + decimals, per-pull and total price, and the max pulls per tx. Query: n.curl "https://relicdrops.com/api/v1/drops/1-or-1000/quote?n=1"Example response
{
"ok": true,
"drops": [
{
"id": "mch_nvknvlc0",
"slug": "1-or-1000",
"name": "1 or 1000",
"chain": "base",
"url": "https://relicdrops.com/machines/1-or-1000",
"pricePerPull": 2,
"currency": "USDC",
"expectedValue": 6.99,
"odds": { "common": 99.4, "grail": 0.6 },
"tiers": ["common", "grail"],
"buybackRate": 0.9,
"collateralBacked": true,
"itemsAvailable": 2002,
"outOfStock": false,
"prizeKind": "memecoin",
"creator": { "wallet": "0x…", "verified": true, "rating": null }
}
],
"total": 1, "limit": 50, "offset": 0
}Write endpoints
Create drops, pull, sell back, stock, and withdraw — all plain REST, callable from any language. Relic is non-custodial: the API never holds keys, so you sign each action with your own wallet and the API verifies it. Two kinds of authorization:
- A wallet signature over a short message — for create, sell-back, and withdraw. (ed25519, base58, as most Solana wallets produce.)
- An on-chain transfer you sign — for pull (pay USDC), collateral, and stocking (deposit the prize). You send the transfer, then pass its signature; the API verifies it on-chain.
name, description, thumbnail (cover image URL), priceUsdc, odds (per-rarity weights, e.g. { "common": 70, "rare": 25, "grail": 5 }), sellBackRate, minByTier (stock floors), mystery, endsAt, gate (holder gate), and either tokenPrizes (memecoin drop — each { rarity, mint, symbol, decimals, amountBase, image? }; the logo auto-resolves if you omit image) or collectible items via /drops/:id/inventory. Plus the creator wallet + a signature over Relic: create-drop @ <ms> as authMessage + authSignature. A token drop starts as a draft — fund it with /stock, then publish via /status.{ wallet, status: "live" | "paused" | "ended", authMessage, authSignature } signed over Relic: manage drop <id> @ <ms>. A new token drop starts as a draft — publish it with live once it's stocked.Relic: stock <id> @ <ms> (single-use). Each item: { name, rarity, insuredValue, image?, isRwa?, shippingFee?, shippingFeeIntl?, year?, grade?, gradingCompany? }.- Image: pass
imageas a hosted URL or a base64data:URL (same as the web uploader). For an on-chain NFT, omit it and the art auto-resolves from the chain. - On-chain NFT: also pass the deposit
signature(escrow the NFT to the treasury first) +mint(andtokenIdon Base). - RWA (physical): set
isRwa: true+shippingFee/shippingFeeIntl. The winner redeems via/pulls/:id/resolvewithdisposition:"shipped"after saving an address (below).
Relic: manage shipping address <wallet> @ <ms>. PUT body: { wallet, name, address, country, email?, message, signature }.{ wallet, n?, signature, commitId?, clientSeed? }. signature is your USDC transfer of price×n to the treasury (from /quote). Returns the prizes won + a provably-fair proof. Any failure refunds the full payment.{ disposition: "sold_back" | "shipped", message, signature } — signed over Relic: resolve pull <id> @ <ms>.{ wallet, amount, signature } — the USDC transfer to the treasury.{ wallet, signature, mint, symbol, decimals, rarity, amountBase, depositBase }.{ message, signature } — signed over Relic: withdraw <wallet> @ <ms>.{ commitId, serverSeedHash } — the server commits to a hashed seed before the outcome; the seed is revealed in the pull result.A full pull, in curl
# 1) get a fairness commit
COMMIT=$(curl -s -X POST https://relicdrops.com/api/v1/fairness/commit)
COMMIT_ID=$(echo "$COMMIT" | jq -r .commitId)
# 2) get payment instructions (treasury, USDC mint, total price)
curl -s "https://relicdrops.com/api/v1/drops/<id>/quote?n=1"
# 3) send a USDC transfer of totalPrice to the treasury, signed by your wallet,
# using your own Solana code — keep the transaction signature.
# 4) submit the pull
curl -s -X POST https://relicdrops.com/api/v1/drops/<id>/pull \
-H "Content-Type: application/json" \
-d "{\"wallet\":\"<your-wallet>\",\"n\":1,\"signature\":\"<usdc-tx-sig>\",\"commitId\":\"$COMMIT_ID\"}"Steps 3 (and the message-signing for create/sell-back/withdraw) happen in your code with your wallet — that's what keeps it non-custodial. Questions? reach out.
Optional: TypeScript SDK
If you're on TypeScript, @relic/sdk is a thin optional wrapper that builds the same signatures + transfers for you — you don't need it to use the API. It calls the exact endpoints above.
import { Connection, Keypair } from "@solana/web3.js";
import { RelicClient } from "@relic/sdk";
const relic = new RelicClient({
connection: new Connection("https://api.mainnet-beta.solana.com", "confirmed"),
keypair: Keypair.fromSecretKey(secret), // your wallet — stays on your machine
});
const { results } = await relic.pull("1-or-1000", { n: 1 }); // commit → pay → submit
if (results[0].sellBackOffer) await relic.sellBack(results[0].pull.id);