moralis-openapi-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMoralis Web3 Data API Skill
Moralis Web3 Data API 技能
Use this skill to run Moralis EVM data operations through + OpenAPI.
uxcReuse the skill for shared execution, auth, and error-handling guidance.
uxc使用本技能通过 + OpenAPI执行Moralis EVM数据操作。
uxc复用技能以获得共享的执行、认证和错误处理指引。
uxcPrerequisites
前置条件
- is installed and available in
uxc.PATH - Network access to .
https://deep-index.moralis.io/api/v2.2 - Access to the curated OpenAPI schema URL:
https://raw.githubusercontent.com/holon-run/uxc/main/skills/moralis-openapi-skill/references/moralis-evm.openapi.json
- A Moralis API key.
- 已安装并在
uxc中可用。PATH - 可访问网络。
https://deep-index.moralis.io/api/v2.2 - 可访问精心整理的OpenAPI schema URL:
https://raw.githubusercontent.com/holon-run/uxc/main/skills/moralis-openapi-skill/references/moralis-evm.openapi.json
- 拥有Moralis API密钥。
Scope
适用范围
This skill covers a read-first wallet intelligence surface:
- native balance lookup
- wallet token balances
- wallet history
- wallet swaps
- wallet net worth
- ERC-20 metadata lookup
- ERC-20 token price lookup
This skill does not cover:
- write or transaction submission flows
- Solana, Streams, or NFT-specific surfaces
- the full Moralis API
本技能覆盖以读取为主的钱包智能场景:
- 原生余额查询
- 钱包代币余额
- 钱包历史记录
- 钱包兑换记录
- 钱包净资产
- ERC-20元数据查询
- ERC-20代币价格查询
本技能不覆盖:
- 写入或交易提交流程
- Solana、Streams或NFT相关场景
- 完整的Moralis API
Authentication
认证方式
Moralis uses header auth.
X-API-KeyConfigure one API-key credential and bind it to :
deep-index.moralis.io/api/v2.2bash
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 100Validate the active mapping when auth looks wrong:
bash
uxc auth binding match https://deep-index.moralis.io/api/v2.2Moralis采用请求头认证。
X-API-Key配置一个API密钥凭证并绑定到:
deep-index.moralis.io/api/v2.2bash
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当认证出现问题时,验证当前的映射关系:
bash
uxc auth binding match https://deep-index.moralis.io/api/v2.2Core Workflow
核心工作流程
-
Use the fixed link command by default:
command -v moralis-openapi-cli- If missing, create it:
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
-
Inspect operation schema first:
moralis-openapi-cli get:/{address}/balance -hmoralis-openapi-cli get:/wallets/{address}/tokens -hmoralis-openapi-cli get:/erc20/{address}/price -h
-
Prefer narrow reads before broader wallet scans:
moralis-openapi-cli get:/{address}/balance address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=ethmoralis-openapi-cli get:/erc20/{address}/price address=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 chain=ethmoralis-openapi-cli get:/wallets/{address}/net-worth address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=eth
-
Execute with key/value parameters:
moralis-openapi-cli get:/wallets/{address}/tokens address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=ethmoralis-openapi-cli get:/wallets/{address}/history address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=eth limit=20
-
默认使用固定链接命令:
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
-
先查看操作schema:
moralis-openapi-cli get:/{address}/balance -hmoralis-openapi-cli get:/wallets/{address}/tokens -hmoralis-openapi-cli get:/erc20/{address}/price -h
-
在进行更广泛的钱包扫描前,优先进行精准读取:
moralis-openapi-cli get:/{address}/balance address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=ethmoralis-openapi-cli get:/erc20/{address}/price address=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 chain=ethmoralis-openapi-cli get:/wallets/{address}/net-worth address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=eth
-
使用键值参数执行操作:
moralis-openapi-cli get:/wallets/{address}/tokens address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=ethmoralis-openapi-cli get:/wallets/{address}/history address=0xd8da6bf26964af9d7eed9e03e53415d37aa96045 chain=eth limit=20
Operation Groups
操作分组
Wallet Reads
钱包读取
get:/{address}/balanceget:/wallets/{address}/tokensget:/wallets/{address}/historyget:/wallets/{address}/swapsget:/wallets/{address}/net-worth
get:/{address}/balanceget:/wallets/{address}/tokensget:/wallets/{address}/historyget:/wallets/{address}/swapsget:/wallets/{address}/net-worth
Token Reads
代币读取
get:/erc20/metadataget:/erc20/{address}/price
get:/erc20/metadataget:/erc20/{address}/price
Guardrails
防护机制
- Keep automation on the JSON output envelope; do not use .
--text - Parse stable fields first: ,
ok,kind,protocol,data.error - Treat this v1 skill as read-only. Do not imply signing or transaction broadcast support.
- Moralis supports multiple chains. Always pass explicitly instead of assuming Ethereum.
chain - Wallet history and swaps can become expensive at large ranges. Start with small limits and narrow time windows.
- is equivalent to
moralis-openapi-cli <operation> ....uxc https://deep-index.moralis.io/api/v2.2 --schema-url <moralis_openapi_schema> <operation> ...
- 自动化操作仅使用JSON输出格式;请勿使用参数。
--text - 优先解析稳定字段:,
ok,kind,protocol,data。error - 将本v1技能视为只读工具。请勿暗示其支持签名或交易广播功能。
- Moralis支持多条链。请始终显式传入参数,而非默认假设为以太坊。
chain - 钱包历史记录和兑换记录在大范围查询时可能产生较高成本。请从小范围限制和窄时间窗口开始查询。
- 等同于
moralis-openapi-cli <operation> ...。uxc https://deep-index.moralis.io/api/v2.2 --schema-url <moralis_openapi_schema> <operation> ...
References
参考资料
- Usage patterns:
references/usage-patterns.md - Curated OpenAPI schema:
references/moralis-evm.openapi.json - Moralis wallet docs: https://docs.moralis.com/data-api/evm/wallet
- Moralis token docs: https://docs.moralis.com/data-api/evm/token
- 使用模式:
references/usage-patterns.md - 精心整理的OpenAPI schema:
references/moralis-evm.openapi.json - Moralis钱包文档:https://docs.moralis.com/data-api/evm/wallet
- Moralis代币文档:https://docs.moralis.com/data-api/evm/token