brick
Docs · Build

Developer API

Public, read only JSON endpoints for coins, fees, rewards, the wall, brickyard burns and platform status. No key needed.

Everything the BRICK site shows is available as JSON under one versioned base path. Responses use one envelope, timestamps are ISO 8601 in UTC, and token and SOL amounts are integer base units encoded as strings.

Base URL

https://usebrick.fun/api/v1

All endpoints are GET, return application/json and send Access-Control-Allow-Origin: *, so you can call them from a browser.

Authentication

Public reads need no authentication. Send nothing and you get the public rate limit.

Optionally send an x-api-key header for a higher, per key limit. An unknown or revoked key is rejected with 401 unauthorized instead of falling back to the public limit. Keys are issued by the BRICK operators on request; there is no self serve signup.

curl -s "https://usebrick.fun/api/v1/coins" \
  -H "x-api-key: <your key>"

Response envelope

Every response, success or error, has the same three keys.

{
  "data": { },
  "meta": {
    "as_of": "<ISO 8601, when the response was built>",
    "freshness_s": null,
    "next_cursor": null
  },
  "error": null
}
FieldMeaning
dataThe payload, or null on error.
meta.as_ofWhen the server built this response.
meta.freshness_sHow old the underlying data may be, in seconds. null when unknown.
meta.next_cursorCursor for the next page on list endpoints, null on the last page.
error{ code, message } on failure, otherwise null.

Amount fields ending in Lamports or Atoms are decimal strings of integer base units (1 SOL = 1,000,000,000 lamports; BRICK coins have 6 decimals). Fields ending in Sol or Usd are display numbers derived from them. null always means unknown or not happened yet, never a placeholder value.

Pagination

List endpoints take limit (1 to 100) and an opaque cursor. Pass meta.next_cursor from one page as cursor to get the next. Do not build cursors yourself.

// Walk every live coin, 100 per page
let cursor: string | null = null;
const all = [];
do {
  const url = new URL("https://usebrick.fun/api/v1/coins");
  url.searchParams.set("limit", "100");
  if (cursor) url.searchParams.set("cursor", cursor);
  const body = await (await fetch(url)).json();
  if (body.error) throw new Error(body.error.message);
  all.push(...body.data);
  cursor = body.meta.next_cursor;
} while (cursor);

Rate limits

Limits use a fixed one minute window, counted per caller and per endpoint by each server instance. Without a key the caller is your IP address; with a key it is the key.

CallerLimit
No key120 requests per minute per endpoint (/api/v1/status: 60)
x-api-keyThe limit set on the key, per endpoint

Every response carries the current window state. On 429 rate_limited wait Retry-After seconds.

HeaderMeaning
X-RateLimit-LimitRequests allowed in the window.
X-RateLimit-RemainingRequests left in the window.
X-RateLimit-ResetSeconds until the window resets.
Retry-AfterOnly on 429. Seconds to wait.

Errors

CodeHTTPMeaning
bad_request400A parameter failed validation (invalid mint, sort, limit, or an unknown query parameter). The message names the parameter.
unauthorized401An API key was sent but is unknown or revoked.
not_found404No live coin with that mint.
rate_limited429Too many requests. Wait for Retry-After seconds.
internal500Unexpected server error, including a failed upstream read such as Solana RPC. Safe to retry with backoff.

Unknown query parameters are rejected with bad_request rather than ignored, so typos surface early.

OpenAPI spec

A machine readable OpenAPI 3.1 document describes every endpoint on this page, with the full response schemas. Import it into Postman, Insomnia or a client generator. It is cached for 5 minutes and limited to 60 requests per minute.

Endpoints

Every endpoint below is implemented and live. Run it live calls it from your browser and prints the real, trimmed response.

List coins

GET/api/v1/coins

Live coins with their latest market snapshot. Sorted, filtered and paginated.

ParameterInTypeDescription
sortquerynew | mcap | volume | progress | graduated | wallOrder. new (default) by launch time, mcap by market cap, volume by 24h volume, progress curve coins by curve progress, graduated graduated coins by graduation time, wall by SOL compounded.
statusqueryall | curve | graduatedFilter by phase. Default all.
planquerycure | courses | masons | load_bearingFilter by fee plan.
creatorquerybase58Only coins launched by this wallet.
qquerystringSearch name or symbol (contains, case insensitive) or an exact mint. Max 64 characters; a leading $ is ignored.
limitqueryinteger 1..100Page size. Default 24.
cursorquerystringOpaque cursor from meta.next_cursor of the previous page.
Cache-Control
max-age 10s
meta.freshness_s
30
Public limit
120 per minute per IP

