moralis-streams-api
БесплатноБез исполняемых скриптовНе проверенReal-time blockchain event monitoring with webhooks. Use when user asks about setting up webhooks, real-time event streaming, monitoring wallet addresses…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
CRITICAL: Read Rule Files Before Implementing
The #1 cause of bugs is using wrong HTTP methods or stream configurations.
For EVERY endpoint:
- Read
rules/{EndpointName}.md - Check HTTP method (PUT for create, POST for update, DELETE for delete)
- Verify stream ID format (UUID, not hex)
- Use hex chain IDs (0x1, 0x89), not names (eth, polygon)
Reading Order:
- This SKILL.md (core patterns)
- Endpoint rule file in
rules/ - Pattern references in
references/(for edge cases only)
Setup
API Key (optional)
Never ask the user to paste their API key into the chat. Instead:
- Check if
MORALIS_API_KEYis set in the environment (try running[ -n "$MORALIS_API_KEY" ] && echo "API key is set" || echo "API key is NOT set"). - If not set, offer to create the
.envfile with an empty placeholder:MORALIS_API_KEY= - Tell the user to open the
.envfile and paste their key there themselves. - Let them know: without the key, you won't be able to test or call the Moralis API on their behalf.
If they don't have a key yet, point them to admin.moralis.com/register (free, no credit card).
Environment Variable Discovery
The .env file location depends on how skills are installed:
Create the .env file in the project root (same directory the user runs Claude Code from). Make sure .env is in .gitignore.
Verify Your Key
curl "https://api.moralis-streams.com/streams/evm?limit=10" \
-H "X-API-Key: $MORALIS_API_KEY"
Base URL
https://api.moralis-streams.com
Important: Different from Data API (deep-index.moralis.io).
Authentication
All requests require: X-API-Key: $MORALIS_API_KEY
HTTP Methods (CRITICAL)
| Action | Method | Endpoint |
|---|---|---|
| Create stream | PUT |
/streams/evm |
| Update stream | POST |
/streams/evm/{id} |
| Delete stream | DELETE |
/streams/evm/{id} |
| Get streams | GET |
/streams/evm |
| Replace addresses | PATCH |
/streams/evm/{id}/address |
Common mistake: Using POST to create streams. Use PUT instead.
Stream Types
| Type | Description |
|---|---|
tx |
Native transactions |
log |
Contract event logs |
erc20transfer |
ERC20 token transfers |
erc20approval |
ERC20 approvals |
nfttransfer |
NFT transfers |
internalTx |
Internal transactions |
Quick Reference: Most Common Patterns
Stream ID Format (ALWAYS UUID)
// WRONG - Hex format
"0x1234567890abcdef"
// CORRECT - UUID format
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Chain IDs (ALWAYS hex)
"0x1" // Ethereum
"0x89" // Polygon
"0x38" // BSC
"0xa4b1" // Arbitrum
"0xa" // Optimism
"0x2105" // Base
Event Signatures (topic0)
"Transfer(address,address,uint256)" // ERC20/NFT Transfer
"Approval(address,address,uint256)" // ERC20 Approval
Status Values (lowercase only)
"active" // CORRECT - normal operating state
"paused" // CORRECT - manually paused
"error" // CORRECT - auto-set when webhook success rate <70%
"terminated" // CORRECT - unrecoverable, after 24h in error
"ACTIVE" // WRONG
Common Pitfalls (Top 5)
- Using POST to create streams - Use
PUTinstead - Wrong base URL - Use
api.moralis-streams.com, NOTdeep-index.moralis.io - Hex stream ID - Must be UUID format, not hex
- String chain names - Use hex (0x1), not names (eth)
- Uppercase status - Use lowercase ("active", "paused")
- Not returning 200 on test webhook - Stream won't start unless your endpoint returns 2xx on the test webhook sent during create/update
See references/CommonPitfalls.md for complete reference.
Triggers (Read-Only Contract Calls)
Enrich webhook data with on-chain reads (e.g., balanceOf). Triggers execute view/pure functions and attach results to webhook events. Supports dynamic selectors ($contract, $from, $to). See references/Triggers.md for complete reference with examples.
Native Balances in Webhooks
Configure getNativeBalances to include native token balances (ETH, BNB, etc.) in webhook payloads. Requires Business plan+. See references/UsefulStreamOptions.md for configuration details.
Delivery and Error Handling
- Two webhooks per event: Unconfirmed (
confirmed: false) + Confirmed (confirmed: true). Idempotent handlers required. - Streams auto-terminate after 24 hours in error state (webhook success rate <70%). This is unrecoverable — you must create a new stream.
- Test webhook: Sent on every create/update. Must return 200 or stream won't start.
See references/DeliveryGuarantees.md and references/ErrorHandling.md.
Установить moralis-streams-api в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadGrepGlobВложенные файлы
FAQ
Что делает скилл moralis-streams-api?
Real-time blockchain event monitoring with webhooks. Use when user asks about setting up webhooks, real-time event streaming, monitoring wallet addresses, tracking token transfers in real-time, listening to all addresses on a chain, creating/updating/deleting streams, adding/removing addresses from streams, or receiving blockchain events as they happen. Supports all EVM chains. NOT for querying historical or current blockchain state - use moralis-data-api instead.
Как установить скилл moralis-streams-api?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл moralis-streams-api запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic