learn-moralis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Learn Moralis

了解Moralis

Behavior

响应规则

If the user invokes
/learn-moralis
with no question
(or just says "learn moralis"), respond with a friendly platform overview. Walk them through:
  1. What Moralis is (enterprise Web3 data platform)
  2. 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"
  3. Supported chains: 40+ EVM chains for both skills, Solana for Data API only
  4. How to get started: set
    MORALIS_API_KEY
    in
    .env
    , then use the skill that fits their need
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
/learn-moralis
with a specific question
, answer that question directly using the knowledge below, then route them to the appropriate technical skill.
当用户无问题调用
/learn-moralis
(或仅发送“learn moralis”),需返回友好的平台概览,引导用户了解以下内容:
  1. Moralis是什么(企业级Web3数据平台)
  2. 可用的两项技能及适用场景:
    • @moralis-data-api(135个端点)——查询钱包余额、代币、NFT、DeFi仓位、价格、交易记录、分析数据。适用于“当前/历史状态是什么?”类问题
    • @moralis-streams-api(20个端点,仅支持EVM)——通过webhooks实现实时EVM事件监控。适用于“当事件发生时通知我”类需求
  3. 支持的链:两项技能均支持40+条EVM链,仅Data API支持Solana
  4. 入门步骤:在
    .env
    文件中配置
    MORALIS_API_KEY
    ,然后选择符合需求的技能使用
保持语气口语化且简洁——相当于“入门导览”,而非“文档堆砌”。最后询问用户想要构建的内容,以便引导至合适的技能。
当用户携带具体问题调用
/learn-moralis
,需使用下方知识直接解答问题,然后引导至对应的技术技能。

What 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 NeedRoute 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能否实现该功能?

QuestionAnswerSkill
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支持

ChainChain IDNotes
Ethereum0x1All APIs including floor prices
Base0x2105All APIs including floor prices
Polygon0x89Missing only floor prices
BSC0x38No profitability, no floor prices
Arbitrum0xa4b1No profitability, no floor prices
Optimism0xaNo profitability, no floor prices
Avalanche0xa86aNo profitability, no floor prices
Sei0x531New chain, full support
Monad0x8fNew chain, good support
链ID说明
Ethereum0x1支持所有API,包括地板价
Base0x2105支持所有API,包括地板价
Polygon0x89仅不支持地板价
BSC0x38不支持盈利分析,不支持地板价
Arbitrum0xa4b1不支持盈利分析,不支持地板价
Optimism0xa不支持盈利分析,不支持地板价
Avalanche0xa86a不支持盈利分析,不支持地板价
Sei0x531新链,全支持
Monad0x8f新链,支持良好

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
__solana
suffix endpoints.
仅通过**@moralis-data-api**支持主网和测试网。Streams不支持Solana。需使用带
__solana
后缀的端点。

Coming Soon

即将支持

Blast, zkSync, Mantle, opBNB, Polygon zkEVM, Zetachain

Blast、zkSync、Mantle、opBNB、Polygon zkEVM、Zetachain

Pricing Overview

定价概览

PlanMonthly CUsThroughputPrice
Free40K/day1,000 CU/s$0
Starter2M1,000 CU/s$49/mo
Pro100M2,000 CU/s$199/mo
Business500M5,000 CU/s$490/mo
EnterpriseCustomCustomContact
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万CU1000 CU/秒$0
入门版200万CU1000 CU/秒$49/月
专业版1亿CU2000 CU/秒$199/月
商业版5亿CU5000 CU/秒$490/月
企业版定制定制联系我们
计算单元(CUs): 每个API调用根据复杂度消耗CU。简单查询约1-5 CU,复杂查询约10-50 CU。
超额费用: 入门版 $11.25/百万CU,专业版 $5/百万CU,商业版 $4/百万CU
免费版包含: 所有API(钱包、代币、NFT、价格、DeFi、区块链、Streams)

Getting Started

入门步骤

  1. Sign up: https://admin.moralis.com/register
  2. Get API key: Dashboard → API Keys
  3. Set up
    .env
    :
    Add
    MORALIS_API_KEY=your_key
    to your
    .env
    file (the skill will help you create it)
  4. Use skill: Ask what you want to build — the skill will check for your key and guide you

  1. 注册: https://admin.moralis.com/register
  2. 获取API密钥: 控制台 → API密钥
  3. 配置
    .env
    .env
    文件中添加
    MORALIS_API_KEY=your_key
    (技能会协助创建该文件)
  4. 使用技能: 告知我们你想要构建的内容——技能会检查你的密钥并提供引导

