Skip to content

DS42i/solana-token-safety-api

Repository files navigation

Solana Token Safety API

A small, paid API that checks an SPL token for common "rug" risk signals (mint/freeze authority, holder concentration, liquidity) and returns a safety score + verdict. Built to be listed on RapidAPI so other developers subscribe and pay you in regular money (payout to PayPal).

This is a product you sell — not a bot that earns on its own. Income comes from human developers subscribing. No crypto wallet involved.


The honest economics (read this first)

  • Month 1: likely near $0. A brand-new listing has no subscribers until it's discovered. The first goal is to get listed and get your first subscriber.
  • If it gets traction: a single niche/utility API typically does a few hundred $/month. The bigger numbers ($2k–8k/mo) come from APIs with 50–100 paying subscribers, or from running several APIs at once.
  • It is passive AFTER setup, not instead of it. Plan on a few days of one-time work: deploy → list → price. After that, it runs itself and the server answers subscribers automatically.
  • Fees: RapidAPI takes a flat 25% of every payment, pays you monthly via PayPal (only payout method), at the end of the following month.

What you do once (the setup)

1. Run it locally to confirm it works (5 min)

npm install
cp .env.example .env       # leave RAPIDAPI_PROXY_SECRET empty for now
npm start
# in another terminal:
curl localhost:3000/health
curl localhost:3000/v1/token/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/basic

(The second call hits Solana mainnet for real — USDC's mint — and should return authorities + holder data.)

2. Deploy it so it's online 24/7 (~$5–7/mo, ~30 min)

It must be reachable at a permanent public URL. Easiest options:

  • Render.com / Railway.app — push the repo, they build & host it, give you a URL like https://your-api.onrender.com. Set the env vars from .env in their dashboard.
  • Or any VPS (Hetzner/DigitalOcean) running npm start behind a reverse proxy.

Confirm https://your-url/health responds.

3. List it on RapidAPI (~1–2 hrs, one time)

  1. Create a provider account at https://rapidapi.com → "Add New API".
  2. Point it at your deployed base URL.
  3. Add the two endpoints:
    • GET /v1/token/{mint}/basic → free / cheap tier (your funnel)
    • GET /v1/token/{mint}/safety → PRO tier (the verdict + score)
  4. In Monetize, set plans, e.g.:
    • BASIC (Free): 100 requests/month, /basic only.
    • PRO ($10–25/mo): higher quota, unlocks /safety.
    • ULTRA ($49+/mo): high quota for heavy users.
  5. Copy the Proxy Secret RapidAPI gives you → put it in your host's RAPIDAPI_PROXY_SECRET env var → redeploy. Now only paid RapidAPI traffic is accepted.
  6. Connect PayPal under payout settings.

4. Then: nothing

Subscribers find it, subscribe, and the server answers them automatically. You get a PayPal payout at the end of the following month.


How to actually get subscribers (this is the real work)

The listing alone won't sell. The developers earning real money do this:

  • Write a clear listing: what it does, example response, why it's faster than rolling your own.
  • Post where Solana devs are (e.g. relevant dev communities, a short write-up / tutorial showing the API solving a real problem).
  • Keep it reliable (a paid RPC once you have traffic — see .env.example).
  • Once it has any traction, add more endpoints (new-launch feed, batch checks). More good endpoints = more revenue. That's how the portfolio compounds.

Endpoints

GET /v1/token/:mint/basic — raw structural facts (authorities renounced?, supply, top-holder %).

GET /v1/token/:mint/safety — adds liquidity, a 0–100 risk score, flags, and a human-readable verdict. (Returns 402 on the free plan — that's the upgrade nudge.)

GET /health — uptime check (not gated).

About

Solana SPL token safety / rug-check API — checks mint & freeze authority, holder concentration, liquidity, and returns a risk score. RapidAPI-ready.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors