API
Revenue & on-chain
Creator-fee revenue as booked by the engine, and live reads of the Phase 1 contracts.
GET /revenue
Creator fees as the harvest strategy books them. Needs the database. Cache: 10 s.
interface RevenueView {
totals: { accruedHype: number; claimedHype: number; usd: number; toTreasuryHype: number; toPrizesHype: number };
last24h: { hype: number; usd: number };
items: Array<{ id: number; time: string; kind: string; source: string; amountHype: number; usd: number;
toTreasuryHype: number; toPrizesHype: number; txHash: string | null; paper: boolean }>;
daily: Array<{ day: string; hype: number; usd: number }>;
}kindisaccrued(fees seen growing in the hook) orclaimed(an on-chainFeeSplitter.claim()in live mode, with itstxHash).- Totals sum every row: accrued amounts for HYPE, USD and the split; claimed amounts for
claimedHype. itemsis the latest 100 rows;dailyis accrued revenue per UTC day for the last 60 days, oldest first.- Before launch,
sourcereadsmontra:creator-fees (stand-in pool).
GET /onchain
Live reads of the Treasury, FeeSplitter and PrizePool in one multicall. Works without a database. Cache: 10 s.
interface OnchainView {
block: string;
hypeUsd: number | null;
treasury: {
address: string; hype: number; usdc: number; whype: number; motion: number | null; paused: boolean;
totalHypeReceived: number; maxHypePerCall: number; dailyHypeLimit: number; spentToday: number;
};
feeSplitter: {
address: string; poolId: string | null; wired: boolean;
totalSplit: number; totalToTreasury: number; totalToPrizes: number;
pendingCreatorHype: number | null; // fees waiting in the Montra hook
recipientOk: boolean | null; // the hook really pays this splitter for that pool
};
prizePool: {
address: string; hype: number; available: number; totalFunded: number; totalPaid: number;
roundsPaid: number; lastRoundId: number; roundSeconds: number;
pending: { roundId: number; pot: number; readyAt: number } | null;
};
}wiredis false while the splitter'spoolIdis zero (beforesetPoolId).pendingCreatorHypeandrecipientOkuse MOTION's pool ifMOTION_TOKENis set, else the splitter's wired pool, else they arenull.treasury.motionis only filled onceMOTION_TOKENis set.prizePool.pendingisnullwhen no round is pending.
curl https://<your-site>/api/v1/onchain