Token-2022 Casino
Help and docs

API, SDK and MCP

Every read on the site comes from these endpoints. They are public, JSON, cached for 30 to 60 seconds.

REST

EndpointReturns
GET /api/statepot in SOL, next draw (ms), week id, coin count, ticket totals, last draw, recent records
GET /api/coinsevery coin: mint, pool, status, curve progress, price in SOL, SOL paid into the pot
GET /api/coin/:mintone coin and its ledger records
GET /api/tickets/:addressthis week's tickets, holdings at the next snapshot, odds
GET /api/drawsevery 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_coin

SDK

// 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());
API, SDK and MCP7 of 7
Token-2022 CasinoHelp and docs
1% fee