Developer API Documentation
Fetch real-time market data and deploy tokens seamlessly via standard HTTP requests. No registration or API keys are required; deployments are authenticated directly by your wallet's signature on the fee transaction, ensuring cryptographically secure authorization without API key management.
Entirely non-custodial architecture. We never request, hold, or process private keys. All signatures are generated locally in your environment, and platform contracts operate exclusively on your signed transactions.
Quickstart
All endpoints are publicly accessible, including deployment routes, protected by IP-based rate limiting per minute. Test directly from your terminal:
# No registration or sign-up needed. Just query: curl https://www.stunkfun.xyz/api/public/v1/tokens?sort=newest # Fetch available launch pairs: curl https://www.stunkfun.xyz/api/public/v1/pairs?launchable=true
Launching a Token
Deployment requires a simple two-step workflow. Calling /launches/prepare generates an unsigned payment transaction; sign it locally with your creator wallet and forward it to /launches/submit. First, select a fee mode:
Fee mode: "standard"
Trades on a 1% pool. Trading fees are split 50/50 between creator and protocol. Creators claim earnings from wallet dashboard.
Reward coin mode: "reward"
Trades on a 1% pool with a 3% transfer tax distributed directly to holders pro-rata in the quote currency across all DEX venues.
Raydium Pairs: Every token is paired against an asset class (xStocks, PreStocks, Currencies, SOL, or custom mints). Fetch pairs via GET /pairs and supply quoteMint.
import { Connection, Keypair, Transaction } from '@solana/web3.js'; import fs from 'node:fs'; const API = 'https://www.stunkfun.xyz/api/public/v1'; const creator = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(fs.readFileSync('key.json')))); // 1. Select a launch pair const pairs = await (await fetch(`${API}/pairs?launchable=true`)).json(); const pair = pairs.find(p => p.item_symbol === 'NVDAX') ?? pairs[0]; // 2. Prepare unsigned payment transaction const prepareRes = await fetch(`${API}/launches/prepare`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ creatorWallet: creator.publicKey.toBase58(), quoteMint: pair.mint, name: 'My STUNK Token', symbol: 'STUNK', mode: 'standard' }) }); const prepared = await prepareRes.json(); // 3. Sign fee payment locally const tx = Transaction.from(Buffer.from(prepared.paymentTransaction, 'base64')); tx.sign(creator); // 4. Submit signed deployment const submitRes = await fetch(`${API}/launches/submit`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ signedQuote: prepared.signedQuote, signedTransaction: tx.serialize().toString('base64') }) }); const result = await submitRes.json(); console.log('Deployment Success:', result.mint);
Endpoint Reference
Errors
Every failure returns { error: { code, message } }. Branch logic on error code:
| Code | HTTP Status | Meaning |
|---|---|---|
invalid_request |
400 | A parameter is missing or malformed. |
forbidden |
403 | Action refused. Public deployments are read-only for admin routes. |
not_found |
404 | Requested resource or mint address does not exist. |
rate_limited |
429 | Per-minute request limit exceeded. Retry after delay. |
internal |
500 | Internal server error. Safe to retry request. |
Spotted something wrong or unclear on this page? Tell us on X and we'll fix it.