{"openapi":"3.1.0","info":{"title":"StonkFun Developer API","version":"1.0.0","description":"Launch tokens and read platform data. Launches are non-custodial: the creator signs their own fee payment and the platform never holds a private key."},"servers":[{"url":"https://www.stonkfun.xyz"}],"tags":[{"name":"Data","description":"Tokens, launches, pairs, rewards and revenue."},{"name":"Launch","description":"Create tokens programmatically."}],"paths":{"/api/public/v1/tokens":{"get":{"tags":["Data"],"summary":"List and search tokens","description":"Every token with a live platform pool, with market data. Works without a key at a lower rate limit.","parameters":[{"name":"q","in":"query","required":false,"description":"Search name, symbol or mint.","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Defaults to marketCap.","schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"description":"Filter by fee model.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Filter by graduation status.","schema":{"type":"string"}},{"name":"quoteMint","in":"query","required":false,"description":"Filter by paired token.","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Filter by pair category, e.g. xstock.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Defaults to 1.","schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"description":"1-100, defaults to 25.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/tokens/{mint}":{"get":{"tags":["Data"],"summary":"Get one token","description":"Live market data plus the launch record, when the platform launched it.","parameters":[{"name":"mint","in":"path","required":true,"description":"Token mint address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/tokens/{mint}/burns":{"get":{"tags":["Data"],"summary":"Token burn history","description":"Totals and recent burns of this token by the platform fee sweep.","parameters":[{"name":"mint","in":"path","required":true,"description":"Token mint address.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-100, defaults to 25.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/tokens/{mint}/rewards":{"get":{"tags":["Data"],"summary":"Token holder rewards","description":"Distribution totals for a reward coin. Standard launches answer with mode \"standard\" and a null rewards object.","parameters":[{"name":"mint","in":"path","required":true,"description":"Token mint address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/tokens/{mint}/fees":{"get":{"tags":["Data"],"summary":"Creator claimable fees","description":"Trading fees currently claimable by the creator of a standard (fee coin) launch. Read-only: claiming is a wallet-signed action on the token page, never an API operation. Reward coins and pump launches return claimable: null with a reason.","parameters":[{"name":"mint","in":"path","required":true,"description":"Token mint address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/tokens/{mint}/backing":{"get":{"tags":["Data"],"summary":"Token backing value","description":"USD permanently locked behind a pump-launched token, summed from the platform’s own locked positions. Only meaningful for pump launches.","parameters":[{"name":"mint","in":"path","required":true,"description":"Token mint address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/launches":{"get":{"tags":["Data"],"summary":"List launches","description":"The launch ledger, newest first. Filter by creator to find your own.","parameters":[{"name":"creator","in":"query","required":false,"description":"Filter by creator wallet.","schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"description":"Filter by fee model.","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"Only launches at or after this time.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Defaults to 1.","schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"description":"1-100, defaults to 25.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/pairs":{"get":{"tags":["Data"],"summary":"List launchable pairs","description":"Quote tokens a new launch can be paired against. Call this first — quoteMint must be one of these.","parameters":[{"name":"category","in":"query","required":false,"description":"Filter by category.","schema":{"type":"string"}},{"name":"launchable","in":"query","required":false,"description":"Set true to exclude retired categories.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/rewards":{"get":{"tags":["Data"],"summary":"Rewards overview","description":"Lifetime payout totals per reward coin plus recent distribution transactions.","parameters":[{"name":"limit","in":"query","required":false,"description":"1-100, defaults to 25.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/revenue":{"get":{"tags":["Data"],"summary":"Platform revenue and burns","description":"Fee revenue, buybacks and burns.","parameters":[{"name":"limit","in":"query","required":false,"description":"1-100, defaults to 25.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/stats":{"get":{"tags":["Data"],"summary":"Platform stats and config","description":"Aggregate totals plus the thresholds and switches a client needs, so your UI tracks the platform instead of hardcoding it.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/launches/prepare":{"post":{"tags":["Launch"],"summary":"Step 1: prepare a launch","description":"Validates the token and returns a signed quote plus an unsigned SOL payment transaction for the creator to sign.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["creatorWallet","quoteMint","name","symbol","logo"],"properties":{"creatorWallet":{"type":"string","description":"Wallet that will own and pay for the launch."},"quoteMint":{"type":"string","description":"Pair to launch against, from GET /pairs."},"name":{"type":"string","description":"1-32 bytes."},"symbol":{"type":"string","description":"1-10 bytes."},"logo":{"type":"string","description":"data:image/(png|jpeg|webp);base64,... up to 512 KB."},"mode":{"type":"string","description":"standard = fee coin (50/50 with creator). reward = reward coin (85% to holders). Defaults to standard."},"twitter":{"type":"string","description":"Optional social link."},"telegram":{"type":"string","description":"Optional social link."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/launches/submit":{"post":{"tags":["Launch"],"summary":"Step 2: submit payment and launch","description":"Broadcasts the signed payment and creates the token. Returns status \"completed\" or \"processing\" — never pay twice.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signedQuote","signedTransaction","logo"],"properties":{"signedQuote":{"type":"string","description":"From /prepare."},"signedTransaction":{"type":"string","description":"The paymentTransaction from /prepare, signed by the creator."},"logo":{"type":"string","description":"The identical logo sent to /prepare."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/launches/{paymentSignature}":{"get":{"tags":["Launch"],"summary":"Launch status","description":"Poll this after a \"processing\" response until status is \"completed\".","parameters":[{"name":"paymentSignature","in":"path","required":true,"description":"Signature of the fee payment.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}},"/api/public/v1/launches/{paymentSignature}/resume":{"post":{"tags":["Launch"],"summary":"Resume a launch","description":"Optional. Pushes a queued launch forward rather than waiting for the automatic retry. Takes no body.","parameters":[{"name":"paymentSignature","in":"path","required":true,"description":"Signature of the fee payment.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","forbidden","not_found","method_not_allowed","conflict","rate_limited","internal","service_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer"}}}}}}}}}}}}}