BUILD WITH STONKERAGE / REFERENCE

The data behind
the market.

Read token performance, positions, and supported markets through the app’s JSON endpoints.

START HERE

Read from the current origin.

Paths below are relative to the site you are viewing. These read-only endpoints return the backend’s current data. Unavailable metrics may be null; check availability before offering transaction actions.

const response = await fetch('/api/tokens');
if (!response.ok) throw new Error('Request failed');
const { data } = await response.json();
console.log(data.tokens);

Values can be unavailable. Handle null values and failed requests instead of treating missing data as zero.

GET/api/tokens

Explore tokens.

Returns a token list with market data and perpetual strategy information. For an individual token, use /api/tokens/:mint.

{
  "data": {
    "tokens": [{
      "name": "Example token",
      "symbol": "EXAMPLE",
      "perpAsset": "SOL",
      "perpDirection": "LONG",
      "leverage": 5,
      "positionStatus": "ACTIVE"
    }]
  }
}

Example excerpt. The actual response contains additional fields: mint, creatorWallet, launchedAt, quote, priceUsd, marketCap, volume24h, perpVenue (hyperliquid or lighter), perpAccountRef, hasActiveLevPosition, markPrice, entryPrice, liqPrice, positionSize, perpPnlUsd, perpPnlPct, marginBridged, claimableFeesUsd, nextTopUpProgress, takeProfit, buyback, and metadata links. positionStatus is ACTIVE, AWAITING_FEES, or UNAVAILABLE when the venue could not be read.

Market fields come from the StonkFun API first and from Jupiter price candles only when StonkFun has no value. Responses are cached for about 20 seconds; while a refresh runs, the previous values are served.

GET/api/tokens/:mint

One token.

The same row as in /api/tokens, plus platformUrl and stonkUrl. Returns 404 when the mint is not registered.

GET/api/tokens/:mint/take-profit

The token’s take-profit state, not wrapped in data.

{
  "mint": "…",
  "milestone": 2,
  "completedMilestones": 1,
  "triggerMultiple": 1.4,
  "progressPct": 42.5,
  "estimatedTriggerPrice": 187.2,
  "distanceFromMarkPct": 3.1,
  "ready": false,
  "currentProfitUsd": 12.75,
  "requiredProfitUsd": 30,
  "realizedTpProceedsUsd": 25,
  "markPrice": 181.6,
  "status": "ACTIVE",
  "pipeline": null
}

distanceFromMarkPct is unsigned. A LONG trigger sits above the mark and a SHORT trigger below it.

GET/api/tokens/:mint/fees

Claimable creator fees for the token as reported by the StonkFun API, returned as { "data": … } in the upstream shape.

GET/api/charts/:mint?interval=1_MINUTE&candles=180

Price candles.

Price candles for a registered token. interval is one of 1_MINUTE, 5_MINUTE, 15_MINUTE, 1_HOUR, 4_HOUR, 1_DAY; candles is limited to between 20 and 300. Responses are cached for 15 seconds and rate limited.

{
  "data": {
    "mint": "…",
    "interval": "1_MINUTE",
    "candles": [{ "time": 1758600000, "open": 0.0021, "high": 0.0023, "low": 0.002, "close": 0.0022, "volume": 1450.5 }]
  }
}
GET/api/stats

The market at a glance.

Aggregate token count, volume, funded margin, active positions, and unrealized profit or loss, plus buyback and burn totals.

{
  "data": {
    "totalTokens": 31,
    "totalVolume24h": 125000.5,
    "totalVolume24hPartial": false,
    "totalMarginFunded": 13872.1,
    "totalFeesBridged": 13872.1,
    "totalBridgeSettled": 13500.4,
    "totalPerpPnl": 812.3,
    "totalRealizedProfitUsd": 410.2,
    "totalPendingBuybackUsd": 52.1,
    "buybackQueuedForReturnUsd": 40,
    "buybackInFlightUsd": 0,
    "buybackInventoryUsd": 12.1,
    "buybackStage": null,
    "buybackAttention": 0,
    "totalBuybackExecutedUsd": 1171.55,
    "totalStonkerageBurned": "3936861667359",
    "totalStonkerageBurnedTokens": 3936861.667359,
    "totalChildBurned": "0",
    "totalChildBurnedTokens": 0,
    "activePositions": 12,
    "keeperIntervalMs": 30000
  }
}

Totals built from per-token values are null when any token’s value is unavailable. totalVolume24hPartial is true when some tokens had no volume. Burn amounts ending in Burned are raw integer strings (6 decimals); the …Tokens fields are in token units.

GET/api/competition

Market-cap competition.

Rules and a ranked leaderboard. Each entry’s peak market cap sets its prize tier; peaks are recorded as live market caps rise.

{
  "data": {
    "running": true,
    "startAt": 1758585600000,
    "endAt": null,
    "tierMarketCapUsd": 100000,
    "tierPrizeUsd": 500,
    "maxTiers": 10,
    "maxPrizeUsd": 5000,
    "totalPrizeUsd": 1000,
    "entries": [{
      "mint": "…",
      "name": "Example token",
      "symbol": "EXAMPLE",
      "creatorWallet": "…",
      "launchedAt": 1758590000000,
      "imageUrl": null,
      "currentMarketCapUsd": 240000,
      "peakMarketCapUsd": 260000,
      "peakAt": 1758595000000,
      "tier": 2,
      "prizeUsd": 1000,
      "nextTierMarketCapUsd": 300000,
      "progressToNextPct": 60,
      "tierReachedAt": { "1": 1758591000000, "2": 1758594000000 }
    }]
  }
}

Example values. The configured rules come from the server.

GET/api/perps

Find a perpetual market.

Returns supported markets, their venue, maximum leverage, precision, and pricing. Listing a market does not mean execution is currently enabled.

GET/api/pairs

Lists available quote tokens for launch configuration.

GET/api/pricing?quoteMint=:mint

Launch pricing.

StonkFun LaunchLab pricing for a quote token, passed through unchanged in the upstream shape. quoteMint defaults to SOL; an invalid mint returns 400.

GET/api/config

Check availability first.

Read the app’s public configuration, including whether launching is enabled. Use launchEnabled and launchDisabledReason from the current response; availability can change.

{
  "data": {
    "launchEnabled": true,
    "launchDisabledReason": null,
    "keeperEnabled": true
  }
}

This is an app endpoint reference. For upstream StonkFun integration details, see StonkFun developer docs ↗.

GET/healthz

Is it up?

Liveness only. Returns 200 while the web server is running.

{ "status": "ok", "timestamp": 1758600000000 }
GET/readyz

Readiness. Returns 200 when launches are enabled, the keeper is running with a recent successful tick, and nothing needs attention; otherwise 503 with the same body.

{
  "ready": false,
  "launchDisabledReason": null,
  "keeperEnabled": true,
  "keeper": { "running": true, "lastTickAt": 1758600000000, "lastSuccessfulTickAt": 1758600000000, "lastError": null },
  "lighter": { "enabled": false, "launchReady": false, "signerReady": false, "marketReady": false, "baseReady": false, "reason": "Lighter execution is disabled" },
  "attention": [{ "mint": "…", "stage": "buyback", "error": "…", "reconciliationRequired": true }]
}

Errors in attention are public summaries; operator logs hold the details.