Market fields come from the latest indexer snapshot (snapshotAt).

Request
curl -s "https://usebrick.fun/api/v1/coins?sort=mcap&limit=5" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is CoinSummary[]. Press Run it live for a real response.

{
  "data": [
    {
      "mint": "<base58>", "name": "", "symbol": "", "image": null, "creator": "<base58>",
      "plan": "cure | courses | masons | load_bearing", "creatorPay": "direct | escrow",
      "phase": "curve | graduated", "launchedAt": null, "graduatedAt": null,
      "priceSol": null, "priceUsd": null, "mcapSol": null, "mcapUsd": null, "liquiditySol": null,
      "curveProgress": null, "volume24hSol": null, "trades24h": null, "currentFeeBps": null,
      "wallCompoundedLamports": "0", "snapshotAt": null
    }
  ],
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": "<cursor or null>" },
  "error": null
}
GET /api/v1/coins?limit=3

Errors: bad_request, rate_limited, internal

Get a coin

GET/api/v1/coins/:mint

Full detail for one coin: fee plan terms, allocation rows, SOL thresholds, pool addresses and the permanent lock proof.

ParameterInTypeDescription
mint *pathbase58Token mint address.
Cache-Control
max-age 5s
meta.freshness_s
age of the market snapshot, null before the first one
Public limit
120 per minute per IP

lock.checkedAt tells you when the lock proof was last read from chain.

Request
curl -s "https://usebrick.fun/api/v1/coins/<MINT>" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is CoinDetail. Press Run it live for a real response.

{
  "data": {
    "mint": "<base58>", "...": "every CoinSummary field",
    "description": "", "links": { "website": null, "twitter": null, "telegram": null },
    "dbcPool": "<base58>", "dbcConfig": "<base58>", "dammPool": null, "launchSignature": null,
    "fee": { "plan": "", "label": "", "rules": [], "schedule": [], "outsideControl": [], "creatorTradingFeePercentage": 0, "compoundingFeeBps": 0 },
    "allocation": [],
    "thresholds": { "initialMcapSol": 0, "migrationMcapSol": 0, "migrationQuoteThresholdLamports": null, "solUsdAtLaunch": 0, "initialMcapUsdTarget": 0, "migrationMcapUsdTarget": 0 },
    "lock": null,
    "explorer": { "mint": "<url>", "dbcPool": "<url>", "dammPool": null }
  },
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": null },
  "error": null
}
GET /api/v1/coins/:mint

Errors: bad_request, not_found, rate_limited, internal

Coin fees

GET/api/v1/coins/:mint/fees

Fee totals read from chain (DBC partner and creator, DAMM v2 claimables), plus the claims and allocations in the BRICK fee ledger.

ParameterInTypeDescription
mint *pathbase58Token mint address.
Cache-Control
max-age 15s
meta.freshness_s
120
Public limit
120 per minute per IP

Onchain totals are read at request time; asOf is the read time.

curve holds partnerTotalLamports, partnerClaimedLamports, partnerUnclaimedLamports and the same three for the creator, all lamport strings.

pool holds compoundedLamports and claimableUnclaimedLamports once the coin has graduated.

Request
curl -s "https://usebrick.fun/api/v1/coins/<MINT>/fees" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is CoinFees. Press Run it live for a real response.

{
  "data": {
    "mint": "<base58>",
    "curve": null,
    "pool": null,
    "claims": [],
    "allocations": [],
    "asOf": "<ISO 8601>"
  },
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": null },
  "error": null
}
GET /api/v1/coins/:mint/fees

Errors: bad_request, not_found, rate_limited, internal

Coin rewards

GET/api/v1/coins/:mint/rewards

Builders reward epochs for a coin with their snapshot hashes, and the largest payments.

ParameterInTypeDescription
mint *pathbase58Token mint address.
Cache-Control
max-age 30s
meta.freshness_s
300
Public limit
120 per minute per IP

enabled is false while payouts are in dry run or switched off.

Request
curl -s "https://usebrick.fun/api/v1/coins/<MINT>/rewards" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is CoinRewards. Press Run it live for a real response.

{
  "data": {
    "mint": "<base58>",
    "epochs": [],
    "topPayments": [],
    "enabled": false
  },
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": null },
  "error": null
}
GET /api/v1/coins/:mint/rewards

