API reference

API overview

Every number on the site comes from a public JSON endpoint on the same origin. No key, no sign-up.

Base URL#

text
https://blastball.christmas/api

Responses are JSON with cache-control: no-store. Amounts in SOL are numbers in SOL (not lamports); token amounts are whole tokens; times are ISO 8601 strings in UTC; wallets and signatures are base58.

Endpoints#

PathWhat it returns
GET /api/gameCurrent round, live pot and its split, top 10, people online, rules
GET /api/roundsClosed rounds, newest first, with their top three payouts
GET /api/rounds/:idOne round: standings, places and every payout
GET /api/leaderboardHits and winnings across rounds (24h, 7d, all time)
GET /api/player/:walletOne wallet's totals and its rounds
GET /api/hitsLatest counted hits
GET /api/payoutsLatest prizes that landed on-chain
GET /api/statsSite-wide totals
GET /api/house$BlastBall: pot wallet, pot, fees, gifts, buybacks
GET /api/configPublic settings and the round rules
GET /api/priceSOL price and its source
GET /api/streamLive events (server-sent events)
GET /api/healthDatabase and worker status

Errors#

Errors use the HTTP status and a body with a readable message and a stable code:

json
{
  "error": "Unknown round.",
  "code": "not_found"
}
StatusCodeWhen
400bad_addressThe wallet in the path is not a Solana address
404not_foundNo such round
429rate_limitedToo many requests from your IP; wait a minute
500server_errorSomething broke on our side; try again

Rate limits#

Read endpoints are not rate limited but please poll gently: the game status changes every few seconds, rounds once per bell. Endpoints that build a transaction for your wallet (gifts) allow 30 requests per minute per IP.