API, SDK and MCP
Every read on the site comes from these endpoints. They are public, JSON, cached for 30 to 60 seconds.
REST
| Endpoint | Returns |
|---|---|
GET /api/state | pot in SOL, next draw (ms), week id, coin count, ticket totals, last draw, recent records |
GET /api/coins | every coin: mint, pool, status, curve progress, price in SOL, SOL paid into the pot |
GET /api/coin/:mint | one coin and its ledger records |
GET /api/tickets/:address | this week's tickets, holdings at the next snapshot, odds |
GET /api/draws | every draw: list hash, VRF account, randomness, winner, payout |
GET /api/ledger?kind= | House and pot Memos, newest first |
Building transactions
POST /api/launch { owner, name, symbol, image?, description?, buySol? }
POST /api/trade { owner, mint, side: "buy" | "sell", amount }Both return base64 versioned transactions with a fresh blockhash. You sign with the owner key and send. Nothing is signed for you.
MCP
claude mcp add --transport http t22 https://<site>/api/mcp
tools: pot, tickets_of, coins, draws, launch_coinSDK
// t22.ts, no dependencies
const base = "https://<site>";
export const pot = () => fetch(base + "/api/state").then(r => r.json());
export const ticketsOf = (a: string) => fetch(base + "/api/tickets/" + a).then(r => r.json());
export const launch = (body: object) =>
fetch(base + "/api/launch", { method: "POST", body: JSON.stringify(body) }).then(r => r.json());