Common Use Cases

常见使用场景

Wallet/Portfolio Tracker

钱包/投资组合追踪器

Need: Display user's tokens, NFTs, balances, and transaction history.
Solution: @moralis-data-api endpoints:
  • getWalletTokenBalancesPrice
    - Token balances with prices
  • getWalletNFTs
    - NFT holdings
  • getWalletHistory
    - Decoded transaction history
  • getWalletNetWorth
    - Total portfolio value
需求: 展示用户的代币、NFT、余额和交易历史。
解决方案: 使用@moralis-data-api的以下端点:
  • getWalletTokenBalancesPrice
    - 带价格的代币余额
  • getWalletNFTs
    - NFT持仓
  • getWalletHistory
    - 已解码的交易历史
  • getWalletNetWorth
    - 投资组合总价值

Crypto Tax/Compliance

加密货币税务/合规

Need: Export transaction history with cost basis.
Solution: @moralis-data-api endpoints:
  • getWalletHistory
    - All transactions decoded
  • getWalletProfitability
    - Realized gains/losses
需求: 导出带成本基准的交易历史。
解决方案: 使用@moralis-data-api的以下端点:
  • getWalletHistory
    - 所有已解码交易
  • getWalletProfitability
    - 已实现收益/亏损

NFT Marketplace

NFT市场

Need: Display NFT metadata, traits, prices, and ownership.
Solution: @moralis-data-api endpoints:
  • getNFTMetadata
    - Full metadata + traits
  • getNFTFloorPriceByContract
    - Floor price
  • getNFTOwners
    - Current holders
  • getNFTTrades
    - Sale history
需求: 展示NFT元数据、属性、价格和所有权。
解决方案: 使用@moralis-data-api的以下端点:
  • getNFTMetadata
    - 完整元数据+属性
  • getNFTFloorPriceByContract
    - 地板价
  • getNFTOwners
    - 当前持有者
  • getNFTTrades
    - 交易历史

DeFi Dashboard

DeFi仪表盘

Need: Show user's DeFi positions across protocols.
Solution: @moralis-data-api endpoints:
  • getDefiPositionsSummary
    - All positions
  • getDefiPositionsByProtocol
    - Protocol-specific data
需求: 展示用户在各协议中的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
    topic0
    for target events
  • 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:
  • getTokenPrice
    - Current price
  • getTokenAnalytics
    - Volume, liquidity
  • getTokenHolders
    - Holder distribution
  • getTokenScore
    - Security analysis

需求: 代币价格、持有者、交易量、安全评分。
解决方案: 使用@moralis-data-api的以下端点:
  • getTokenPrice
    - 当前价格
  • getTokenAnalytics
    - 交易量、流动性
  • getTokenHolders
    - 持有者分布
  • getTokenScore
    - 安全分析

Data API vs Streams: When to Use

Data API vs Streams:使用场景对比

ScenarioUse
Display current wallet balanceData API
Alert when balance changesStreams
Show transaction historyData API
Log every new transactionStreams
Get NFT metadataData API
Notify on NFT transferStreams
Query token priceData API
Track DEX swaps liveStreams

场景使用
展示当前钱包余额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

支持资源



Next Steps

后续步骤

After answering a question, always suggest the next action:
  1. If user needs to query data: "Use @moralis-data-api — make sure your
    MORALIS_API_KEY
    is set in your
    .env
    file, then I can help you fetch the data."
  2. If user needs real-time events: "Use @moralis-streams-api — make sure your
    MORALIS_API_KEY
    is set in your
    .env
    file and have your webhook URL ready, then I can help set up the stream."
  3. If user is exploring: Suggest specific endpoints based on their use case.
解答问题后,需始终建议下一步操作:
  1. 若用户需要查询数据: “使用@moralis-data-api——确保你的
    .env
    文件中已配置
    MORALIS_API_KEY
    ,我可以协助你获取数据。”
  2. 若用户需要实时事件: “使用@moralis-streams-api——确保你的
    .env
    文件中已配置
    MORALIS_API_KEY
    并准备好webhook URL,我可以协助你配置流。”
  3. 若用户处于探索阶段: 根据其使用场景建议具体端点。