Build on Sterling
Every coin, family, tribute and trade on the pad, as JSON. There's no key to get and no sign-up. It works from a server, a script or a browser on any site.
https://www.sterlingpad.fun/api/v1
const res = await fetch('https://www.sterlingpad.fun/api/v1/coins?sort=top&limit=10');
const { coins } = await res.json();
for (const c of coins) console.log(c.symbol, c.role, c.marketCapUsd);
Responses are cached for five seconds at the edge, so polling faster than that returns the same answer. Times are ISO 8601 in UTC, SOL amounts are in SOL (not lamports), and token amounts are whole tokens (not base units).
Rules and addresses
/rulesThe rules the pad enforces, the shape of every coin's curve, and the addresses to check its work against: the bonding curve program, Sterling's config, and the key that signs every launch Sterling approves. launchesOpen says whether anyone can launch right now.
Coins
/coinsCoins launched on Sterling, newest first.
| sort | new (default), top for the biggest market cap first, or vamps for vamps only. |
|---|---|
| limit | 1 to 100. The default is 50. Lists look back over the newest 500 launches. |
/coins/{mint}One coin, plus every coin in its family, biggest first. A coin that isn't on Sterling returns 404. So does one put on Sterling's curve without the check, and its 404 carries unsanctioned with the mint, the pool and when the pad saw it.
Trades
/coins/{mint}/tradesEvery buy and sell on a coin's bonding curve, oldest first, read from the chain. Each has the SOL that changed hands, the price per token, and the market cap it implies. Trades after a coin graduates happen in its Meteora pool and aren't listed here.
Families
/families/{family}An original and its vamps, biggest first. A family's address is its original's mint. live counts the coins still trading; a family holds at most maxLive.
Tributes
/tributesEvery vamp's tribute, newest first: which coin paid which, the SOL spent buying the original, and how many of the original's tokens its launch burned. Takes limit like /coins.
The coin object
Every list returns coins in this shape. New fields may be added; the ones here won't be renamed or removed in v1.
| mint | The token's address. |
|---|---|
| name, symbol, description, image | As launched. image is a URL. |
| links | x, telegram and website, each a URL or null. |
| role | original or vamp. |
| family | The original's mint. For an original, its own mint. |
| pool | The coin's bonding curve pool. |
| creator | The wallet that launched it. |
| launchedAt, launchTx | When it launched, and the launch transaction's signature. |
| marketCapUsd, marketCapSol | As of the pad's last look, at most about five minutes old. Null for a coin the pad hasn't priced yet. |
| curveProgress, graduated | How full the curve is, 0 to 1, and whether it has moved to a Meteora pool. |
| lastTradeAt, dead | A coin is dead after 72 hours without a trade, which frees its slot in the family. |
| tribute | For a vamp: sol it paid, tokensBurned of the original, and the reason it counts as a vamp. Null for an original. |
| url | The coin's page on Sterling. |
Launching from code
A launch is three calls. The pad builds the transactions, your wallet signs them, and the pad sends them. Sterling never holds keys or funds. These endpoints take POST with a JSON body, and are meant for servers and scripts, not other sites' browsers.
- Check it.
POST /api/checkwith name, symbol, description, optional x, telegram and website links, image as a data URL (PNG, JPEG, WebP or GIF, under 4 MB), and your launcher wallet. It answersoriginal,vamp(with the original and the reason) orfull, and an id. The links you give are shown on the coin's Sterling page; the website in the coin's own metadata is that page. - Build it.
POST /api/buildwith verdict (that id), launcher and an optional firstBuySol. An original gets one transaction. A vamp gets two: the tribute buy, then its launch, which burns what the tribute bought. - Sign and send, in order. Sign each transaction with the launcher's wallet and
POST /api/sendit as base64, adding mint for the launch so the pad lists the coin when it lands.
import { VersionedTransaction } from '@solana/web3.js';
const pad = (path, body) => fetch('https://www.sterlingpad.fun' + path, {
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body),
}).then(async r => { const j = await r.json(); if (!r.ok) throw Object.assign(new Error(j.error), j); return j; });
const launcher = wallet.publicKey.toBase58();
const verdict = await pad('/api/check', { name, symbol, description, image, launcher });
if (verdict.kind === 'full') throw new Error('That family is full.');
// A vamp's launch also buys verdict.tribute_sol SOL of verdict.original and burns it.
const built = await pad('/api/build', { verdict: verdict.id, launcher, firstBuySol: 0.1 });
for (const t of built.txs) {
const signed = await wallet.signTransaction(VersionedTransaction.deserialize(Buffer.from(t.tx, 'base64')));
await pad('/api/send', { tx: Buffer.from(signed.serialize()).toString('base64'),
mint: t.kind === 'launch' ? built.mint : undefined });
}
The check that counts happens at build. Two people can check the same idea at the same moment and both be told it's an original. Build decides one launch at a time against every coin that has landed and every launch being signed right now. The first to build gets the idea for the two minutes it takes to sign. Anyone after that gets a 409: either recheck is true because a coin like it has landed, so check again and launch as its vamp, or someone else is signing it and you can try again shortly.
If launchesOpen is ever false, check and build return 403.
Checking it on-chain
You don't have to take the API's word for any of this.
- Every launch Sterling approves carries a memo,
sterling:v1:originalorsterling:v1:vamp, signed by the approver key from/rules. A pool on Sterling's config without it was launched around the pad. It paid no tribute and never joins a family. - A vamp's launch transaction contains an SPL Token burn of the original's mint, for the tokens its tribute bought. The original's total supply drops by exactly that much.
- Every coin launches on Meteora's Dynamic Bonding Curve with Sterling's config. Both addresses are in
/rules.
Errors and limits
Errors come back as { "error": "…" } with a status that says what kind: 400 for a bad request, 403 while launches are closed, 404 for something that isn't on Sterling, 409 when the pad changed under you, 429 for too many requests, and 503 when the vamp check is briefly down. The message is written to show a person as-is.
| Reading | No limit beyond the five-second cache. Please don't poll faster than that. |
|---|---|
| Checks | 20 an hour from one address. |
| Builds | 12 an hour from one address, and 3 per check. |