API
概览和认证
以 JSON API 形式提供的 Iris 引擎:与网站相同的分析和追踪,供你自己的代码使用。
SDK
官方客户端封装了下面的每个接口,带完整类型,并提供 riskSummary(Python 中为 risk_summary),把一份报告浓缩成机器人需要的内容:捆绑和开发者的持仓、发射工具和评分。更想直接用 HTTP?下面的示例无需安装任何东西。
1npm install github:iris-intel-app/sdk-js即将发布到 npm 和 PyPI。在此之前,请从 GitHub 安装。
1import { Iris, riskSummary } from "@iriscan/sdk";2 3const iris = new Iris({ apiKey: process.env.IRIS_API_KEY });4 5const report = await iris.analyze("<token mint>"); // 1 analysis6console.log(report.risk.level, report.risk.score); // "HIGH" 827 8const scan = await iris.launchTool("<dev wallet>"); // free9if (scan.verdict !== "none") console.log(`Made with ${scan.tool_name}`);10console.log(riskSummary(report).bundleHeldPct);两者都会从环境变量读取 IRIS_API_KEY。在你的账户中创建密钥。
iris-guard:面向 Solana 机器人的交易前跑路过滤器,基于 SDK 构建。
基础 URL
所有接口都在同一个基础 URL 下。请求和响应都是 JSON;带请求体时请发送 Content-Type: application/json。
1https://iriscan.app/api认证
在账户 → API中创建密钥(见API 密钥),并在每个请求中以下列任一方式发送:
1Authorization: Bearer iris_live_…2# or3x-api-key: iris_live_…/status 是公开的。其他接口在没有有效密钥时都返回 401,付费接口除外:完全不带密钥时,它们返回 402,可以用 USDC 按次付费(见x402:按次付费)。
保管好密钥
密钥会消耗你账户的分析和追踪额度。请把它放在服务器上,绝不要放在网页或可供下载的应用中。一旦泄露,请立即撤销。第一次调用
1curl -X POST https://iriscan.app/api/analyze \2 -H "Authorization: Bearer $IRIS_KEY" \3 -H "Content-Type: application/json" \4 -d '{ "address": "sy88tvipKfaCTuVVeU2PczPa88hqgPfKnYQyCHboHP8" }'1import os2import requests3 4profile = requests.post(5 "https://iriscan.app/api/analyze",6 headers={"Authorization": f"Bearer {os.environ['IRIS_KEY']}"},7 json={"address": "sy88tvipKfaCTuVVeU2PczPa88hqgPfKnYQyCHboHP8"},8 timeout=130,9).json()10 11print(profile["identity"]["type"], profile["risk"]["level"])1const res = await fetch("https://iriscan.app/api/analyze", {2 method: "POST",3 headers: {4 Authorization: `Bearer ${process.env.IRIS_KEY}`,5 "Content-Type": "application/json",6 },7 body: JSON.stringify({ address: "sy88tvipKfaCTuVVeU2PczPa88hqgPfKnYQyCHboHP8" }),8});9 10if (!res.ok) throw new Error((await res.json()).error);11const profile = await res.json();接口列表
| 接口 | 作用 | 费用 |
|---|---|---|
| POST /analyze | 钱包、程序或代币的身份、风险和证据。 | 1 次分析,超过 1,000 笔交易为 2 次 |
| POST /trace | 经过混币器或交易所的一笔转账从哪里出来。 | 1 次追踪,或 3 积分 |
| POST /insiders | 代币的内部钱包:与其创建者有资金关联的钱包。 | 2 次分析,或 2 积分 |
| POST /follow | 钱包流出资金的主流,逐跳追踪到终点。 | 2 次分析,或 2 积分 |
| POST /launch-tool | 钱包是否使用发射工具包(Proxima、BlockX)发币或交易,附证据。 | 免费,每分钟 10 次(免费版每天 20 次) |
| POST /victims | 盗币程序盗取过资金的每个钱包,以及各自的损失。 | 3 次分析,或 3 积分 |
| GET /status | API 及其依赖服务的健康状况。 | 免费,公开 |
GET /billing/account | 你的套餐、剩余额度和积分。 | 免费 |
GET /billing/usage/{days} | 过去 7 到 365 天每天的用量。 | 免费 |
剩余额度
每个 /analyze、/trace、/insiders、/follow 和 /victims 响应(包括失败的)都带有 x-iris-credits 响应头:调用后你账户的剩余额度。
1{2 "plan": "api_pro",3 "plan_name": "API Growth",4 "cycle": "monthly",5 "analyses_left": 9412,6 "traces_left": 488,7 "pack_credits": 0,8 "period_end": "2026-10-29T00:00:00Z",9 "paid_until": "2026-10-29T00:00:00Z"10}调用限额
使用密钥对 API 和 MCP 的调用会被计数:免费版每天(UTC)10 次,套餐按每 10 分钟计(Individual 50 次、Sleuth 150 次、Investigator 250 次、Pro 500 次、API Starter 120 次、API Growth 500 次、API Scale 2,500 次)。超出后调用会收到 429,错误码为 quota_exceeded,且不扣费。网站本身从不受此限制,通过 x402 付费的调用也不计入。响应头和错误码见错误和限额。