learn-moralis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLearn Moralis
了解Moralis
Behavior
响应规则
If the user invokes with no question (or just says "learn moralis"), respond with a friendly platform overview. Walk them through:
/learn-moralis- What Moralis is (enterprise Web3 data platform)
- The two skills available and when to use each:
- @moralis-data-api (135 endpoints) — query wallet balances, tokens, NFTs, DeFi positions, prices, transactions, analytics. Use for "what is the current/historical state?"
- @moralis-streams-api (20 endpoints, EVM only) — real-time EVM event monitoring via webhooks. Use for "notify me when something happens"
- Supported chains: 40+ EVM chains for both skills, Solana for Data API only
- How to get started: set in
MORALIS_API_KEY, then use the skill that fits their need.env
Keep it conversational and concise — think "onboarding tour", not "dump the docs". End by asking what they'd like to build so you can point them to the right skill.
If the user invokes with a specific question, answer that question directly using the knowledge below, then route them to the appropriate technical skill.
/learn-moralis当用户无问题调用时(或仅发送“learn moralis”),需返回友好的平台概览,引导用户了解以下内容:
/learn-moralis- Moralis是什么(企业级Web3数据平台)
- 可用的两项技能及适用场景:
- @moralis-data-api(135个端点)——查询钱包余额、代币、NFT、DeFi仓位、价格、交易记录、分析数据。适用于“当前/历史状态是什么?”类问题
- @moralis-streams-api(20个端点,仅支持EVM)——通过webhooks实现实时EVM事件监控。适用于“当事件发生时通知我”类需求
- 支持的链:两项技能均支持40+条EVM链,仅Data API支持Solana
- 入门步骤:在文件中配置
.env,然后选择符合需求的技能使用MORALIS_API_KEY
保持语气口语化且简洁——相当于“入门导览”,而非“文档堆砌”。最后询问用户想要构建的内容,以便引导至合适的技能。
当用户携带具体问题调用时,需使用下方知识直接解答问题,然后引导至对应的技术技能。
/learn-moralisWhat is Moralis?
什么是Moralis?
Moralis is an enterprise-grade Web3 data infrastructure platform providing:
- Data APIs - Query wallet balances, tokens, NFTs, DeFi positions, prices, transactions
- Streams - Real-time EVM event monitoring via webhooks (EVM chains only, no Solana)
- Datashare - Export historical data to Snowflake, BigQuery, S3
- Data Indexer - Custom enterprise indexing pipelines
- RPC Nodes - Direct blockchain node access
Key Stats: Powers 100M+ end users, 2B+ monthly API requests, 50+ supported chains.
Moralis是企业级Web3数据基础设施平台,提供以下服务:
- 数据API - 查询钱包余额、代币、NFT、DeFi仓位、价格、交易记录
- Streams流服务 - 通过webhooks实现实时EVM事件监控(仅支持EVM链,不支持Solana)
- 数据共享 - 将历史数据导出至Snowflake、BigQuery、S3
- 数据索引器 - 定制化企业级索引管道
- RPC节点 - 直接访问区块链节点
关键数据: 为超1亿终端用户提供服务,月均API请求量超20亿,支持50+条区块链。
Routing to Technical Skills
引导至技术技能
After answering a general question, route users to the appropriate skill:
| User Need | Route To |
|---|---|
| Query wallet data (balances, tokens, NFTs, history) | @moralis-data-api |
| Get token prices, metadata, analytics | @moralis-data-api |
| Query NFT metadata, traits, floor prices | @moralis-data-api |
| Get DeFi positions, protocol data | @moralis-data-api |
| Query blocks, transactions | @moralis-data-api |
| Real-time wallet monitoring (EVM) | @moralis-streams-api |
| Real-time contract events (EVM) | @moralis-streams-api |
| Webhooks for EVM on-chain events | @moralis-streams-api |
| Track EVM transfers as they happen | @moralis-streams-api |
Rule of thumb:
- Data API = "What is the current/historical state?"
- Streams = "Notify me when something happens"
解答通用问题后,需引导用户至合适的技能:
| 用户需求 | 引导至 |
|---|---|
| 查询钱包数据(余额、代币、NFT、历史记录) | @moralis-data-api |
| 获取代币价格、元数据、分析数据 | @moralis-data-api |
| 查询NFT元数据、属性、地板价 | @moralis-data-api |
| 获取DeFi仓位、协议数据 | @moralis-data-api |
| 查询区块、交易记录 | @moralis-data-api |
| 实时钱包监控(EVM) | @moralis-streams-api |
| 实时合约事件追踪(EVM) | @moralis-streams-api |
| EVM链上事件的Webhook | @moralis-streams-api |
| 实时追踪EVM转账 | @moralis-streams-api |
经验法则:
- Data API = “当前/历史状态是什么?”
- Streams = “当事件发生时通知我”
Quick Capability Reference
快速能力参考
Can Moralis Do This?
Moralis能否实现该功能?
| Question | Answer | Skill |
|---|---|---|
| Get wallet token balances? | Yes, with USD prices | @moralis-data-api |
| Get wallet NFTs? | Yes, with metadata | @moralis-data-api |
| Get wallet transaction history? | Yes, decoded | @moralis-data-api |
| Get token prices? | Yes, real-time + OHLCV | @moralis-data-api |
| Get NFT floor prices? | Yes (ETH, Base, Sei) | @moralis-data-api |
| Get DeFi positions? | Yes (major chains) | @moralis-data-api |
| Monitor wallets in real-time? | Yes (EVM only) | @moralis-streams-api |
| Track contract events live? | Yes (EVM only) | @moralis-streams-api |
| Get historical events? | Use Data API queries | @moralis-data-api |
| ENS/Unstoppable domain lookup? | Yes | @moralis-data-api |
| Token security scores? | Yes | @moralis-data-api |
| Detect snipers/bots? | Yes | @moralis-data-api |
| 问题 | 答案 | 技能 |
|---|---|---|
| 获取钱包代币余额? | 可以,支持USD计价 | @moralis-data-api |
| 获取钱包NFT? | 可以,包含元数据 | @moralis-data-api |
| 获取钱包交易历史? | 可以,已解码 | @moralis-data-api |
| 获取代币价格? | 可以,实时价格+OHLCV数据 | @moralis-data-api |
| 获取NFT地板价? | 可以(ETH、Base、Sei链) | @moralis-data-api |
| 获取DeFi仓位? | 可以(主流链) | @moralis-data-api |
| 实时监控钱包? | 可以(仅EVM链) | @moralis-streams-api |
| 实时追踪合约事件? | 可以(仅EVM链) | @moralis-streams-api |
| 获取历史事件? | 使用Data API查询 | @moralis-data-api |
| ENS/Unstoppable域名查询? | 可以 | @moralis-data-api |
| 代币安全评分? | 可以 | @moralis-data-api |
| 检测狙击手/机器人? | 可以 | @moralis-data-api |
What Moralis Cannot Do
Moralis无法实现的功能
- Execute transactions (read-only APIs)
- Provide private node access (use RPC Nodes product separately)
- Index custom smart contracts (use Data Indexer product)
- Store user data (you handle storage)
- Provide testnet price data (only mainnet prices)
- 执行交易(仅提供只读API)
- 提供私有节点访问(需单独使用RPC Nodes产品)
- 索引自定义智能合约(需使用Data Indexer产品)
- 存储用户数据(需自行处理存储)
- 提供测试网价格数据(仅支持主网价格)
Supported Chains
支持的链
Full API Support
全API支持
| Chain | Chain ID | Notes |
|---|---|---|
| Ethereum | 0x1 | All APIs including floor prices |
| Base | 0x2105 | All APIs including floor prices |
| Polygon | 0x89 | Missing only floor prices |
| BSC | 0x38 | No profitability, no floor prices |
| Arbitrum | 0xa4b1 | No profitability, no floor prices |
| Optimism | 0xa | No profitability, no floor prices |
| Avalanche | 0xa86a | No profitability, no floor prices |
| Sei | 0x531 | New chain, full support |
| Monad | 0x8f | New chain, good support |
| 链 | 链ID | 说明 |
|---|---|---|
| Ethereum | 0x1 | 支持所有API,包括地板价 |
| Base | 0x2105 | 支持所有API,包括地板价 |
| Polygon | 0x89 | 仅不支持地板价 |
| BSC | 0x38 | 不支持盈利分析,不支持地板价 |
| Arbitrum | 0xa4b1 | 不支持盈利分析,不支持地板价 |
| Optimism | 0xa | 不支持盈利分析,不支持地板价 |
| Avalanche | 0xa86a | 不支持盈利分析,不支持地板价 |
| Sei | 0x531 | 新链,全支持 |
| Monad | 0x8f | 新链,支持良好 |
Also Supported
其他支持的链
Linea, Fantom, Cronos, Gnosis, Chiliz, Moonbeam, Moonriver, Flow, Ronin, Lisk, Pulse
Linea、Fantom、Cronos、Gnosis、Chiliz、Moonbeam、Moonriver、Flow、Ronin、Lisk、Pulse
Solana
Solana
Mainnet and Devnet supported via @moralis-data-api only. Streams does not support Solana. Use suffix endpoints.
__solana仅通过**@moralis-data-api**支持主网和测试网。Streams不支持Solana。需使用带后缀的端点。
__solanaComing Soon
即将支持
Blast, zkSync, Mantle, opBNB, Polygon zkEVM, Zetachain
Blast、zkSync、Mantle、opBNB、Polygon zkEVM、Zetachain
Pricing Overview
定价概览
| Plan | Monthly CUs | Throughput | Price |
|---|---|---|---|
| Free | 40K/day | 1,000 CU/s | $0 |
| Starter | 2M | 1,000 CU/s | $49/mo |
| Pro | 100M | 2,000 CU/s | $199/mo |
| Business | 500M | 5,000 CU/s | $490/mo |
| Enterprise | Custom | Custom | Contact |
Compute Units (CUs): Each API call costs CUs based on complexity. Simple queries ~1-5 CUs, complex queries ~10-50 CUs.
Overages: Starter $11.25/M, Pro $5/M, Business $4/M
Free tier includes: All APIs (Wallet, Token, NFT, Price, DeFi, Blockchain, Streams)
| 套餐 | 月均CU额度 | 吞吐量 | 价格 |
|---|---|---|---|
| 免费版 | 每日4万CU | 1000 CU/秒 | $0 |
| 入门版 | 200万CU | 1000 CU/秒 | $49/月 |
| 专业版 | 1亿CU | 2000 CU/秒 | $199/月 |
| 商业版 | 5亿CU | 5000 CU/秒 | $490/月 |
| 企业版 | 定制 | 定制 | 联系我们 |
计算单元(CUs): 每个API调用根据复杂度消耗CU。简单查询约1-5 CU,复杂查询约10-50 CU。
超额费用: 入门版 $11.25/百万CU,专业版 $5/百万CU,商业版 $4/百万CU
免费版包含: 所有API(钱包、代币、NFT、价格、DeFi、区块链、Streams)
Getting Started
入门步骤
- Sign up: https://admin.moralis.com/register
- Get API key: Dashboard → API Keys
- Set up : Add
.envto yourMORALIS_API_KEY=your_keyfile (the skill will help you create it).env - Use skill: Ask what you want to build — the skill will check for your key and guide you
- 注册: https://admin.moralis.com/register
- 获取API密钥: 控制台 → API密钥
- 配置: 在
.env文件中添加.env(技能会协助创建该文件)MORALIS_API_KEY=your_key - 使用技能: 告知我们你想要构建的内容——技能会检查你的密钥并提供引导
Common Use Cases
常见使用场景
Wallet/Portfolio Tracker
钱包/投资组合追踪器
Need: Display user's tokens, NFTs, balances, and transaction history.
Solution: @moralis-data-api endpoints:
- - Token balances with prices
getWalletTokenBalancesPrice - - NFT holdings
getWalletNFTs - - Decoded transaction history
getWalletHistory - - Total portfolio value
getWalletNetWorth
需求: 展示用户的代币、NFT、余额和交易历史。
解决方案: 使用@moralis-data-api的以下端点:
- - 带价格的代币余额
getWalletTokenBalancesPrice - - NFT持仓
getWalletNFTs - - 已解码的交易历史
getWalletHistory - - 投资组合总价值
getWalletNetWorth
Crypto Tax/Compliance
加密货币税务/合规
Need: Export transaction history with cost basis.
Solution: @moralis-data-api endpoints:
- - All transactions decoded
getWalletHistory - - Realized gains/losses
getWalletProfitability
需求: 导出带成本基准的交易历史。
解决方案: 使用@moralis-data-api的以下端点:
- - 所有已解码交易
getWalletHistory - - 已实现收益/亏损
getWalletProfitability
NFT Marketplace
NFT市场
Need: Display NFT metadata, traits, prices, and ownership.
Solution: @moralis-data-api endpoints:
- - Full metadata + traits
getNFTMetadata - - Floor price
getNFTFloorPriceByContract - - Current holders
getNFTOwners - - Sale history
getNFTTrades
需求: 展示NFT元数据、属性、价格和所有权。
解决方案: 使用@moralis-data-api的以下端点:
- - 完整元数据+属性
getNFTMetadata - - 地板价
getNFTFloorPriceByContract - - 当前持有者
getNFTOwners - - 交易历史
getNFTTrades
DeFi Dashboard
DeFi仪表盘
Need: Show user's DeFi positions across protocols.
Solution: @moralis-data-api endpoints:
- - All positions
getDefiPositionsSummary - - Protocol-specific data
getDefiPositionsByProtocol
需求: 展示用户在各协议中的DeFi仓位。
解决方案: 使用@moralis-data-api的以下端点:
- - 所有仓位汇总
getDefiPositionsSummary - - 特定协议数据
getDefiPositionsByProtocol
Trading Bot / Alerts
交易机器人/警报
Need: React to on-chain events in real-time.
Solution: @moralis-streams-api:
- Create stream with for target events
topic0 - Receive webhook when event occurs
- Process and act on data
需求: 实时响应链上事件。
解决方案: 使用@moralis-streams-api:
- 创建带的流以追踪目标事件
topic0 - 事件发生时接收webhook
- 处理并响应数据
Token Analytics Platform
代币分析平台
Need: Token prices, holders, trading volume, security scores.
Solution: @moralis-data-api endpoints:
- - Current price
getTokenPrice - - Volume, liquidity
getTokenAnalytics - - Holder distribution
getTokenHolders - - Security analysis
getTokenScore
需求: 代币价格、持有者、交易量、安全评分。
解决方案: 使用@moralis-data-api的以下端点:
- - 当前价格
getTokenPrice - - 交易量、流动性
getTokenAnalytics - - 持有者分布
getTokenHolders - - 安全分析
getTokenScore
Data API vs Streams: When to Use
Data API vs Streams:使用场景对比
| Scenario | Use |
|---|---|
| Display current wallet balance | Data API |
| Alert when balance changes | Streams |
| Show transaction history | Data API |
| Log every new transaction | Streams |
| Get NFT metadata | Data API |
| Notify on NFT transfer | Streams |
| Query token price | Data API |
| Track DEX swaps live | Streams |
| 场景 | 使用 |
|---|---|
| 展示当前钱包余额 | Data API |
| 余额变化时发送警报 | Streams |
| 展示交易历史 | Data API |
| 记录每笔新交易 | Streams |
| 获取NFT元数据 | Data API |
| NFT转移时发送通知 | Streams |
| 查询代币价格 | Data API |
| 实时追踪DEX兑换 | Streams |
Reference Documentation
参考文档
For detailed information:
- references/FAQ.md - Common questions and answers
- references/ProductComparison.md - Detailed feature comparison
- references/UseCaseGuide.md - Implementation patterns by use case
如需详细信息:
- references/FAQ.md - 常见问题与解答
- references/ProductComparison.md - 详细功能对比
- references/UseCaseGuide.md - 按使用场景划分的实现模式
Support Resources
支持资源
- Docs: https://docs.moralis.com
- Discord: Community support
- Forum: https://forum.moralis.io
- Stack Overflow: Tag
moralis
- 文档: https://docs.moralis.com
- Discord: 社区支持
- 论坛: https://forum.moralis.io
- Stack Overflow: 标签
moralis
Next Steps
后续步骤
After answering a question, always suggest the next action:
-
If user needs to query data: "Use @moralis-data-api — make sure youris set in your
MORALIS_API_KEYfile, then I can help you fetch the data.".env -
If user needs real-time events: "Use @moralis-streams-api — make sure youris set in your
MORALIS_API_KEYfile and have your webhook URL ready, then I can help set up the stream.".env -
If user is exploring: Suggest specific endpoints based on their use case.
解答问题后,需始终建议下一步操作:
-
若用户需要查询数据: “使用@moralis-data-api——确保你的文件中已配置
.env,我可以协助你获取数据。”MORALIS_API_KEY -
若用户需要实时事件: “使用@moralis-streams-api——确保你的文件中已配置
.env并准备好webhook URL,我可以协助你配置流。”MORALIS_API_KEY -
若用户处于探索阶段: 根据其使用场景建议具体端点。