SuperAPI AI 工具集

moralis-openapi-skill

数据与分析

查看项目

更新于 10-15 23:59

技能介绍

用途:该技能用于通过 uxc + OpenAPI 执行 Moralis EVM 数据读取操作,并复用 uxc 技能提供的执行、认证与错误处理方式。

前置条件:uxc 已安装并在 PATH 中;可访问 https://deep-index.moralis.io/api/v2.2;可访问精选 OpenAPI schema(https://raw.githubusercontent.com/holon-run/uxc/main/skills/moralis-openapi-skill/references/moralis-evm.openapi.json);拥有 Moralis API Key。

认证:Moralis 使用 X-API-Key 请求头认证,可通过以下命令配置凭证并绑定到 deep-index.moralis.io/api/v2.2: uxc auth credential set moralis --auth-type api_key --api-key-header X-API-Key --secret-env MORALIS_API_KEY uxc auth binding add --id moralis --host deep-index.moralis.io --path-prefix /api/v2.2 --scheme https --credential moralis --priority 100 可用 uxc auth binding match https://deep-index.moralis.io/api/v2.2 校验映射。

主要能力:覆盖只读钱包情报,包括原生余额、钱包代币余额、钱包历史、钱包兑换、钱包净资产、ERC-20 元数据、ERC-20 代币价格。不覆盖写入或交易提交流程、Solana/Streams/NFT 专属接口及 Moralis 完整 API。

使用方式:先检查可用链接命令 command -v moralis-openapi-cli,若缺失则创建: uxc link moralis-openapi-cli https://deep-index.moralis.io/api/v2.2 --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/moralis-openapi-skill/references/moralis-evm.openapi.json 用 moralis-openapi-cli -h 查看帮助,先用 -h 检查具体操作 schema,再以 key/value 参数执行,例如: moralis-openapi-cli get:/{address}/balance address=0x... chain=eth moralis-openapi-cli get:/erc20/{address}/price address=0x... chain=eth moralis-openapi-cli get:/wallets/{address}/net-worth address=0x... chain=eth 操作组包括钱包读取:get:/{address}/balance、get:/wallets/{address}/tokens、get:/wallets/{address}/history、get:/wallets/{address}/swaps、get:/wallets/{address}/net-worth;代币读取:get:/erc20/metadata、get:/erc20/{address}/price。

限制与注意事项:自动化应保持 JSON 输出信封,不要使用 --text;优先解析稳定字段 ok、kind、protocol、data、error。该 v1 技能为只读,不涉及签名或交易广播。Moralis 支持多条链,须显式传入 chain,不要默认以太坊。钱包历史与兑换在大范围下可能开销较高,建议从小 limit 和窄时间窗口开始。moralis-openapi-cli <operation> ... 等价于 uxc https://deep-index.moralis.io/api/v2.2 --schema-url <schema> <operation> ...。参考资料包括 references/usage-patterns.md 与 references/moralis-evm.openapi.json,文档见 https://docs.moralis.com/data-api/evm/wallet 与 https://docs.moralis.com/data-api/evm/token。