Use {skillDir}/scripts/skyinsights.py for all API calls. The script handles credentials, request formatting, error handling, screening polling, and terminal-friendly output.
bash
python {skillDir}/scripts/skyinsights.py <subcommand> [args...]
kya <address> [chain=eth] — GET /v4/kya/risklabels <address> [chain=eth] — GET /v4/kya/labelsscreen <address> [chain=eth] [rule_set_id=standard-mode-rule-set] — GET /v4/kya/screening_v2 + poll (⚠️ 5–15s)kyt <txn_hash> <chain> — GET /v4/kyt/riskhelp — show usagerule_set_id options: standard-mode-rule-set (default), fast-mode-rule-set
Per-endpoint chain support. Use the API Value when specifying the chain parameter.
ChainAPI Valuekya/labelskya/riskkya/screening_v2kyt/riskBitcoinbtc✓✓✓✓Bitcoin Cashbch✓✓Litecoinltc✓✓Solanasol✓✓Ethereumeth✓✓✓✓Polygonpolygon✓✓✓✓Optimismop✓✓✓✓Arbitrumarb✓✓✓✓Avalancheavax✓✓✓✓Binance Smart Chainbsc✓✓✓✓Fantomftm✓✓Trontron✓✓✓✓Wemixwemix✓✓✓✓Basebase✓✓✓✓Blastblast✓✓Linealinea✓✓Sonicsonic✓✓Unichainunichain✓✓Polygon zkEVMpolygon_zkevm✓✓
kya/screening_v2supports:btcethpolygonoparbavaxbsctronwemixbasemulti-chainis supported bykya/riskonly.
Route user requests as follows:
User mentions a transaction hash / tx / txn → run kyt
User asks about labels / entity / institution / exchange for an address → run labels
User asks if an address is risky / safe / suspicious (no subcommand specified):
kya first — fast, checks the address's own labels and risk score.kya returns None or Low, automatically follow with screen — a clean address can still have counterparty exposure to sanctioned or hacked funds. Tell the user: "该地址自身风险较低,正在进行合规筛查以检查对手方暴露情况,请稍候(约 5–15 秒)…"kya returns Medium, High, or Unknown, present the result directly without running screen.Printed shapes per subcommand:
text
# kya
Risk: {None|Low|Medium|High|Unknown} (score={0-5})
Reasons: {reason1}, {reason2} ← omitted if empty
# labels
Entity: {name} Type: {type}
Labels: {label1}, {label2} ← omitted if none
# screen
Screening: {Pass|Fail|Pending}
Flagged counterparties: {count}
{counterparty_address} {risk_level} {reason} ← one line per flagged party
# kyt
Tx Risk: {None|Low|Medium|High|Unknown} (score={0-5})
Transfers: {count}
{from} → {to} {amount} {token} ← one line per transfer
Risk level emojis: ✅ None / 🟡 Low / 🟠 Medium / 🔴 High / ⚪ Unknown
After running the script, summarize the key findings in plain language — especially the risk level and notable risk factors. Don't just repeat the raw output.
CodeMeaning200Success400Bad Request — invalid parameters (e.g., unsupported chain, malformed address)401Unauthorized — missing, invalid, or expired X-API-Key / X-API-Secret402Payment Required — account quota exceeded403Forbidden — access denied429Too Many Requests — rate limit reached500Internal Server Error
SKYINSIGHTS_API_KEY and SKYINSIGHTS_API_SECRET.risk_level is Unknown: the address or transaction is not indexed on that chain, or has no available risk history.Risk FactorDefault LevelDescriptionSanctionedHighAssociated with international sanctions lists or restricted entitiesTerroristFinancingHighInvolved in terrorist financing or support activitiesChildAbuseHighRelated to child exploitation or illegal content paymentsHackHighFunds linked to hacking or security breach incidentsScamHighFraud-related activities (e.g., phishing, rug pulls)RansomwareHighConnected to ransomware attacks or extortionDarkwebHighAssociated with dark web markets or illicit transactionsLaunderingHighAssociated with on-chain money laundering activitiesBlockedHighOfficially frozen by stablecoin issuers (e.g., USDT, USDC)BlacklistedHighListed in blacklists by users or partnersMixingMediumRelated to mixing services or fund obfuscation behaviorGamblingMediumConnected to gambling or betting platforms
ScoreLevelDescription0NoneNo known risk — no history of malicious behavior or suspicious associations1LowLow likelihood of illicit involvement, no unusual behavior detected2–3MediumModerate risk due to indirect exposure or uncertain behavior4–5HighStrong indications of potential involvement in malicious or high-risk activity
The risk_reasons field explains why a risk was assigned. Each entry is prefixed by type:
label: Scam/Rugpull — risk comes from a specific labellabel: Sanction/OFACentity: huione — risk linked to a known entity without a direct labelentity: blender_ioWhen a user asks how to use this skill, show them these commands:
text
/skyinsights kya <address> [chain] Address risk assessment / 地址风险评分
/skyinsights labels <address> [chain] Address labels & entity info / 地址标签和实体信息
/skyinsights screen <address> [chain] Compliance screening (AML) / 合规筛查,需 5–15 秒
/skyinsights kyt <txn_hash> <chain> Transaction risk / 交易风险分析
/skyinsights help Show help / 显示帮助
Prerequisites / 前提条件: Set credentials in environment or .env file / 在环境变量或 .env 文件中设置凭证:
text
SKYINSIGHTS_API_KEY=your_key
SKYINSIGHTS_API_SECRET=your_secret