Skip to content

Launches & analytics

Stargaze launches and platform analytics from on-chain events.

Stargaze platform data is derived only from contract events (TokenLaunched, SaleCreated, Finalized) on the configured factory and fair-launch addresses. If the contracts are not configured for a network, the lists are empty and configured says so.

GET /api/launches

GET/api/launches?chainId={chainId}
QueryTypeDefault
chainId1 or 11155111deployment default
hooks/useMarket.ts + lib/types.ts
type LaunchesPayload = {  rows: TokenRow[];            // 100 newest launches as table rows  launches: StargazeLaunch[];  // every launch, newest block first  fairStatus: Record<string /* saleId */, {    finalized: boolean; succeeded: boolean; totalRaised: string /* wei */; pair: string | null;  }>;  configured: { launchFactory: boolean; fairLaunch: boolean };}; type StargazeLaunch = {  kind: "instant" | "fair";  chainId: number;  token: `0x${string}`;  creator: `0x${string}`;  name: string;  symbol: string;  totalSupply: string;         // raw units, decimal string  decimals: number;            // fair launches are always 18  pair: `0x${string}` | null; // Uniswap V2 pair (fair: set after a successful finalize)  metadataURI: string;  txHash: `0x${string}`;  blockNumber: string;  timestamp: number | null;    // ms, from the block; null if the RPC could not say  liquidityEth?: string;       // instant: wei paired into the pool  liquidityBurned?: boolean;   // instant: LP sent to 0x…dEaD  saleId?: string;             // fair only  startTime?: number;          // fair: ms  endTime?: number;            // fair: ms  reserveEth?: string;         // fair: wei};

The event index is cached for 30 s per chain (sg:launches:{chainId}). On mainnet, rows are enriched with DexScreener pair data; on Sepolia their market fields stay null. Launch metadata (metadataURI, ipfs:// or data: JSON) is fetched for the logo and cached for 1 hour. Source: "Stargaze contracts (on-chain events)".

GET /api/analytics

GET/api/analytics?chainId={chainId}

The whole payload is computed together and cached for 60 s per chain (analytics:{chainId}).

app/api/analytics/route.ts
type Analytics = {  platform: {    configured: { launchFactory: boolean; fairLaunch: boolean };    chainId: number;    totalTokens: number;    instantLaunches: number;    fairLaunches: number;    newToday: number;                  // launched in the last 24 h    launchVolumeEth: number;           // ETH: instant liquidity + succeeded fair raises    tradingVolume24h: number | null;   // USD, mainnet only    totalLiquidity: number | null;     // USD, mainnet only    activePairs: number;               // launches with a Uniswap pair    graduated: 0;                      // bonding curve not enabled    fairSuccessRate: number | null;    // 0..1 over finalized sales    liquiditySeededRate: number | null; // 0..1    daily: { day: number; instant: number; fair: number }[]; // 30 UTC days    top: TokenRow[];                   // up to 10, by 24h volume  };  liquidityHistory: { day: number; liquidity: number }[] | null; // needs DATABASE_URL + indexer  ethereum: {    marketCap: number | null;    volume24h: number | null;    change24h: number | null;    marketCapDistribution: { label: string; count: number }[]; // "> $10B" … "< $10M"    topPoolsByVolume: { symbol: string; volume: number; liquidity: number; txns: number }[]; // up to 10    newPairsByHour: { hour: number; count: number }[];         // last 12 hours    newPairsSample: number;            // size of the GeckoTerminal new-pools sample  };};