moralis-data-api
БесплатноБез исполняемых скриптовНе проверенQuery Web3 blockchain data from Moralis API. Use when user asks about wallet data (balances, tokens, NFTs, transaction history, profitability, net worth)…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
CRITICAL: Read Rule Files Before Implementing
The #1 cause of bugs is not reading the endpoint rule file before writing code.
For EVERY endpoint:
- Read
rules/{EndpointName}.md - Find "Example Response" section
- Copy the EXACT JSON structure
- Note field names (snake_case), data types, HTTP method, path, wrapper structure
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://deep-index.moralis.io/api/v2.2/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/balance?chain=0x1" \
-H "X-API-Key: $MORALIS_API_KEY"
Base URLs
| API | Base URL |
|---|---|
| EVM | https://deep-index.moralis.io/api/v2.2 |
| Solana | https://solana-gateway.moralis.io |
Authentication
All requests require: X-API-Key: $MORALIS_API_KEY
Quick Reference: Most Common Patterns
Data Type Rules
| Field | Reality | NOT |
|---|---|---|
block_number |
Decimal 12386788 |
Hex 0xf2b5a4 |
timestamp |
ISO "2021-05-07T11:08:35.000Z" |
Unix 1620394115 |
balance |
String "1000000000000000000" |
Number |
decimals |
String or number | Always number |
Block Numbers (always decimal)
block_number: 12386788; // number - use directly
block_number: "12386788"; // string - parseInt(block_number, 10)
Timestamps (usually ISO strings)
"2021-05-07T11:08:35.000Z"; // → new Date(timestamp).getTime()
Balances (always strings unless its a property named "formatted" eg. balanceFormatted, BigInt)
balance: "1000000000000000000";
// → (Number(BigInt(balance)) / 1e18).toFixed(6)
Response Patterns
| Pattern | Example Endpoints |
|---|---|
Direct array [...] |
getWalletTokenBalancesPrice, getTokenMetadata |
Wrapped { result: [] } |
getWalletNFTs, getWalletTransactions |
Paginated { page, cursor, result } |
getWalletHistory, getNFTTransfers |
// Safe extraction
const data = Array.isArray(response) ? response : response.result || [];
Common Field Mappings
token_address → tokenAddress
from_address_label → fromAddressLabel
block_number → blockNumber
receipt_status: "1" → success, "0" → failed
possible_spam: "true"/"false" → boolean check
Common Pitfalls (Top 5)
- Block numbers are decimal, not hex - Use
parseInt(x, 10), notparseInt(x, 16) - Timestamps are ISO strings - Use
new Date(timestamp).getTime() - Balances are strings - Use
BigInt(balance)for math - Response may be wrapped - Check for
.resultbefore.map() - Path inconsistencies - Some use
/wallets/{address}/..., others/{address}/...
See references/CommonPitfalls.md for complete reference.
Pagination
Many endpoints use cursor-based pagination:
# First request
curl "...?limit=100" -H "X-API-Key: $KEY"
# Next page
curl "...?limit=100&cursor=<cursor_from_response>" -H "X-API-Key: $KEY"
See references/Pagination.md for details.
Testing Endpoints
ADDRESS="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
CHAIN="0x1"
# Wallet Balance
curl "https://deep-index.moralis.io/api/v2.2/${ADDRESS}/balance?chain=${CHAIN}" \
-H "X-API-Key: $MORALIS_API_KEY"
# Token Price
curl "https://deep-index.moralis.io/api/v2.2/erc20/0x6B175474E89094C44Da98b954EedeAC495271d0F/price?chain=${CHAIN}" \
-H "X-API-Key: $MORALIS_API_KEY"
# Wallet Transactions (note result wrapper)
curl "https://deep-index.moralis.io/api/v2.2/${ADDRESS}?chain=${CH
Установить moralis-data-api в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadGrepGlobВложенные файлы
FAQ
Что делает скилл moralis-data-api?
Query Web3 blockchain data from Moralis API. Use when user asks about wallet data (balances, tokens, NFTs, transaction history, profitability, net worth), token data (prices, metadata, DEX pairs, analytics, security scores), NFT data (metadata, transfers, traits, rarity, floor prices), DeFi positions, entity/label data for exchanges and funds, or block and transaction data. Supports EVM chains (Ethereum, Polygon, BSC, Arbitrum, Base, Optimism, Avalanche, etc.) and Solana. NOT for real-time streaming - use moralis-streams-api instead.
Как установить скилл moralis-data-api?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл moralis-data-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