Developers
HTTP API
The same HTTP API the Kairo site reads from: JSON, read-only, no key, any origin. Kairo's indexer builds it from on-chain events, so anything here can also be checked against the chain.
Quick start#
- Base path:
/api/v1on this site's own domain. - No authentication. Reads are plain GETs with CORS open to every origin. The only POSTs are the two
/metadatauploads. - Live data comes as server-sent events (SSE); each client can hold 12 streams open.
- Paging: token lists use page numbers; trades and event logs use a
beforecursor.
# five trending tokens, trimmed to three fields
curl -s "$ORIGIN/api/v1/tokens?sort=trending&limit=5" | jq '.tokens[] | {symbol, price, marketCapUsd}'
# a token's last 50 trades; feed .next back in as ?before= for older ones
curl -s "$ORIGIN/api/v1/tokens/0x…/trades?limit=50" | jq '.next'
# every new trade, as it happens (server-sent events)
curl -N "$ORIGIN/api/v1/stream"Conventions#
Number, time and address formats
| Kind | Format |
|---|---|
| Amounts | Base-unit integers, sent as strings. Tokens use 18 decimals; a quote asset states its own decimals. |
| Prices | Decimal strings, quote per 1 whole token, 36 decimal places, no exponent notation. Exception: the buyback's spotPrice and twapPrice trim trailing zeros. |
| Market caps | Decimal strings in whole quote units. |
| Dollar values | Any field whose name ends in Usd is a JSON number, or null if the quote asset has no dollar price. Totals in /stats and /fees use 0 instead of null. |
| Times | Block time in Unix milliseconds. The one exception is day in /stats/daily: a UTC date, YYYY-MM-DD. |
| Addresses | Lowercase in every response; null when unset. Requests must use lowercase too: a checksummed address gets a 400, as does any query parameter the route doesn't recognise. |
Paging
/tokens and /builders/{code}/launches accept page and limit, and return total, page and pages. Trade and event lists run newest to oldest: send the last id you received as before to get the next batch, and stop when next comes back null. A wallet's token lists are not paged.
Freshness and caching
Each successful JSON response includes an X-Kairo-Indexed-Block header: the block the data reflects. /health tells you how many blocks that trails the chain head. Cache lifetimes:
| Route | Cached for |
|---|---|
| Lists and token pages (including their live chain read) | 2 s |
| Candles | 5 s |
/prices | 15 s |
| Config | 60 s |
/tokens/{token}/rewards/{wallet} and streams | Not cached |
/health | No HTTP caching; recomputed at most once every 5 s |
Rate limits
A token bucket per client IP: 120 requests of burst, refilling at 10 per second. RateLimit-Limit and RateLimit-Remaining come back on every response. An empty bucket returns 429, with Retry-After giving the wait in seconds.
Errors
Every /api/v1 error has this body:
{ "error": { "code": "bad_param", "message": "creator must be a lowercase address", "field": "creator" } }| Status | code | Meaning |
|---|---|---|
| 400 | bad_param | Bad or out-of-range parameter; field tells you which one. |
| 404 | not_found | Unknown token, launch transaction or route. |
| 429 | rate_limited | Bucket empty; wait Retry-After seconds. |
| 500 | internal | Our bug. |
| 503 | unavailable | Database unreachable, or a live chain read failed and there was no fallback. When down, /health still returns its usual body, with status 503. |
Endpoints: tokens and trades#
/api/v1/tokens?sort&stage"e&search&creator&route&page&limitToken cards, 24 per page by default (max 100). sort: trending, new, old, mcap, volume, holders, progress, graduated. stage: new, graduating, graduated. route: holders, creator, splitter, wallet. search looks at name, symbol, or an exact address.
/api/v1/tokens/{token}One card, extended with metadata and links, the pool's full fee terms and recipients, lifetime stats, holder-reward totals, creator fees (earned, claimed, claimable), liquidity (seed plus outside positions), and a fresh lens read of the pool (null if that read fails).
/api/v1/tokens/{token}/trades?before&limitThe token's trades, newest first; 50 per page, up to 200.
/api/v1/tokens/{token}/candles?interval&from&to&limitOHLC candles with volume and trade count. interval: 1m, 5m (default), 15m, 1h, 4h, 1d. Returns the latest 500, or up to 2,000 with limit.
/api/v1/tokens/{token}/holders?limitCirculating supply, holder count, the shares held by the top 10, the pool, the creator and the burn addresses, and a list of the biggest holders (20 by default, up to 200).
/api/v1/tokens/{token}/fees?before&limitFee history, newest first: the split of every trade, creator-side claims, protocol sweeps, and deposits into the holders' stream.
/api/v1/tokens/{token}/events?before&limitAll other pool events: claims, hand-ons, claim operators, fee cuts and locks, protocol-fee cuts, route conversions, stage changes, LP line crossings, graduation, LP fee activation, sweeps, outside liquidity in and out, donations, and seed-fee harvests.
/api/v1/tokens/{token}/rewards?before&limitHolder-reward events: enabled, deposited, claimed (a push when tip > 0), and push skipped.
/api/v1/tokens/{token}/rewards/{wallet}Read live from the chain: what the wallet can withdraw now, its lifetime earnings, the stream's state, and whether the wallet is excluded.
/api/v1/tokens/{token}/earned/{wallet}Rewards already paid to the wallet: claimed, pushed and tips. Add the live withdrawable amount to get the full total.
/api/v1/tokens/{token}/position/{wallet}The wallet's balance, amounts bought and sold, quote spent and received, number of trades, and its first and last trade.
/api/v1/tokens/{token}/liquidity?from&toHour-by-hour volume, trades and pool liquidity (the last 7 days unless you pass a range); the locked seed's liquidity; every outside position (owner, tick range, liquidity, price at each bound, time added); and the outside share of active liquidity.
/api/v1/trades?before&limit"eRecent trades across all tokens, newest first, 50 per page (up to 200); each includes the token, symbol, image, quote and dollar value.
/api/v1/metadata · /api/v1/metadata/imageThe launch form calls these to store the token's metadata JSON and image before it sends the launch.
Endpoints: wallets#
/api/v1/wallets/{wallet}/holdingsEvery Kairo token the wallet holds, as cards with balance and value, biggest position first.
/api/v1/wallets/{wallet}/earnedHolder rewards by token: claimed, pushed, total, and whether the wallet still holds the token.
/api/v1/wallets/{wallet}/launchesTokens this wallet launched, newest first.
/api/v1/wallets/{wallet}/lanesPools whose creator side pays this wallet, directly or through a split slot, with its share and the amount claimed.
/api/v1/wallets/{wallet}/tradesThe wallet's 100 most recent trades, with token and symbol.
/api/v1/wallets/{wallet}/airdropAirdrop claims made by the wallet (KairoAirdrop Claimed events).
Endpoints: live streams#
/api/v1/streamTrades on all tokens, pushed as server-sent events.
/api/v1/tokens/{token}/streamTrades on a single token. Limit: 12 open streams per client IP; opening a 13th returns 429.
Each new trade arrives as event: trade, tagged with its id, carrying the trade object plus token and pool. A stream starts with retry: 3000 and sends a ping every 15 s. If you drop, reconnect with Last-Event-ID and the trades you missed are replayed in batches of 200.
Endpoints: platform, fees and buyback#
/api/v1/configChain id; contract addresses (v4 factory, hook, router, lens and implementations; vault, airdrop and quote registry; Uniswap's contracts; the owner wallet; and the old v1 factory and router, flagged retired); each quote asset seen, with enabled and kind; the launch fee; the fee rows; and both lines as multiples and as ticks.
/api/v1/statsPlatform-wide totals: launches, holders, swaps, volume, fees and their split, broken down by quote asset.
/api/v1/stats/dailyA 90-day history with one row per UTC day for each quote asset (launch, swap, volume, fee and protocol-fee figures), oldest first.
/api/v1/pricesDollar price for each quote asset, with source and timestamp. Cached for 15 s.
/api/v1/feesThe numbers behind the Fees page: paid to creators and holders, to the protocol and to LPs, plus volume and launch count.
/api/v1/protocol/feesKairo's share of fees: accrued, swept, still sitting in each pool, and the vault's lanes.
/api/v1/buybackState of the KAIRO buyback: waiting or live, the on/off switch (enabled), where bought KAIRO ends up, the share, totals spent, burned and sent to buyback wallets, the latest buyback, and a daily series. Counts every fee vault, including replaced ones.
Wallet fields: recipients lists Kairo's buyback wallets in the order they fill (an empty list means KAIRO is burned, and recipientIsBurn is then true). recipientCapBps is the most a wallet may hold, in bps of supply (200 = 2%). nextRecipient is the wallet the next buy goes to: 0x…dead when burning, the zero address once all wallets are full, null if the chain read failed. recipientRoom is how much KAIRO the wallets can still absorb (null when burning or unknown). wallets gives each wallet's address, label, live balance, share of supply and full flag (null if not read).
/api/v1/buyback/series?range=6h|24h|7d|30d|allSpent, bought, burned, sent, allocated and protocol fees in buckets: hourly for 6h and 24h, daily for longer ranges.
/api/v1/buyback/history?before&limit&kindBuybacks and KAIRO fee releases, newest first, 50 per page (max 200). Filter with kind: automatic, fees or treasury. Each entry has an outcome (burned or sent), the wallets it filled in order, and deliveries as one { to, amount } per wallet, since one buy may spill across several wallets.
/api/v1/buyback/swaps?from&to&cursor&limitAll trades in KAIRO's pool, oldest first, each labelled buyback or own. 200 per page by default, max 1,000; cursor is the last id you got; from/to are Unix seconds. Returns nothing until KAIRO has a pool.
Endpoints: builders#
Routes for the Builder rewards programme live under /api/builders; the indexer adds what it reads from launch transactions.
/api/v1/builders/launch-check/{tx}Which builder code a launch transaction carried, where in the transaction it was found, and whether it earned credit.
/api/v1/builders/{code}/launches?page&limitTokens launched under a code, with trades, volume and protocol fee within the 90-day window. 25 per page by default, up to 100.
/api/builders?available={code}Directory of approved and pending builders with launches and HYPE earned and paid. Pass available to check if a code is still free.
/api/builders/{code}A builder's public profile: product, kind, launches, volume, payouts.
/api/builders/statements?week&inputsA published weekly statement, line by line. With inputs=1 it also returns the raw figures so you can recompute it from the chain.
/api/builders/registerClaims a code, signed by the payout wallet. The signature is free: no gas, no transaction.
Endpoints: points and airdrop#
Data for the airdrop page. Anyone can read; changes require a message signed by the wallet being changed.
/api/airdrop/overviewAirdrop summary: its parts, the current season, any indicative value, and what comes next. Size and structure are still to be announced.
/api/airdrop/lookup/{address}Where an address stands: points, rank, retroactive list, weekly Top 10 finishes, contributions, and an estimate per part.
/api/airdrop/{address}The address's season estimate plus any Merkle claims ready for it, proofs included.
/api/points/leaderboard?board&season&limit&offset&addressLeaderboard for board = all, traders or creators. Add address to get that wallet's row as well.
/api/points/{address}?seasonPoints, tier, rank, per-source breakdown, streak, quests and referral code.
/api/points/feed?limitLatest point awards, with totals for the past hour and day.
/api/points/big-earners?limitIndividual awards of 5,000 points or more.
/api/points/levels?limitMarket-cap levels with their payouts, and tokens that hit one recently.
/api/points/log?filter&address&before&limitAward log, newest first; filter to one address if you like.
/api/airdrop/retro?address&source&page · /api/airdrop/top10?week&address · /api/airdrop/lps?address · /api/airdrop/contributors?address&limit&offsetThe lists that make up the airdrop page: retroactive, weekly Top 10, liquidity providers, contributors.
/api/airdrop/contributions?address&status&limitSubmitted contributions and their review status. A signed POST to the same path submits a new one.
The /api/builders, /api/airdrop and /api/points routes are built for this site rather than for integrators: no CORS header, addresses accepted in any case, no rate limit, no indexed-block header, and errors shaped { error, code }.
Endpoints: health#
/api/v1/healthok, chain id, indexed block and its time, chain head, lag in blocks, last error, and token and trade counts. ok turns false if the head can't be read or the indexer is over 50 blocks behind. Never cached.
Objects#
Token card
/tokens, the wallet token lists and the head of /tokens/{token} all return this shape. The one difference: in /tokens/{token}, pool is an object holding the pool's complete terms. Read the pool id from poolId in every case.
| Field | Meaning |
|---|---|
address · name · symbol | Set at launch. |
imageUrl · description | From the launch metadata. imageUrl is an https URL or a small data: URI, otherwise null; description is plain text, max 1,000 characters. |
creator · poolId · pool | Launching wallet and the Uniswap v4 pool id (bytes32). In list responses pool just repeats the id, for older clients. |
quote | The paired asset: address (0x000…000 = HYPE), symbol, decimals, native, usd, usdSource, usdAt, usdStale. |
supply · burned | Minted supply, and the amount since sent to 0x0 or 0x…dEaD. |
price · priceUsd | Last-trade price (the opening price until the first trade), and its current dollar value. |
marketCap · marketCapUsd | price × (supply − burned). |
volume24h · volume1h · traders1h | Pool-side volume over 24 h and 1 h (each with a Usd version), and unique traders in the last hour. |
change24hPct | Percent change since the hourly close 24 hours ago; null until that exists. |
holders · swaps | Holder count (excluding the token, its pool, the factory, the hook, the PoolManager, and 0x0 / 0x…0001 / 0x…dEaD) and total trades. |
launchedAt · lastTradeAt | Block times. |
tier · totalFeePips | Fee row and tier chosen at launch; current total fee in pips (1,000,000 = 100%). |
route · recipient · recipientKind | route is wallet, split or holders; recipient is who receives the creator side; recipientKind says whether that's holders, the creator, another wallet or a split. |
rewardsReceived | Total quote paid into the holders' stream. |
trend | The score behind sort=trending; null when the quote has no dollar price. |
graduation | stage (new · graduating · graduated, i.e. board columns); progressBps toward 16.77× (10,000 = reached), measured as the share of the quote the seed needs to take in to get there; crossed; fromLaunch; graduatedAt (null until graduated, and null for pools graduated at launch); chainStage, the hook's 0–4 value. |
lpLine | progressBps toward 142.56×, above, secondsAbove (cumulative so far), requiredSeconds (600), active (LP fee on, outside liquidity allowed), activeAt. |
builderCode · liquiditySealed | The launch's builder code; liquiditySealed is false for v4 pools, which accept outside liquidity next to the locked seed after the LP line (stage 4; earlier adds revert). |
version · hook | 4 for all live pools (1 = the retired KairoPool design, never used on mainnet), and the pool's hook address. |
Trade
One trade = one PoolManager Swap on a Kairo pool, joined to the hook's FeeAccrued from the same transaction (see Indexing events), with some values pre-computed.
| Field | Meaning |
|---|---|
id | Row id: the before cursor, and the SSE event id. |
block · logIndex · txHash · t | Log position and block time. |
sender | The trader: the router's caller for trades through Kairo's router; otherwise the buyer (who received tokens) or the seller. For a first buy, its recipient. |
trader · recipient | trader is the Swap's sender (Kairo's router, the factory, or another v4 router). recipient equals sender on v4 pools and is kept for older clients. |
isBuy | true for buys (tokens left the pool). |
quoteAmount | Quote spent on a buy (Swap quote amount + hookFee) or received on a sale (Swap quote amount − hookFee). |
volume | Pool-side amount: the Swap's quote amount without the hook fee. Every API volume figure is a sum of this. |
hookFee | FeeAccrued.fee, anti-snipe surcharge included. The LP fee is separate. |
tokenAmount | Tokens moved. |
fee · protocolFee · lpFee · premium · creatorSide · holdersPart | Fee and its parts. premium and holdersPart are subsets of creatorSide; lpFee is what the Swap charged as LP fee. |
price · poolId | Pool price right after this swap (from sqrtPriceX96), not this trade's average price; and the pool id. |
Interpreting values#
- Volume excludes the fee. During an anti-snipe window a pool's fees can therefore exceed its volume. To total what traders actually spent, add up
quoteAmount. - Candles.
tmarks the bucket start (a whole multiple of the interval since the Unix epoch). Values are post-trade prices, soopenis the first trade in the bucket, not the previous close. Empty buckets are skipped.quoteUsdis the quote's dollar price at bucket close, or the current price for recent buckets. - Untraded tokens show the factory's opening price (opening market cap ÷ supply),
swaps0, volumes"0", andnullforlastTradeAtandchange24hPct. - Holder percentages.
circulating= minted − burned, counting tokens in the pool. Percentages use it as the base, exceptburnedPct, which is a share of everything minted. - Dollar totals in
/statsvalue each quote at whichever is higher: its hourly price when traded, or its price now. A quote losing value therefore never shrinks the totals. - Graduation stage is one of three board columns, not the hook's five stages.
graduated: the hook has made graduation final (stage 2, 3 or 4, or graduated at launch).graduating: still Below or Crossed with progress of 5,000 bps or more.new: everything else. For the raw stage, readhook.poolConfig(poolId).stage.
When the API can't answer something, the chain can: call the contracts through the Elysium RPC.
