Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. Read rules/{EndpointName}.md
  2. Find "Example Response" section
  3. Copy the EXACT JSON structure
  4. Note field names (snake_case), data types, HTTP method, path, wrapper structure

Reading Order:

  1. This SKILL.md (core patterns)
  2. Endpoint rule file in rules/
  3. 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:

  1. Check if MORALIS_API_KEY is set in the environment (try running [ -n "$MORALIS_API_KEY" ] && echo "API key is set" || echo "API key is NOT set").
  2. If not set, offer to create the .env file with an empty placeholder: MORALIS_API_KEY=
  3. Tell the user to open the .env file and paste their key there themselves.
  4. 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)

  1. Block numbers are decimal, not hex - Use parseInt(x, 10), not parseInt(x, 16)
  2. Timestamps are ISO strings - Use new Date(timestamp).getTime()
  3. Balances are strings - Use BigInt(balance) for math
  4. Response may be wrapped - Check for .result before .map()
  5. 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
Полный SKILL.md на GitHub

Установить moralis-data-api в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Grep
Glob

Вложенные файлы

SOURCE.mdTRUST.auto.yaml_meta.jsonreferences/CommonPitfalls.mdreferences/DataTransformations.mdreferences/DefiProtocols.mdreferences/FilteredTokens.mdreferences/NftMarketplaces.mdreferences/Pagination.mdreferences/PerformanceAndLatency.mdreferences/ResponsePatterns.mdreferences/SupportedApisAndChains.mdreferences/SupportedDexs.mdreferences/TokenHoldersFaq.mdreferences/TokenSearch.mdreferences/WalletHistory.mdrules/ApiResponseCodes.mdrules/SpamDetection.mdrules/balance__solana.mdrules/getAggregatedTokenPairStats__evm.mdrules/getAggregatedTokenPairStats__solana.mdrules/getBlock.mdrules/getBondingTokensByExchange__evm.mdrules/getBondingTokensByExchange__solana.mdrules/getCandleSticks__solana.mdrules/getContractNFTs.mdrules/getDateToBlock.mdrules/getDefiPositionsByProtocol.mdrules/getDefiPositionsSummary.mdrules/getDefiSummary.mdrules/getDiscoveryToken.mdrules/getDiscoveryToken__solana.mdrules/getEntitiesByCategory.mdrules/getEntity.mdrules/getEntityCategories.mdrules/getFilteredTokens.mdrules/getGraduatedTokensByExchange__evm.mdrules/getGraduatedTokensByExchange__solana.mdrules/getHistoricalTokenHolders__evm.mdrules/getHistoricalTokenHolders__solana.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить moralis-data-api с