# Ronke Score API Public, free, keyless, read-only HTTP API for the Ronke ecosystem on the Ronin chain: per-wallet Ronke Score, wallet holdings, earned badges, and Ronkeverse NFT rarity. Built for anyone making a Ronke game, Discord bot, or site that wants to gate content, award perks, or render leaderboards. Base URL: `https://ronke-score-nine.vercel.app/api/v1` Every successful response is `{ data, meta }`. Every error is `{ error: { code, message } }`. CORS is open, so browser clients can call it directly. No authentication, no API key, no rate limit headers - just be reasonable and cache. ## Read this before writing code ### The data is a daily snapshot Everything here is rebuilt twice a day (from 06:17 and 12:43 UTC) and does not change in between. meta.as_of tells you which rebuild you are looking at. A player who buys $RONKE will not see their score move until the next rebuild, so do not poll this every minute and do not treat it as live chain state. ### A wallet with no score is not an error Wallets scoring zero are never stored, so an unknown wallet returns 200 with found:false, score 0, and rank null. Treat that as "no standing yet", not as a failure - otherwise every new player sees an error screen. rank is null rather than last place, because unranked and genuinely-last are different facts. ## Endpoints ### GET /api/v1/score/{address} **One wallet's Ronke Score.** Score, sub-scores, full points breakdown, rank, and percentile for a single wallet. A wallet with no score returns 200 with found:false and score 0 - not a 404 - because wallets scoring zero are never stored. Cached 3600 seconds at the edge. Parameters: - `address` (path, required) - A 0x wallet address, or a .ron name that has been seen by the nightly sync. Names that have never held a Ronke asset are not resolvable - use the address. Example response: ```json { "data": { "address": "0x36175b2c13e39de1a79583fa3476d124dc8dfb70", "name": "ronke.ron", "found": true, "score": 4820, "rank": 312, "percentile": 94.9, "subscores": { "ronke": 1200, "ronkestr": 620, "nft": 3000, "units": 66, "staking": 0 }, "breakdown": { "collector_points": 450, "oneofone_count": 1, "units_count": 5, "…": "…" } }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "api_version": "v1", "score_version": "v1-3f9a2c11", "population": 6112 } } ``` ### GET /api/v1/scores **Many wallets' scores in one request.** Batch lookup for up to 50 addresses. Results come back in the order you asked, including duplicates, so you can zip them onto your request list. Use this instead of looping the single endpoint - it is one database round-trip and one cache entry. Cached 3600 seconds at the edge. Parameters: - `addresses` (query, required) - Comma-separated 0x addresses, max 50. .ron names are not accepted here. Sort them for the best cache hit rate. One malformed address rejects the whole request rather than silently returning fewer results. Example response: ```json { "data": { "scores": [ { "address": "0x1111…", "found": true, "score": 4820, "rank": 312, "percentile": 94.9 }, { "address": "0x2222…", "found": false, "score": 0, "rank": null, "percentile": null } ], "count": 2 }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "population": 6112, "…": "…" } } ``` ### GET /api/v1/scores/all **Every scored wallet, in one response.** The whole scored set, compact - address, score, rank, percentile. Built for periodic re-checks (pruning roles from members who sold) where you need to see everyone at once. Roughly 6,200 rows today. Check the complete flag rather than assuming a 200 means you got everything. Wallets with no score are absent, not listed with score 0 - the same meaning as found:false on the single-wallet endpoint. Every current Ronkeverse NFT holder is included. Cached for an hour rather than 15 minutes - the data only changes once a day, and this is the one response where a cache miss is expensive. Read meta.as_of off this response to know exactly which rebuild you are holding; do not assume it matches what /meta reported, since the two are cached separately. Cached 3600 seconds at the edge. Example response: ```json { "data": { "scores": [ { "address": "0xf0229d…", "score": 8012, "rank": 1, "percentile": 99.98 }, { "address": "0xfeae9f…", "score": 6590, "rank": 2, "percentile": 99.97 } ], "count": 6199, "complete": true }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "population": 6199, "…": "…" } } ``` ### GET /api/v1/leaderboard **Top wallets by Ronke Score.** Ranked entries with score, rank, percentile, and sub-scores. limit and offset are hard-capped; exceeding either is a 400 rather than a silent clamp, so you never page against a truncated window without knowing it. Cached 3600 seconds at the edge. Parameters: - `limit` (query, optional, default 25, range 1..100) - Rows to return, 1-100. - `offset` (query, optional, default 0, range 0..5000) - Rows to skip, max 5000. Example response: ```json { "data": { "entries": [ { "address": "0x1111…", "name": "ronke.ron", "score": 8830, "rank": 1, "percentile": 99.98, "subscores": { "ronke": 3200, "ronkestr": 1100, "nft": 4530, "units": 0, "staking": 0 } } ], "count": 1, "limit": 25, "offset": 0 }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "population": 6112, "…": "…" } } ``` ### GET /api/v1/wallet/{address} **What a wallet actually holds.** Per-asset balances and holding behaviour, held Ronkeverse token IDs with rarity, and earned badges. Use balance_raw (exact base units, a string) for anything numeric - balance_whole is a convenience float and is lossy at large balances. Cached 3600 seconds at the edge. Parameters: - `address` (path, required) - A 0x wallet address, or a .ron name that has been seen by the nightly sync. Names that have never held a Ronke asset are not resolvable - use the address. Example response: ```json { "data": { "address": "0x36175b2c13e39de1a79583fa3476d124dc8dfb70", "found": true, "holdings": [ { "asset": "ronke_token", "label": "$RONKE", "balance_raw": "1500000000000000000000000000", "balance_whole": 1500000000, "token_count": 0, "is_held": true, "duration_days": 210, "diamond_bucket": "diamond", "never_sold": true } ], "nfts": [ { "token_id": "777", "rarity_rank": null, "tier": "community_1of1", "image_url": null } ], "badges": [ { "key": "diamond_hands", "tier": null, "context": {} } ] }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "…": "…" } } ``` ### GET /api/v1/nft/{tokenId} **One Ronkeverse token.** Rarity rank, tier, traits with collection-wide probability, image, and current owner. 1/1 tokens carry a tier and a null rarity_rank on purpose - they sit outside the standard 1..N rarity ladder rather than at the top of it. Cached 86400 seconds at the edge. Parameters: - `tokenId` (path, required, range 1..6969) - Ronkeverse token id, 1-6969. Example response: ```json { "data": { "token_id": "42", "rarity_rank": 31, "tier": "standard", "traits": [ { "trait_type": "Body", "value": "GoldRonke", "probability": 0.0102 } ], "owner": { "address": "0x1111…", "name": "ronke.ron" } }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "…": "…" } } ``` ### GET /api/v1/config **The live scoring rules.** Weights, curves, gates, diamond thresholds, and the plain-English explainer, serialized from the config the scorer actually runs. Render your "how to rank up" copy from this rather than hardcoding your own copy, which can drift out of date. Cached 3600 seconds at the edge. Example response: ```json { "data": { "score": { "ronke": { "holdWeight": 150 }, "gate": { "minRonke": 50000 }, "…": "…" }, "diamond_thresholds": { "diamondDays": 30, "sellTolerancePct": 0.1, "…": "…" }, "explainer": { "headline": "How the Ronke Score works", "…": "…" } }, "meta": { "score_version": "v1-3f9a2c11", "…": "…" } } ``` ### GET /api/v1/stats **State of the Ronkeverse.** Holder counts, DEX prices, supply and burn figures per token, NFT volume, and badge totals. Market and supply fields degrade to null rather than failing the request. Cached 3600 seconds at the edge. Example response: ```json { "data": { "ronke_token": { "holders": 8003, "price_usd": 0.00029, "supply": { "minted": 1000000000, "circulating": 869394568, "burned_pct": 0.1306 } }, "ronkeverse_nft": { "holders": 1200, "volume_7d_wron": 415 } }, "meta": { "as_of": "2026-08-06T07:10:00.000Z", "…": "…" } } ``` ### GET /api/v1/meta **Freshness, versions, and indexed contracts.** When the data was last rebuilt, how many wallets are scored, the rebuild schedule, and the exact contract addresses this API indexes. Doubles as a health check. Cached 300 seconds at the edge. Example response: ```json { "data": { "as_of": "2026-08-06T07:10:00.000Z", "scored_population": 6112, "rebuild_schedule_utc": "17 6 * * *", "chain": "ronin", "contracts": [ { "asset": "ronke_token", "label": "$RONKE", "address": "0xf988f63bf26c3ed3fbf39922149e3e7b1e5c27cb", "standard": "erc20", "decimals": 18 } ] }, "meta": { "…": "…" } } ``` ## Errors | code | HTTP | meaning | | --- | --- | --- | | `invalid_address` | 400 | Not a 0x address (or not a .ron name). | | `invalid_param` | 400 | A query parameter was malformed or over its cap. | | `invalid_token_id` | 400 | Token id outside 1-6969. | | `name_not_resolved` | 404 | That .ron name is not in our cache. Use the 0x address. | | `too_many_addresses` | 400 | Batch request over the 50-address cap. | | `not_found` | 404 | No such indexed Ronkeverse token. | | `not_configured` | 503 | Server-side database not configured. | | `internal` | 500 | Something failed our side. Retry. | ## Worked examples Look up one wallet. Accepts a 0x address or a cached .ron name. ```js const res = await fetch( "https://ronke-score-nine.vercel.app/api/v1/score/0x36175b2c13e39de1a79583fa3476d124dc8dfb70" ); const { data, meta } = await res.json(); // score, rank and percentile all come back - build on whichever fits. // found:false means the wallet has no score yet, NOT an error. if (!data.found) return "no standing yet"; console.log(data.score, data.rank, data.percentile, "as of", meta.as_of); ``` Check many wallets at once (up to 50). Results come back in the order you asked, including duplicates, so you can zip them onto your input list. Sort the addresses for a better cache hit rate. ```js const wallets = [...guildMembers].sort(); const res = await fetch(`https://ronke-score-nine.vercel.app/api/v1/scores?addresses=${wallets.join(",")}`); const { data } = await res.json(); for (const s of data.scores) { // s.found === false => no score. Absent from the set, not an error. } ``` Periodic re-check over an entire membership - pull the whole scored set and diff it locally instead of paging. Watch `meta.as_of` so you only do the work when there is new data, and trust the dump's own `as_of` rather than `/meta`'s, since the two are cached separately. ```js let applied = null; const meta = await (await fetch("https://ronke-score-nine.vercel.app/api/v1/meta")).json(); if (meta.data.as_of !== applied) { const dump = await (await fetch("https://ronke-score-nine.vercel.app/api/v1/scores/all")).json(); // Skip this tick if the dump has not caught up, or is truncated - // pruning on a partial set would strip roles from everyone missing. if (dump.meta.as_of === meta.data.as_of && dump.data.complete) { const byAddress = new Map(dump.data.scores.map((s) => [s.address, s])); // ... apply byAddress to your members ... applied = dump.meta.as_of; } } ``` ## Notes an integrator usually asks about - **Coverage.** Every wallet with a non-zero Ronke Score is included - this is not a top-N list. Every current Ronkeverse NFT holder is scored, with no exceptions; a wallet holding a single NFT still scores. The only current holders absent are dust wallets whose entire position rounds to zero points. - **Not a holder census.** Because zero-score wallets are never stored, the full dump is complete for gating but should not be read as a list of all holders. - **Balances.** Token balances come back as both `balance_raw` (exact base units, a string) and `balance_whole` (a convenience float). Use `balance_raw` for anything numeric - balances exceed what a JSON number represents exactly. - **1/1 NFTs.** Community and official 1/1s carry a `tier` and a `null` `rarity_rank` on purpose: they sit outside the standard rarity ladder rather than at the top of it. - **Timestamps** are ISO 8601 UTC. `meta.as_of` is the nightly rebuild the response came from. - **Versioning.** Breaking changes ship under a new path (`/api/v2`, and so on); `v1` keeps serving for at least 90 days after any successor is announced. Additive fields can appear in `v1` at any time, so ignore keys you do not recognise. Machine-readable OpenAPI 3.1 schema: `https://ronke-score-nine.vercel.app/api/v1/openapi.json` Human-readable docs: `https://ronke-score-nine.vercel.app/developers`