RRelic

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/v1

Open + 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

GET/drops
List drops. Query: chain (solana|base), inStock, prizeKind, sort (newest|ev|price), limit, offset.
curl "https://relicdrops.com/api/v1/drops?chain=base&inStock=true"
GET/drops/:idOrSlug
A single drop with its full prize pool, odds, EV, and collateral status. Accepts the drop id or its slug. Mystery drops keep value + rarity public but redact prize identity.
curl "https://relicdrops.com/api/v1/drops/1-or-1000"
GET/creators/:wallet
A creator's public profile (handle, verification, rating, stats) and their live drops. Accepts a Solana or Base wallet.
curl "https://relicdrops.com/api/v1/creators/<wallet>"
GET/drops/:idOrSlug/quote
Prepare a pull — everything needed to pay for 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"
GET/health
Liveness + version.

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.
POST/drops
Create a drop — full parity with the web creator. Body: 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.
POST/drops/:id/status
Publish, pause, or end a drop (owner only). Body: { 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.
POST/drops/:id/inventory
Stock NFT, collectible, or physical (RWA) prizes (owner / approved supplier). Signed over Relic: stock <id> @ <ms> (single-use). Each item: { name, rarity, insuredValue, image?, isRwa?, shippingFee?, shippingFeeIntl?, year?, grade?, gradingCompany? }.
  • Image: pass image as a hosted URL or a base64 data: 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 (and tokenId on Base).
  • RWA (physical): set isRwa: true + shippingFee / shippingFeeIntl. The winner redeems via /pulls/:id/resolve with disposition:"shipped" after saving an address (below).
POST | PUT/profile/shipping
Your saved shipping address — required before redeeming a physical (RWA) prize. PII, so both read (POST) and write (PUT) are signed over Relic: manage shipping address <wallet> @ <ms>. PUT body: { wallet, name, address, country, email?, message, signature }.
POST/drops/:id/pull
Pull. Body: { 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.
POST/pulls/:id/resolve
Sell back or keep a revealed prize. Body: { disposition: "sold_back" | "shipped", message, signature } — signed over Relic: resolve pull <id> @ <ms>.
POST/drops/:id/collateral
Post USDC collateral to back a drop (owner only). Body: { wallet, amount, signature } — the USDC transfer to the treasury.
POST/drops/:id/stock
Stock a token prize (deposit the token into escrow). Body: { wallet, signature, mint, symbol, decimals, rarity, amountBase, depositBase }.
POST/creators/:wallet/withdraw
Withdraw your earnings. Body: { message, signature } — signed over Relic: withdraw <wallet> @ <ms>.
POST/fairness/commit
Step 1 of a pull. Returns { 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);