Typed Moralis
A fully typed, validated async client for the Moralis API.
from typed_moralis import Moralis
async with Moralis.new() as client:
balances = await client.evm.wallet.token_balances(
'0xd8dA6BF26964aF9D7eed9e03E53415D37aA96045', chain='eth',
)
print(balances['result'])Moralis is a cross-chain wallet/token/NFT data API. This client covers its full surface across seven product groups sharing one API key:
evm-- wallet balances/history/net worth, ERC20 token metadata/price/holders, NFT metadata/ownership/prices/trades, and raw block/transaction lookups, across every EVM chain Moralis indexessolana-- wallet balances/portfolio and SPL token metadata/pricingbitcoin-- wallet balances/history, block/transaction lookups, and BTC pricinguniversal-- cross-chain entity search and chain/category market metricscortex-- an AI chat endpoint over indexed on-chain data (deprecated upstream)auth-- Sign-In-With-Ethereum-style wallet challenge/verify flowsstreams-- webhook stream management (create, update, and inspect server-side push subscriptions; delivery is an HTTP POST to your own endpoint, not a client-side socket)
Why Typed Moralis?
- 🎯 Precise Types: Typed endpoint inputs and responses, not
dict/Any. - ✅ Runtime Validation: Responses validated by default, not just typed on paper.
- ⚡ Async First: Async HTTP, built for concurrent wallet, token, and NFT lookups.
- 📚 Full Surface: every documented Moralis endpoint across EVM, Solana, Bitcoin, cross-chain, auth, and streams data -- not just the popular ones.
Installation
pip install typed-moralisHow To
- Fetch Wallet Data
- Fetch Token Data
- Fetch NFT Data
- Fetch Solana Data
- Fetch Bitcoin Data
- Explore Cross-Chain Data
- Authenticate a Wallet
- Manage Webhook Streams
- Paginate Through Results
Reference
Design Philosophy
Typed Moralis follows the principles outlined in this blog post.
Details matter. Developer experience matters.