Skip to content

API and SDK

The base URL is https://api.bricsfinance.fun. The full contract is the OpenAPI document.

Read the City

curl https://api.bricsfinance.fun/v1/city
curl https://api.bricsfinance.fun/v1/towers/0xYourWalletAddress
curl https://api.bricsfinance.fun/v1/addresses
curl https://api.bricsfinance.fun/v1/status

/v1/addresses lists the official addresses on Robinhood Chain, the $BRICS token among them. Check an address there before you trust it.

SDK

The SDK lives in sdk/ts in the repository. It is not on npm yet.

import { Brics } from './sdk/ts/src/index';

const brics = new Brics();
const tower = await brics.tower('0xYourWalletAddress');

Signing in

  1. POST /v1/auth/nonce with { chain: "robinhood", address } gives you the message to sign.
  2. Sign it with the wallet using personal_sign. Smart accounts sign through EIP-1271.
  3. POST /v1/auth/verify with { nonce, signature } starts a session. SDK clients send the header x-brics-client: sdk to get a bearer token instead of a cookie.

A nonce works once and expires after five minutes.

Risk alerts

GET /v1/alerts lists every open alert and those resolved in the last 30 days, each with a severity (info, warn or critical) and a plain message. GET /v1/alerts/feed.xml is the same list as an Atom feed, and GET /v1/status carries the open ones. An alert opens once per condition and stays on the record after it clears. Alerts never name a holder. To get them as they happen, see the status page.

Limits

120 requests per minute per IP, and request bodies up to 64 KB. Errors look like { "error": "code", "message": "…" }.