Errors: bad_request, not_found, rate_limited, internal

Wall summary

GET/api/v1/wall

Platform totals: SOL compounded, fees claimed, builders paid, dev releases, buybacks and burns, plus actual pool reserves per graduated coin.

No parameters.

Cache-Control
max-age 15s
meta.freshness_s
120
Public limit
120 per minute per IP

poolReservesLamports is the actual SOL in graduated pools and is reported separately from compounded totals.

Request
curl -s "https://usebrick.fun/api/v1/wall" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is WallSummary. Press Run it live for a real response.

{
  "data": {
    "totalCompoundedLamports": "0", "totalClaimedLamports": "0", "totalBuildersPaidLamports": "0",
    "totalDevReleasedLamports": "0", "totalBuybackLamports": "0", "totalBurnedAtoms": "0",
    "graduatedCoins": 0, "poolReservesLamports": null, "lastEventAt": null,
    "perCoin": []
  },
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": null },
  "error": null
}
GET /api/v1/wall

Errors: rate_limited, internal

Wall events

GET/api/v1/wall/events

Every fee movement, newest first: compounding, claims, builders payouts, dev releases and forfeits, buybacks, burns and graduations, each with its signature.

ParameterInTypeDescription
kindquerycompound | fee_claim | builders_payout | dev_release | dev_forfeit | buyback | burn | graduationOnly one kind of event.
mintquerybase58Only events of this coin. Buybacks and burns are platform level and are excluded when set.
limitqueryinteger 1..100Page size. Default 50.
cursorquerystringOpaque cursor from meta.next_cursor.
Cache-Control
max-age 10s
meta.freshness_s
60
Public limit
120 per minute per IP

Events appear once indexed or confirmed. Dry run records are never listed.

Request
curl -s "https://usebrick.fun/api/v1/wall/events?kind=compound&limit=20" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is WallEvent[]. Press Run it live for a real response.

{
  "data": [
    { "id": "", "kind": "", "mint": null, "symbol": null, "lamports": "0", "tokenAtoms": null, "signature": null, "explorerUrl": null, "at": "<ISO 8601>", "reconciled": false }
  ],
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": "<cursor or null>" },
  "error": null
}
GET /api/v1/wall/events?limit=5

Errors: bad_request, rate_limited, internal

Brickyard burns

GET/api/v1/brickyard/burns

BRICK buybacks and their burns with signatures, amounts, slippage and supply before and after.

ParameterInTypeDescription
limitqueryinteger 1..100Page size. Default 50.
cursorquerystringOpaque cursor from meta.next_cursor.
Cache-Control
max-age 30s
meta.freshness_s
300
Public limit
120 per minute per IP

Empty until the BRICK mint is configured and the first buyback confirms.

Request
curl -s "https://usebrick.fun/api/v1/brickyard/burns?limit=20" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is BurnRecord[]. Press Run it live for a real response.

{
  "data": [
    { "id": 0, "brickMint": "<base58>", "buybackSignature": null, "burnSignature": null, "solSpentLamports": "0", "brickBoughtAtoms": "0", "brickBurnedAtoms": "0", "supplyBeforeAtoms": null, "supplyAfterAtoms": null, "slippageBps": null, "route": null, "status": "swapped | burned | failed", "at": "<ISO 8601>" }
  ],
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": "<cursor or null>" },
  "error": null
}
GET /api/v1/brickyard/burns?limit=5

Errors: bad_request, rate_limited, internal

Status

GET/api/v1/status

Live integration checks with latency, configuration readiness (never values), job switches and last runs, the feature matrix and SOL/USD.

No parameters.

Cache-Control
max-age 10s
meta.freshness_s
seconds since the checks ran
Public limit
60 per minute per IP

Checks are cached on the server for up to 20 seconds.

Request
curl -s "https://usebrick.fun/api/v1/status" \
  -H "accept: application/json"
Response shape

Shape only: arrays are empty and numbers are zero on purpose. The payload type is StatusReport. Press Run it live for a real response.

{
  "data": {
    "ok": false, "checkedAt": "<ISO 8601>", "network": "mainnet-beta", "dryRun": true,
    "checks": [], "env": [], "jobs": [], "features": [], "solUsd": null
  },
  "meta": { "as_of": "<ISO 8601>", "freshness_s": null, "next_cursor": null },
  "error": null
}
GET /api/v1/status

Errors: rate_limited, internal