Nomis API
Score SBTs
Request
cURL
curl -L https://nomis.cc/api/{slug}/holder?address={address}TypeScript
import { type Result } from "./type";
export const isHolder = async (address: string) => {
try {
const res = await fetch(
`https://nomis.cc/api/{slug}/holder?address=${address}`,
);
if (!res.ok) throw new Error();
const data = (await res.json()) as Result;
if ("message" in data) throw new Error();
return data.isHolder ?? false;
} catch (error) {
return false;
}
};
console.log(await isHolder("0x..."));type Result =
| {
owner: string;
isHolder: boolean;
chainId: string;
version: string | null;
calculationModel: string;
score: number | null;
tokenId: string | null;
updated_s: string | null;
updated_ms: number | null;
}
| { message: string };Path Parameters
slug: string, Required — Nomis' Score slug.
| Score | Key |
|---|---|
| Loading... |
Query Parameters
address: string, Required — Address of an account.
Response
Success
Success response will return when account address and score slug is valid.
curl -L https://nomis.cc/api/blast/holder?address=0x2C0356a346471A6502EbEC941752a7FE43536422Account with SBT
Nomis' Score holder.
{
"owner": "0x2C0356a346471A6502EbEC941752a7FE43536422",
"isHolder": true,
"chainId": "81457",
"version": "0.9",
"calculationModel": "11",
"score": 7.19,
"tokenId": "2",
"updated_s": "1709257523",
"updated_ms": 1709257523000
}Account without SBT
Not a Nomis' Score holder.
{
"owner": "0x2C0356a346471A6502EbEC941752a7FE43536422",
"isHolder": false,
"chainId": "81457",
"version": null,
"calculationModel": "11",
"score": null,
"tokenId": null,
"updated_s": null,
"updated_ms": null
}type Result = {
owner: string;
isHolder: boolean;
chainId: string;
version: string | null;
calculationModel: string;
score: number | null;
tokenId: string | null;
updated_s: string | null;
updated_ms: number | null;
};Error
Error response will return when:
- Account address is invalid;
- Score slug is invalid.
{
"message": "Provided address is not a zksync address"
}type Res = {
message: string;
};