# Request bind between profile of two addresses
Source: https://docs.moralis.com/api-reference/bind/request-bind-between-profile-of-two-addresses
/openapi-files/auth-api/auth.json post /bind/request
Request for message to bind profile that is belong to the two addresses
All profiles under the addresses will be bound and new profile will be generated.
# Request to remove bind of an address from a profile
Source: https://docs.moralis.com/api-reference/bind/request-to-remove-bind-of-an-address-from-a-profile
/openapi-files/auth-api/auth.json post /bind/remove
# Verify bind request
Source: https://docs.moralis.com/api-reference/bind/verify-bind-request
/openapi-files/auth-api/auth.json post /bind/request/verify
# Verify remove bind request
Source: https://docs.moralis.com/api-reference/bind/verify-remove-bind-request
/openapi-files/auth-api/auth.json post /bind/remove/verify
# Request Aptos challenge
Source: https://docs.moralis.com/api-reference/challenge/request-aptos-challenge
/openapi-files/auth-api/auth.json post /challenge/request/aptos
# Request EVM challenge
Source: https://docs.moralis.com/api-reference/challenge/request-evm-challenge
/openapi-files/auth-api/auth.json post /challenge/request/evm
# Request Solana challenge
Source: https://docs.moralis.com/api-reference/challenge/request-solana-challenge
/openapi-files/auth-api/auth.json post /challenge/request/solana
# Verify Aptos challenge
Source: https://docs.moralis.com/api-reference/challenge/verify-aptos-challenge
/openapi-files/auth-api/auth.json post /challenge/verify/aptos
# Verify EVM challenge
Source: https://docs.moralis.com/api-reference/challenge/verify-evm-challenge
/openapi-files/auth-api/auth.json post /challenge/verify/evm
# Verify Solana challenge
Source: https://docs.moralis.com/api-reference/challenge/verify-solana-challenge
/openapi-files/auth-api/auth.json post /challenge/verify/solana
# Get addresses that are bound to the specific profileId
Source: https://docs.moralis.com/api-reference/profile/get-addresses-that-are-bound-to-the-specific-profileid
/openapi-files/auth-api/auth.json get /profile/{profileId}/addresses
# Auth API
Source: https://docs.moralis.com/auth-api/overview
Web3 authentication using wallet signature, built on the EIP-4361 standard for secure off-chain identity verification.
## Overview
Moralis **Auth API** enables secure **Web3 authentication** by letting users prove wallet ownership through message signing.
Instead of managing passwords or OAuth flows, Auth API uses cryptographic signatures to verify that users control their wallets - the native identity primitive of Web3.
***
## What Is Auth API?
Auth API provides a complete **wallet-based authentication flow** that:
* Generates secure challenge messages for users to sign
* Verifies wallet signatures cryptographically
* Returns a unique user identifier (`profileId`) across sessions
* Works with both EVM chains and Solana
The authentication follows the **EIP-4361** standard (Sign-In with Ethereum), ensuring compatibility with wallet apps and established security practices.
***
## How It Works
The authentication flow consists of three steps:
1. **Request Challenge** - Your backend requests a challenge message from Moralis
2. **User Signs** - The user signs the challenge message with their wallet
3. **Verify Signature** - Your backend sends the signature to Moralis for verification
Upon successful verification, you receive a `profileId` that uniquely identifies the user - regardless of which wallet or chain they used to authenticate.
***
## Key Features
Auth API includes:
* **EIP-4361 Standard** - Built on Sign-In with Ethereum for broad wallet compatibility
* **Unified Profile ID** - Single identifier per user across wallets and chains
* **Multi-Wallet Support** - Users can link multiple wallets to one profile
* **Cross-Chain** - Works with EVM chains and Solana
* **Stateless Verification** - No session management required on Moralis side
***
## Supported Networks
Auth API supports wallet authentication across:
* **EVM Chains** - Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Base, Avalanche, and more
* **Solana** - Full support for Solana wallet signatures
***
## Wallet Integrations
Auth API works with popular wallet connection libraries:
* MetaMask
* WalletConnect
* RainbowKit
* Coinbase Wallet
* Web3Auth
* Magic.Link
* Particle Network
***
## Common Use Cases
Auth API is commonly used for:
* **dApp Authentication**\
(secure login without passwords)
* **Gated Content**\
(verify wallet ownership before granting access)
* **NFT Verification**\
(prove ownership for holder-only features)
* **Multi-Wallet Accounts**\
(link multiple wallets to a single user profile)
* **Cross-Chain Identity**\
(unified identity across EVM and Solana)
***
## Limitations
Auth API currently does **not** support:
* **EIP-1271 Signatures** - Smart contract wallet signatures (e.g., Safe, Argent) are not supported. Only EOA (Externally Owned Account) wallets can authenticate.
***
## Get Started
* [How to Authenticate Users with MetaMask](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask)
* [How to Authenticate Users with RainbowKit](/get-started/tutorials/auth-api/authenticate-users-with-rainbow-kit)
* [How to Authenticate Users with WalletConnect](/get-started/tutorials/auth-api/authenticate-users-with-wallet-connect)
* [How to Authenticate Users with Coinbase Wallet](/get-started/tutorials/auth-api/authenticate-users-with-coinbase-wallet)
* [How to Authenticate Users with Web3Auth](/get-started/tutorials/auth-api/authenticate-users-with-web3-auth)
* [How to Authenticate Users with Magic.Link](/get-started/tutorials/auth-api/authenticate-users-with-magic-link)
# Product updates
Source: https://docs.moralis.com/changelog
New releases and improvements
## DeFi API: Now on Solana
The same three Universal DeFi API endpoints that returned EVM positions last week now return Solana positions too. No new endpoints, no schema changes - the existing calls now cover the most-used Solana protocols alongside EVM.
**What's new:**
* **Solana support** on the same Universal DeFi endpoints used for EVM
* **7 of the most-used Solana protocols** supported at launch:
* Jito
* Save (formerly Solend)
* Jupiter Lending
* Raydium
* Orca
* Drift
* Marinade
* **Unified schema:** identical response shape across EVM and Solana - no client-side stitching
* **Single call:** query EVM and Solana wallets through the same endpoints with the same filters
**Main endpoints:**
* [`getDefiSummary`](/data-api/solana/defi/wallet-protocols) — every protocol a wallet holds positions in, total USD value, and unclaimed rewards
* [`getDefiPositionsSummary`](/data-api/solana/defi/wallet-positions) — all positions with token types, values, and reward tokens
* [`getDefiPositionsByProtocol`](/data-api/solana/defi/wallet-positions-detailed) — detailed per-protocol breakdown with position-level detail
**Usecases:** portfolio trackers, exchanges, tax tools, DeFi dashboards, and AI agents that need a unified DeFi position view across EVM and Solana in a single, consistent response.
More Solana protocols are being added on a rolling basis. If you need a specific Solana protocol prioritized, [reach out to the team](https://moralis.com/contact-sales).
[Explore the Solana DeFi API →](/data-api/solana/defi/overview)
## DeFi API: 5,000+ Protocols, Now Multichain
We've significantly expanded the DeFi API (EVM) with broader protocol coverage and simpler multichain queries in a single call.
**What's new:**
* **5,000+ DeFi protocols** supported, covering 96% of the entire EVM DeFi market
* **Multichain queries:** fetch positions from a single chain, multiple chains, or all EVM chains in one API call
* **Protocols include:** Uniswap V2/V3, Aave V2/V3, Lido, Curve, Compound, MakerDAO, Pendle, Convex, Yearn, GMX, Aerodrome, Velodrome, SushiSwap, PancakeSwap, Eigenlayer, Etherfi, Rocket Pool, Spark, Morpho, and thousands more
**Main endpoints:**
* [`getDefiSummary`](/data-api/evm/defi/wallet-protocols) — every protocol a wallet holds positions in, total USD value, and unclaimed rewards
* [`getDefiPositionsSummary`](/data-api/evm/defi/wallet-positions) — all positions with token types, values, and reward tokens
* [`getDefiPositionsByProtocol`](/data-api/evm/defi/wallet-positions-detailed) — detailed per-protocol breakdown with position-level detail
**Usecases:** portfolio trackers, DeFi dashboards, tax and accounting tools, and risk monitoring. Anywhere you need a unified view of a wallet's DeFi exposure without wiring each protocol in manually.
Solana DeFi support is coming soon.
[Explore the DeFi API →](/data-api/evm/defi/overview)
## Wallet Insights
We've launched the Wallet Insights endpoint - a single API call that returns a comprehensive behavioral profile for any EVM wallet address.
Get wallet age, activity timelines, transaction counts, transfer breakdowns (native, ERC-20, NFT), swap volume, gas spend, net flow, unique counterparties, contracts created, and more - all in one response. Each metric is also available per-chain via the `includeChainBreakdown` array, so you can see exactly how a wallet behaves across different networks.
[Explore Wallet Insights →](/data-api/evm/wallet/wallet-insights)
## Historical Token Scores
We've added the ability to track Token Scores over time with a new Historical Token Score endpoint.
The Historical Token Score endpoint lets you retrieve a token's score history across different timeframes, so you can see how a token's onchain quality has changed over time.
[Explore Historical Token Scores →](/data-api/universal/token/score/token-score-timeseries)
## Token Scores
We've launched the Moralis Token Score - a unified 0–100 rating that summarizes a token's onchain quality in a single, easy-to-use metric.
[Explore Token Scores →](/data-api/universal/token/score/token-score)
## Monad EVM Live
We've added Monad EVM support to both the Data APIs and the Streams API, giving you access to this next-generation, EVM-compatible Layer-1 that delivers 10,000 TPS, 0.4-second block times, 800 ms finality, and near-zero gas fees.
## Sei EVM Live
We’ve added Sei EVM support to both the Data APIs and the Streams API, expanding your access to this high-performance Layer 1 chain built for speed and scalability.
## HyperEVM Live
We've added HyperEVM mainnet to the Moralis Streams API. You can now listen to real-time blockchain activity on HyperEVM - perfect for notifications, indexing, and on-chain automation.
# Data API Tutorials
Source: https://docs.moralis.com/data-api-tutorials
Step-by-step tutorials for building with the Moralis Data API — wallets, tokens, NFTs, prices, and blockchain data.
## Overview
These tutorials walk you through common use cases with the Moralis Data API, with complete code examples you can run locally.
***
### Wallets & Accounts
Fetch internal transactions for any wallet address.
Retrieve native balances for EOAs and smart accounts.
Track wallet activity across multiple chains.
Fetch complete transaction history for any wallet.
Build a token approval and revoke dashboard.
***
### Tokens & Markets
Get the top ERC-20 tokens ranked by market cap.
Build a DEX screener-style token dashboard.
Fetch ERC-20 transfer history by wallet or token.
Get ERC-20 token metadata by address or symbol.
Fetch token pairs and liquidity data.
Get DEX pair addresses from Uniswap, PancakeSwap, and more.
Fetch Pump.fun token swaps and prices.
Track new bonding and graduated Pump.fun tokens.
***
### NFTs
Fetch all NFTs owned by a wallet address.
Get NFT collections owned by a wallet.
Fetch NFT metadata by contract and token ID.
Get NFT owners and ownership details.
Fetch NFT floor prices for collections.
***
### Prices & Charts
Fetch the current price of any ERC-20 token.
Get historical OHLC price data for tokens.
Build crypto price charts using OHLC data.
***
### Blocks & Transactions
Fetch a blockchain transaction by its hash.
Find the closest block to a Unix timestamp.
# Chat
Source: https://docs.moralis.com/data-api/cortex-api/chat
/openapi-files/data-api/cortex.json POST /chat
# Overview
Source: https://docs.moralis.com/data-api/cortex-api/overview
Moralis Cortex is your gateway to real-time, AI-driven insights from blockchain data. Ask natural language questions. Get structured, explainable answers. Use it via our hosted API or run the Cortex MCP Server in your own infrastructure.
## What is Moralis Cortex?
Moralis Cortex is an AI-native data layer for Web3, built on top of the Moralis Model Context Protocol (MCP). It connects blockchain data with large language models like GPT-4 or Claude - enabling you to query on-chain activity using plain English or structured prompts.
Whether you're building dashboards, bots, reports, or intelligent assistants, Cortex gives you the power of AI - grounded in real blockchain data.
***
## Choose How To Use It
### Option1: Cortex API (Hosted)
Use our hosted API to ask blockchain questions and get real-time insights - no setup required.
* \*\*POST \*\*[**https://cortex-api.moralis.io/chat**](https://cortex-api.moralis.io/chat) - simple, secure REST endpoint
* Powered by enterprise-grade LLMs and Moralis infrastructure
* Returns summaries and structured data
* Supports chat history (chatId) for multi-turn conversations
* Optional streaming data - get live responses
**✅ Best for:**
* Startups, growth teams, and AI tooling
* Dashboards, chat agents, or in-product insights
* Teams who want fast access without infra overhead
### Option 2: MCP Server (Self-Hosted)
Deploy the MCP server in your own environment for full control and customization.
* Distributed via NPM
* Plug in your own LLM credentials (OpenAI, Claude, open-source)
* Customize grounding logic, data access, and plugins
* Run entirely inside your infra for privacy and compliance
**✅ Best for:**
* Enterprises with security/compliance requirements
* Developers building deeply integrated AI apps
* Teams wanting full control over data and model behavior
## Why Use Cortex?
* **🔍 Ask anything** about on-chain behavior - wallet activity, dapp usage, token flows, etc.
* **🧠 LLM-powered**: Use GPT-4, Claude, or open-source models with full flexibility
* **📊 Grounded in Moralis data**: No hallucinations - only indexed, verified blockchain truth
* **⚙️ Integrate anywhere**: APIs, agents, dashboards, or local developer tooling
* **🔒 Built for production**: Secure, composable, and extensible
# Address & Entity Labeling
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/address-labelling
Moralis enriches blockchain data with human-readable labels and entities, helping you understand who is behind on-chain activity.
Moralis enriches blockchain data with **human-readable labels and entities**, helping you understand *who* is behind on-chain activity.
This includes both:
* **Address labels** (e.g. “Coinbase Hot Wallet”)
* **Entities** (e.g. Coinbase, Uniswap, BlackRock)
Together, they provide identity, context, and discoverability across wallets, transactions, and protocols.
***
## What Are Entities?
**Entities** represent real-world organizations, projects, protocols, or individuals that control one or more blockchain addresses.
Examples include:
* Companies and institutions (e.g. exchanges, funds, TradFi firms)
* DeFi protocols and DAOs
* NFT marketplaces and collections
* Public individuals
Entities build on top of address labels by grouping **multiple related addresses** under a single, identifiable actor.
***
## Why Entities Matter
Historically, blockchain data exposed only raw addresses or simple labels.\
This made it difficult to answer higher-level questions like:
* Who is interacting with this wallet?
* Which addresses belong to the same organization?
* How does an entity operate across chains?
With Entities, Moralis provides:
* **In-depth context**\
Entities include metadata such as name, logo, description, and website.
* **Cross-address visibility**\
Multiple addresses can be linked to a single entity, giving a more complete picture of activity.
* **Better discovery and analysis**\
You can search for entities and analyze their on-chain behavior, rather than dealing with individual addresses in isolation.
***
## Entity-Enriched Responses
When supported, Moralis APIs enrich address fields with both **labels** and **entity information**.
Example:
```json theme={null}
{
"hash": "0x70c30285a9a4cc1c147cc94e5d0cefebe693fffd5fd5cbf727e2f86b6829d71b",
"nonce": "6810858",
"transaction_index": "72",
"from_address": "Oxa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
"from_address_label": "Coinbase: Hot Wallet",
"from_address_entity": "Coinbase",
"from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/coinbase.png",
"to_address": "Oxa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
"to_address_label": "Blackrock Wallet",
"to_address_entity": "Blackrock, Inc",
"to_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/blackrock.png",
"value": "0",
"gas": "207128",
"gas_price": "32393720336",
"input": "0xa9059cbb000000000000000000000000c476723407b737c173bdfd87c7abc80f6856e6320000000000000000000000000000000000000000000000008533e3870aec3000",
"receipt_cumulative_gas_used": "8535588",
"receipt_gas_used": "52089",
"receipt_contract_address": null,
"receipt_root": null,
"receipt_status": "1",
"block_timestamp": "2023-06-26T16:48:23.000Z",
"block_number": "17564884",
"block_hash": "0x4e61fbb792a84c419a22ffcc590cbcb2f5a1b88d8e864d608e3544a3594c0e69",
"transfer_index": [17564884, 72]
}
```
This allows you to display transactions as **entity-to-entity interactions**, rather than raw address transfers.
***
## Where Entity & Address Labeling Is Available
Entity and address labeling is supported on:
* Any endpoint that includes `from_address` and `to_address`
* Dedicated **Entity API** endpoints for discovery and lookup
This means labeling is automatically available across:
* Transactions
* Wallet activity
* Transfers
* DeFi interactions
***
## Entity Coverage
Moralis currently supports:
* **500+ entities**
* **10,000+ labeled addresses**
Coverage is strongest across:
* Ethereum
* Polygon
* BNB Chain
* Optimism
* Base
* Arbitrum
### Supported Entity Categories
Entities span a wide range of categories, including:
* Centralized Exchange
* Decentralized Exchange
* NFT Marketplace
* DeFi
* TradFi
* Fund
* DAO
* Bridge
* Stablecoin
* Lending / Borrowing
* Liquid Staking / Restaking
* NFT Collection
* Gaming
* Wallet
* MEV
* Real World Assets
* Privacy
* Cross-chain Infrastructure
* Individual
* Misc
Coverage and categorisation are continuously expanding.
***
## Common Use Cases
Address & Entity Labeling enables you to:
* Build readable transaction feeds
* Detect interactions with known exchanges, protocols, or institutions
* Power compliance, monitoring, and analytics workflows
* Aggregate activity at the entity level instead of per address
***
## Notes & Limitations
* Labeling and entity assignment is **best-effort**
* Not all addresses belong to known entities
* New entities and labels are added continuously as coverage expands
# Internal Transactions
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/internal-transactions
Understand and access internal transactions to get a complete view of wallet activity, contract execution, and native value transfers on EVM chains.
## Overview
Internal transactions are a critical part of many EVM-based interactions - and without them, **your data is incomplete**.
Moralis provides **full historical and real-time support for internal transactions**, allowing you to capture value transfers and contract interactions that do **not** appear as standalone blockchain transactions.
This is a key differentiator versus many APIs that only index external (user-initiated) transactions.
Related pages:
* [Wallet History](/data-api/evm/wallet/wallet-history)
* [Raw Transactions](/data-api/evm/wallet/wallet-transactions)
* [Transaction Decoding](/data-api/data-features/data-enrichment/transaction-decoding)
***
## What are internal transactions?
Internal transactions are **value transfers and contract calls that occur during the execution of a transaction**, rather than being initiated directly by an externally owned account (EOA).
They typically occur when:
* A smart contract calls another contract
* A contract transfers native currency (ETH, BNB, etc.)
* A single transaction triggers multiple downstream actions
> Internal transactions are **not separate blockchain transactions** - they are derived from EVM execution traces.
***
## Why internal transactions matter
Without internal transactions, you miss:
* Native transfers triggered by smart contracts
* Airdrops distributed within a single transaction
* Protocol rewards, fees, and payouts
* Full wallet balance movements
* Complete contract execution paths
### Example
A user interacts with a DeFi protocol:
1. User sends **one** transaction
2. Contract distributes ETH to multiple addresses internally
3. Only internal transactions show where value actually moved
Without internal transactions:
* Wallet history is incomplete
* Net worth calculations are wrong
* Important events appear to be missing
***
## What Moralis provides
Moralis indexes **full EVM execution traces**, enabling:
* Historical internal transactions
* Real-time internal transaction detection
* Native value transfers inside contract calls
* Consistent internal transaction data across APIs
This ensures:
* Complete wallet activity
* Accurate portfolio and PnL calculations
* Better protocol analytics
***
## Supported chains
Internal transactions are supported across all major EVM **mainnet** networks, with **full historical coverage**. Testnets are not supported.
| Chain | Real-time | Historical |
| :--------------- | :-------- | :--------- |
| Ethereum Mainnet | ✅ | ✅ |
| Polygon Mainnet | ✅ | ✅ |
| BNB Chain | ✅ | ✅ |
| Arbitrum | ✅ | ✅ |
| Avalanche | ✅ | ✅ |
| Base | ✅ | ✅ |
| Optimism | ✅ | ✅ |
| Fantom | ✅ | ✅ |
| Linea | ✅ | ✅ |
| Chiliz | ✅ | ✅ |
| Monad Mainnet | ✅ | ✅ |
***
## Internal transactions vs external transactions
| Feature | External | Internal |
| :------------------------------------ | :------- | :------- |
| Initiated by user | ✅ | ❌ |
| Has its own tx hash | ✅ | ❌ |
| Appears on block explorers by default | ✅ | ❌ |
| Transfers native value | ✅ | ✅ |
| Required for full wallet history | ✅ | ✅ |
***
## Streams support
Internal transactions are also available in **Streams**, enabling:
* Real-time detection of internal value transfers
* Monitoring protocol payouts and rewards
* Capturing native transfers triggered by contracts
See:
* [Streams Overview](/streams/overview)
* [Webhook Payload](/streams/webhooks/webhook-payloads)
***
## Summary
Internal transactions are essential for **accurate, production-grade blockchain data**.
Moralis provides:
* Full historical and real-time internal transactions
* Broad EVM chain coverage
* Simple access via existing and dedicated endpoints
If you care about **completeness**, internal transactions are not optional.
# NFT Metadata
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/nft-metadata
Fetch and normalize NFT metadata into a clean, predictable format across ERC721 and ERC1155 collections.
## Overview
NFT metadata is notoriously inconsistent.
Different collections use different schemas, naming conventions, attribute formats, and storage locations - making it difficult to work with at scale.
Moralis solves this by **normalizing NFT metadata into a clean, predictable structure**, while still allowing access to the original source data when needed.
Related pages:
* [NFT API Overview](/data-api/evm/nft/overview)
* [NFT Traits & Rarity](/data-api/data-features/data-enrichment/nft-rarity)
* [NFT Image Previews](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn)
* [Supported NFT Marketplaces](/data-api/data-features/integrations/nft-marketplaces)
***
## What is NFT metadata normalization?
When enabled, Moralis transforms raw NFT metadata into a **standardized JSON structure** that works consistently across:
* ERC721
* ERC1155
* OpenSea-style metadata
* Collection-specific formats (e.g. CryptoPunks, ENS)
This removes the need for custom parsing logic per collection.
### Why this matters
Without normalization:
* Attributes are inconsistently named
* Values change type across collections
* Metadata is often returned as a raw JSON string
* Frontends and analytics break easily
With normalization:
* Predictable fields
* Consistent attribute structure
* Easier UI rendering
* Easier indexing and analytics
***
## How to enable normalized metadata
Several NFT endpoints support metadata normalization via the `normalizeMetadata` query parameter.
When enabled:
* Raw metadata is preserved
* A new `normalized_metadata` object is added to the response
***
## Normalized metadata structure
The normalized metadata object provides a **stable schema** across collections.
### Core fields
```javascript theme={null}
{
"name": "Moralis Mug",
"description": "Moralis Coffee mug 3D asset",
"image": "https://...",
"external_link": "https://...",
"animation_url": "https://...",
"attributes": []
}
```
***
### Normalized attributes
Each attribute follows a consistent structure:
```javascript theme={null}
{
"trait_type": "Eye Color",
"value": "Hazel",
"display_type": "string",
"max_value": 100,
"trait_count": 7,
"order": 1
}
```
This makes it easy to:
* Render traits
* Sort attributes
* Calculate rarity
* Compare NFTs across collections
See also:
* [NFT Traits & Rarity](/data-api/data-features/data-enrichment/nft-rarity)
***
## Raw vs normalized metadata
Moralis always preserves the original metadata source.
### Normalized metadata
* Returned as structured JSON
* Easy to consume
* Consistent across collections
### Raw metadata
* Returned as a string
* Mirrors the original token URI response
* Useful for debugging or edge cases
Example (raw metadata string):
```text theme={null}
"{ \"name\": \"Dave Starbelly\", \"attributes\": [...] }"
```
***
## Collection-specific normalization
Moralis includes **custom normalization logic** for well-known collections and standards, including:
* CryptoPunks
* CryptoKitties
* ENS
* OpenSea-style metadata
If a collection does not match a known format:
* A default transformation is applied
* Based on ERC721 or ERC1155 conventions
* Most fields are still normalized successfully
This ensures broad compatibility without manual handling.
***
## Automatic metadata refresh
NFT metadata can change over time - especially when hosted on IPFS.
To keep data fresh, Moralis automatically refreshes metadata when NFTs are requested.
### How it works
* When an NFT is requested, it is queued for refresh
* If the metadata URI points to IPFS:
* The token is eligible for periodic refresh
* Refreshing happens transparently in the background
### Cool-off period
Metadata refresh is resource-intensive, so a cool-off period applies:
* **IPFS-based metadata:**\
Refresh allowed once every **10 minutes per token**
This balances freshness with performance.
***
## Collection offchain metadata
In addition to token-level metadata, Moralis also enriches NFT collections with **offchain metadata** sourced from trusted marketplaces such as **OpenSea**.
This includes collection-level information that is often **not available on-chain**, such as:
* Collection name
* Collection description
* Collection image and banner image
* External links (website, Twitter, Discord, etc.)
* Marketplace identifiers
This enrichment allows you to:
* Display richer collection pages
* Avoid making separate marketplace API calls
* Work with consistent collection metadata across chains
Collection offchain metadata is returned alongside on-chain data on supported NFT endpoints.
***
## Common use cases
* **NFT galleries**\
Render attributes consistently across collections
* **Marketplaces**\
Normalize metadata for search, filtering, and ranking
* **Analytics & rarity tools**\
Work with structured traits at scale
* **Wallet & portfolio views**\
Display NFTs reliably without custom parsing logic
***
## Supported chains
NFT metadata normalization is available on all supported **mainnet** networks only. Testnets are not supported.
***
## Summary
Moralis NFT Metadata normalization provides:
* Clean, predictable metadata
* Broad collection support
* Automatic refresh handling
* Reduced frontend and backend complexity
If you’re working with NFTs at scale, normalization isn’t optional — it’s foundational.
# NFT Image Previews (CDN)
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn
Generate and serve optimized NFT image previews via Moralis CDN for faster loading and better user experiences.
## Overview
Moralis provides optimized **NFT image previews** for both **EVM and Solana NFTs**, generated on demand and delivered via a global CDN.
Instead of loading large, slow, and inconsistent original NFT images directly from IPFS or third-party hosts, you can rely on Moralis to serve **low, medium, and high-resolution thumbnails** that are fast, cacheable, and reliable - ideal for wallets, marketplaces, dashboards, and feeds.
This removes the need to build and operate your own NFT media pipeline while significantly improving frontend performance and UX.
Related pages:
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata)
* [NFT API Overview](/data-api/evm/nft/overview)
***
## What are NFT image previews?
NFT image previews are **pre-generated thumbnails** of the original NFT media, optimized for common UI use cases such as:
* Wallet views
* Galleries
* Marketplaces
* Search results
* Collection pages
Moralis generates and caches these previews once, then serves them via CDN for subsequent requests.
***
## Supported image formats
Moralis currently supports common static image formats, including:
* JPG / JPEG
* PNG
* GIF
* TIFF
* WEBP
* SVG
### Not yet supported
* Video (planned)
***
## How to enable image previews
Image previews are returned when the `media_items` query parameter is set to `true`.
Once enabled, preview URLs are included directly in the API response.
***
## Does this cost extra?
No. Enabling `media_items=true` is **free** and does **not consume additional compute units (CUs)**.
***
## Preview generation lifecycle
Image previews are generated **on demand**.
### What happens on first request?
* If previews don’t yet exist:
* Generation starts automatically
* The original media URL is still returned
* Once generated:
* Previews are cached
* Subsequent requests return previews instantly
***
## Preview generation statuses
Each NFT media item includes a generation status:
| Status | Description |
| :------------------------ | :----------------------------------- |
| `success` | Preview generated and returned |
| `processing` | Preview is being generated |
| `unsupported_media` | Media type not supported |
| `invalid_url` | Metadata image URL is invalid |
| `retry` | Generation failed and will retry |
| `host_unavailable` | Media host is unavailable |
| `temporarily_unavailable` | Temporary failure (e.g. rate limits) |
Regardless of status, the API **always returns the original media URL** as a fallback.
***
## Retry behavior
If preview generation fails, Moralis automatically retries with **exponential backoff**.
* Up to **8 retry attempts**
* Increasing delay between attempts
### Retry schedule
| Attempt | Delay |
| :------ | :--------- |
| 1 | 1 minute |
| 2 | 5 minutes |
| 3 | 10 minutes |
| 4 | 15 minutes |
| 5 | 30 minutes |
| 6 | 40 minutes |
| 7 | 50 minutes |
| 8 | 60 minutes |
This ensures resilience against:
* Temporary host issues
* Rate-limited IPFS gateways
* Intermittent CDN failures
***
## Why this matters
Without image previews:
* Large images slow down UIs
* IPFS gateways can be unreliable
* Frontends must handle resizing and caching manually
With Moralis image previews:
* Faster load times
* Predictable image sizes
* CDN-backed delivery
* No custom infrastructure required
***
## Common use cases
* **Wallet dashboards**\
Fast-loading NFT grids
* **Marketplaces**\
Consistent thumbnails for listings
* **Search & discovery**\
Lightweight previews for large result sets
* **Mobile apps**\
Reduced bandwidth and faster rendering
***
## Supported chains
NFT image previews are supported across both major NFT ecosystems:
* **EVM chains**\
Ethereum, Polygon, Base, Arbitrum, Optimism, BNB Chain, and more
* **Solana**\
Including SPL NFTs and Metaplex-based collections
Image previews behave consistently across supported chains, with the same:
* Generation logic
* Retry behavior
* CDN delivery
* API response structure
***
## Summary
Moralis NFT Image Previews provide:
* On-demand thumbnail generation
* CDN-backed delivery
* Multi-resolution previews
* Zero additional CU cost
* Automatic retries and fallbacks
This allows you to ship fast, reliable NFT experiences without worrying about media hosting or processing.
# NFT Rarity
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/nft-rarity
Understand how Moralis calculates NFT rarity across collections using trait frequency analysis, rarity scores, rankings, and refreshable on-demand processing for ERC721 and ERC1155 NFTs.
## Overview
NFT rarity measures how **unique an NFT is within its collection**, based on how common or uncommon its attributes are compared to other NFTs in the same collection.
In most NFT collections, traits such as background, color, accessories, or attributes appear at different frequencies. NFTs with **less common trait combinations** are considered rarer and are often perceived as more valuable by collectors, marketplaces, and analytics platforms.
Moralis provides **deterministic, collection-wide rarity scores and rankings**, calculated directly from indexed NFT metadata.
Related pages:
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata)
* [NFT Image Previews (CDN)](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn)
* [NFT API Overview](/data-api/evm/nft/overview)
***
## How rarity is calculated
Moralis computes rarity **per collection**, not globally.
The rarity calculation process consists of two layers:
### 1. Trait-level analysis
For every trait across the collection, we compute:
* `count`\
Number of NFTs that contain this trait
* `percentage`\
Percentage of the collection that contains this trait
* `rarity_label`\
Human-readable label based on trait frequency\
*(e.g. “Top 1% trait”, “Top 10% trait”)*
This makes rarity explainable, not just numeric.
***
### 2. NFT-level rarity scoring
For each NFT, we compute:
* `rarity_score`\
Numerical score derived from the combined rarity of all its traits
* `rarity_rank`\
Rank of the NFT within the collection (1 = rarest)
* `rarity_percentage`\
Relative rarity compared to the entire collection
* `rarity_label`\
Human-readable summary (e.g. “Top 1% rarity”)
These fields are returned directly in supported NFT endpoints.
***
## Supported collections
Rarity calculations are supported for:
* **ERC-721 collections**
* **ERC-1155 collections**
With the following constraints:
* Maximum collection size: **50,000 NFTs**
* All NFTs must be discoverable and indexed
* Metadata and traits must be available for the full collection
If these conditions are not met, rarity will not be calculated.
***
## Supported chains
NFT rarity is supported on **all EVM chains** where Moralis NFT metadata is available, including:
* Ethereum
* Polygon
* Base
* Arbitrum
* Optimism
* BNB Chain
* Other supported EVM chains
Rarity logic is chain-agnostic and applied consistently.
***
## Trait syncing & rarity processing
Rarity is computed **on demand**, per collection.
### Initial sync flow
1. A collection is queried using `getNFTTraitsByCollection`
2. The collection is added to a processing queue
3. Traits are synced for all NFTs
4. Rarity scores and rankings are calculated
While processing is in progress, trait endpoints return:
```
202 – Contract is being resynced at the moment. Please try again later.
```
***
### Processing times
Typical processing times:
* Small collections: **5–15 seconds**
* Medium collections: **15–60 seconds**
* Large collections (20,000+ NFTs): may take longer
If processing exceeds **5 minutes**, contact support.
Once queued, a collection **cannot be reprocessed again for 30 minutes**.
***
## Refreshing rarity scores
Rarity scores **can be refreshed** after:
* NFT reveals
* New mints
* Metadata or trait updates
Refreshing rarity is triggered by re-syncing traits, which automatically recalculates all rarity data.
See:
* [Metadata Resyncing](/data-api/evm/nft/utilities/resync-nft-metadata)
* [Rarity Resyncing](/data-api/evm/nft/utilities/resync-nft-traits)
***
## Why rarity matters
NFT rarity enables:
* Collection ranking & discovery
* Trait-based filtering
* Floor price and valuation analysis
* Wallet and portfolio insights
* Marketplace and analytics UIs
Without indexing internal trait distributions, rarity cannot be computed accurately - which is why many platforms approximate or omit this entirely.
***
## Best practices
* Don’t assume rarity exists until processing completes
* Handle `202` responses gracefully
* Cache rarity results when possible
* Re-sync after major collection events (e.g. reveals)
***
## Summary
Moralis NFT Rarity provides:
* Deterministic rarity scores
* Trait-level transparency
* Collection-wide rankings
* Multichain support (EVM)
* Refreshable, on-demand computation
This allows you to build **analytics, discovery, and marketplace experiences** without maintaining your own rarity infrastructure.
# Profitability (PnL)
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/profitability-pnl
Analyze realized wallet and token profitability using Moralis PnL endpoints. Learn how realized PnL is calculated, supported swaps, pricing logic, chain coverage, and known limitations.
## Overview
Moralis provides **realized profit and loss (PnL)** analytics for wallets and tokens, calculated directly from **on-chain swap activity**.
PnL data is designed for:
* Wallet analytics
* Trading performance dashboards
* Portfolio tools
* Token-level profitability analysis
* Leaderboards and rankings
***
## Supported PnL endpoints
PnL data is exposed through the following endpoints:
* [Wallet PnL Summary](/data-api/evm/wallet/wallet-pnl-summary)\
High-level profitability metrics for a wallet
* [Wallet PnL Breakdown](/data-api/evm/wallet/wallet-pnl)\
Token-by-token profitability details
* [Top Traders by Token](/data-api/evm/token/signals/top-traders)\
Rankings of wallets by realized profit for a given token
***
## What type of PnL is supported?
Moralis currently supports **realized PnL only**.
* **Realized PnL** is calculated from completed on-chain swaps (buys and sells).
* **Unrealized PnL** (open positions based on current market prices) is **not calculated directly** by the PnL endpoints.
#### Calculating Unrealized PnL
You can calculate unrealized PnL yourself by combining:
* **Cost basis / realized trade data** from the [PnL endpoints](/data-api/evm/wallet/wallet-pnl)
* **Real-time token balances + real-time prices** from the [Token Balances](/data-api/evm/wallet/token-balances) endpoint
A common approach is:
```
(currentPrice − averageCost) × currentTokenBalance
```
This approach gives you full flexibility to build portfolio views that include:
* Realized PnL
* Unrealized PnL
* Total PnL (realized + unrealized)
***
## How PnL is calculated
Moralis uses a method closely aligned with a **weighted average cost basis**.
### Core formula
```
(avgSellPriceUsd − avgCostOfQuantitySold) × totalTokensSold
```
Where:
* **avgSellPriceUsd**\
Continuously updated average sell price in USD
* **avgCostOfQuantitySold**\
Calculated as:\
`totalUsdInvested / totalTokensBought`
This ensures profits are calculated based on **actual cost basis**, not FIFO or speculative pricing.
***
## How trades are matched
PnL is calculated **per trading pair**, not per token globally.
Examples:
* Buy `UNI` with `WETH` → tracked as `UNI/WETH`
* Sell `UNI` for `WETH` → updates the same trade
* Sell `UNI` for `PEPE` → tracked as a **new trade** (`UNI/PEPE`)
This avoids mixing unrelated price contexts.
***
## Token pricing & trade history
Moralis determines token prices by:
1. Indexing on-chain **DEX swap events**
2. Extracting price directly from swap logs
3. Converting swap prices to USD
4. Applying those prices to PnL calculations
No off-chain price feeds are used for PnL.
***
## Supported swap events
Currently supported swap topics:
* **Uniswap V2**
```
0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822
```
* **Uniswap V3**
```
0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67
```
Only swaps emitting these events are included in PnL.
***
## Transaction fees
**Gas fees and transaction fees are not included** in PnL calculations.
PnL strictly reflects **token-level trading performance**, not net wallet balance changes.
***
## Update latency
PnL data updates in **near real-time**.
* Average update time: **\~10 seconds**
* Triggered after swap settlement on-chain
This makes PnL suitable for:
* Live dashboards
* Trading analytics
* Near real-time alerts
***
## Token Support
### ERC20 Tokens
PnL is supported for **all ERC20 tokens** that:
* Have participated in a **supported DEX swap**
* Emit **supported swap events**
* Are **paired with either**:
* a **stablecoin** (e.g. USDC, USDT, DAI), or
* a **native or wrapped native token** (e.g. ETH, WETH)
This covers the vast majority of actively traded ERC20 tokens.
***
### Native Tokens (e.g. ETH)
* ***Native tokens are supported for PnL***, **but only when traded against stablecoins**.
* Trades between native tokens and stablecoins are used to establish realized PnL.
Examples:
* ✅ ETH ↔ USDC → ETH PnL supported
* ❌ ETH ↔ WETH → not tracked (native ↔ wrapped native)
Native tokens are treated similarly to ERC20s **only when a stablecoin price anchor exists**.
***
### Wrapped Native Tokens (e.g. WETH)
* **Wrapped native tokens are supported**, **but only when traded against stablecoins**.
* They are **not tracked when traded against native tokens or other wrapped natives**.
Examples:
* ✅ WETH ↔ USDC → WETH PnL supported
* ❌ WETH ↔ ETH → not tracked
* ❌ WETH ↔ WBTC → not tracked unless a stablecoin leg exists
***
### Stablecoins
* **Wallet PnL is not calculated for stablecoins themselves** (e.g. USDC, USDT, DAI).
* However, **ERC20, native, and wrapped native tokens that are paired with stablecoins are fully supported**.
Examples:
* ✅ UNI ↔ USDC → UNI PnL supported
* ✅ ETH ↔ USDT → ETH PnL supported
* ❌ USDC ↔ DAI → no wallet PnL (stablecoin-only trade)
Stablecoins act as **pricing anchors**, not PnL assets.
***
### Summary
| Asset | PnL tracked? | Conditions |
| :--------------------------------- | :----------- | :------------------------------------------ |
| ERC20 tokens | ✅ Yes | Paired with stable or native/wrapped native |
| Native tokens (ETH, etc.) | ✅ Yes | **Only when paired with stablecoins** |
| Wrapped native tokens (WETH, etc.) | ✅ Yes | **Only when paired with stablecoins** |
| Stablecoins | ❌ No | Used for pricing only |
| ERC20 ↔ Stablecoin | ✅ Yes | Fully supported |
| ERC20 ↔ WETH | ✅ Yes | Fully supported |
| ETH ↔ USDC | ✅ Yes | Supported |
| ETH ↔ WETH | ❌ No | Not supported |
***
## Supported chains
Profitability is currently live on:
* **Ethereum Mainnet**
* **Polygon Mainnet**
* **Base Mainnet**
More chains are planned.
***
## Known limitations
* Unrealized gains are not included
* Gas costs are excluded
* Only supported DEX events are tracked
* PnL is per trading pair, not global per token
These trade-offs are intentional to ensure **accuracy and determinism**.
***
## Summary
Moralis Profitability (PnL) provides:
* Realized, on-chain PnL
* Weighted average cost basis
* Near real-time updates
* Token- and wallet-level views
* Deterministic, explainable calculations
It’s built for **analytics accuracy**, not speculative valuation.
# Solana Token Standards
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/solana-token-standards
Understand the Solana token standards supported by Moralis, including the SPL Token Program and Metaplex metadata standard.
Solana uses a different token model than EVM chains. Instead of each token deploying its own smart contract, all tokens are managed by shared **token programs**. Moralis supports the major Solana token standards and enriches API responses with decoded metadata.
***
## Token Programs
### SPL Token Program
The original **SPL Token Program** is the standard for fungible and non-fungible tokens on Solana. Most tokens on Solana — including SOL-wrapped tokens, stablecoins, and meme coins — use this program.
Key characteristics:
* Tokens are identified by their **mint address**
* Each holder has an **associated token account** (ATA) linked to their wallet
* Token metadata (name, symbol, logo) is stored offchain via the **Metaplex** standard
## Metaplex Metadata Standard
Most Solana tokens and NFTs use the **Metaplex** metadata standard to store human-readable information (name, symbol, image, attributes) offchain. The `standard` field in Moralis API responses indicates when a token follows this standard.
When Moralis returns `"standard": "metaplex"`, the response includes a `metaplex` object:
```json theme={null}
{
"mint": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
"standard": "metaplex",
"name": "Fartcoin",
"symbol": "Fartcoin",
"metaplex": {
"metadataUri": "https://ipfs.io/ipfs/QmYfe8zVGHA1heej47AkBX3Nnetg2h2kqj5yymz1xyKeHb",
"masterEdition": false,
"isMutable": false,
"sellerFeeBasisPoints": 0,
"updateAuthority": "TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM",
"primarySaleHappened": 0
}
}
```
### Metaplex fields explained
| Field | Description |
| ---------------------- | -------------------------------------------------------------- |
| `metadataUri` | URI pointing to the full metadata JSON (often IPFS or Arweave) |
| `updateAuthority` | The address that can modify the token's metadata |
| `sellerFeeBasisPoints` | Creator royalty on secondary sales (100 = 1%) |
| `primarySaleHappened` | Whether the initial sale has occurred |
| `isMutable` | Whether the metadata can still be updated |
| `masterEdition` | Whether this is a master edition NFT |
***
## NFTs on Solana
Unlike EVM chains where NFTs are grouped under a single contract, each Solana NFT is represented by a **unique mint address**. Moralis returns rich NFT metadata including:
* **Collection data** — `collectionAddress`, collection name, description, and verification status
* **Attributes** — Trait types and values (e.g., `"traitType": "Gender", "value": "Male"`)
* **Creator information** — Addresses, share percentages, and verification status
* **Media previews** — Low, medium, and high resolution image URLs via Moralis CDN
Example NFT metadata:
```json theme={null}
{
"address": "FVzM6rUA1SigPxh6e3iQ8dAPjQNf2guap3Xcdj8Q6R2H",
"standard": "metaplex",
"name": "Mad Lads #7256",
"symbol": "MAD",
"metaplex": {
"metadataUri": "https://madlads.s3.us-west-2.amazonaws.com/json/7256.json",
"updateAuthority": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"sellerFeeBasisPoints": 420,
"primarySaleHappened": 1,
"isMutable": true,
"masterEdition": false
},
"collection": {
"collectionAddress": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
"name": "Mad Lads",
"description": "Fock it.",
"metaplexMint": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
"sellerFeeBasisPoints": 500
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
]
}
```
Some NFTs may lack a `collectionAddress` or other metadata fields. You can identify Metaplex-standard NFTs by the presence of a `metaplexMint` value.
***
## How Moralis Uses These Standards
Moralis automatically detects the token standard and enriches responses accordingly:
* **Fungible tokens** — Returns mint address, name, symbol, decimals, supply, logo, and market data (price, FDV)
* **NFTs** — Returns full Metaplex metadata, collection info, creator details, attributes, and media previews
* **Token balances** — Includes associated token account addresses and formatted amounts
The `standard` field in API responses tells you which metadata standard a token uses (currently `"metaplex"` for most Solana tokens).
***
## Related Pages
* [Token Metadata](/data-api/data-features/data-enrichment/token-metadata) — EVM token metadata enrichment
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata) — NFT metadata across chains
# Token Metadata
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/token-metadata
Understand how Moralis combines onchain and offchain token metadata - names, supply, logos, categories, links, safety signals, and cross-chain implementations into a single developer-friendly response.
Moralis token metadata combines **onchain facts** (what the contract reports) with **offchain enrichment** (logos, categories, descriptions, links, verification, and market fields) to give you a clean, consistent token object across chains.
This page explains what data comes from where, how to interpret key fields, and how to use related data features like token scores and spam filtering.
Related pages:
* [Token API Overview](/data-api/evm/token/overview)
* [Token Scores](/data-api/data-features/token-scores)
* [Verified Contracts](/data-api/data-features/safety-and-trust/verified-contracts)
* [Spam Filtering](/data-api/resources/spam-filtering)
* [Token Search](/data-api/data-features/search-and-discovery/token-search)
***
## Onchain vs Offchain metadata
### Onchain metadata (from the token contract)
These values are sourced directly from chain data and are generally deterministic:
* `address`
* `name`
* `symbol`
* `decimals`
* `total_supply`
* `block_number` (block created)
* `created_at` (when Moralis first observed/indexed the contract)
***
### Offchain metadata (curated/enriched)
These values are enriched using trusted external sources and Moralis internal systems:
* `logo`
* `description`
* `categories`
* `links` (website, twitter, telegram, etc.)
* `security_score`
* `possible_spam`
* `verified_contract`
* `circulating_supply` (sourced from CoinGecko where available)
* `market_cap`, `fully_diluted_valuation`
* `address_label` (human-readable label)
Offchain enrichment improves UX and trust signals, and is especially useful for:
* Wallet UIs
* Token discovery experiences
* Safety filtering
* Market analytics
See:
* [Token Scores](/data-api/data-features/token-scores)
* [Spam Filtering](/data-api/resources/spam-filtering)
* [Verified Contracts](/data-api/data-features/safety-and-trust/verified-contracts)
***
## Example response
```
[
{
"address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
"address_label": "Pepe (PEPE)",
"name": "Pepe",
"symbol": "PEPE",
"decimals": "18",
"logo": "https://logo.moralis.io/0x1_0x6982508145454ce325ddbe47a25d4ec3d2311933_5c5ee6fce6d19f71c224cba025989229.jpeg",
"total_supply": "420689899653542539491331875576506",
"total_supply_formatted": "420689899653542.539491331875576506",
"fully_diluted_valuation": "2095999648.29",
"block_number": "17046105",
"validated": 1,
"created_at": "2023-04-14T14:51:35.000Z",
"possible_spam": false,
"verified_contract": true,
"categories": ["Meme"],
"links": {
"reddit": "https://www.reddit.com",
"telegram": "https://t.me/pepecoineth",
"twitter": "https://twitter.com/pepecoineth",
"website": "https://www.pepe.vip/"
},
"security_score": 96,
"description": "Pepe ($PEPE) is a meme coin aiming to bring back the glory days of memecoins...",
"circulating_supply": "420690000000000",
"market_cap": "2096000148.24",
"implementations": [
{
"chainId": "0xa86a",
"chain": "avalanche",
"chainName": "Avalanche",
"address": "0xa659d083b677d6bffe1cb704e1473b896727be6d"
},
{
"chainId": "0x38",
"chain": "bsc",
"chainName": "BNB Smart Chain",
"address": "0x25d887ce7a35172c62febfd67a1856f20faebb00"
},
{
"chainId": "0xa4b1",
"chain": "arbitrum",
"chainName": "Arbitrum One",
"address": "0x25d887ce7a35172c62febfd67a1856f20faebb00"
}
]
}
]
```
***
## Key fields explained
### Identity
* `address_label`: Human-readable label (useful for UI)
* `name`, `symbol`, `decimals`: Standard ERC-20 fields
* `logo`: Offchain logo URL (may be missing for new/unknown tokens)
Related:
* [Token Search](/data-api/data-features/search-and-discovery/token-search)
***
### Supply & valuation
* `total_supply`/ `total_supply_formatted`: Onchain total supply
* `circulating_supply`: Offchain circulating supply (CoinGecko where available)
* `market_cap`: Typically `price × circulating_supply`
* `fully_diluted_valuation`**(FDV)** : Typically `price × total_supply`
#### Circulating supply fallback
If `circulating_supply` is not available, Moralis falls back to `total_supply`.\
In that case, **market cap effectively becomes FDV**.
This is important when building:
* token rankings
* market cap charts
* “top tokens” discovery feeds
Related:
* [Token Prices](/data-api/data-features/data-enrichment/token-prices)
***
### Safety & trust signals
* `possible_spam`: Flag for suspicious/spam tokens
* `verified_contract`: Verified by CoinGecko (not Etherscan)
* `security_score`: Moralis safety score (0-100)
Related:
* [Spam Filtering](/data-api/resources/spam-filtering)
* [Verified Contracts](/data-api/data-features/safety-and-trust/verified-contracts)
* [Token Scores](/data-api/data-features/token-scores)
***
### Classification & links
* `categories`: Token categories (e.g. Meme, DeFi)
* `links`: Offchain links (twitter, website, telegram, etc.)
* `description`: Offchain token description
***
### Cross-chain implementations
* `implementations` lists known linked deployments of the “same” token across multiple chains (e.g. bridged or multi-chain versions).
This enables:
* consistent UI labels/logos across chains
* unified token discovery experiences
* cross-chain token analytics
***
## Summary
Moralis Token Metadata provides a unified token object that combines:
* **Onchain** ERC-20 data (name, symbol, decimals, supply)
* **Offchain** enrichment (logos, links, categories, descriptions)
* **Trust signals** (spam flags, verification, security score)
* **Market fields** (circulating supply, market cap, FDV)
* **Cross-chain implementations** for linked tokens
# Token Prices
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/token-prices
Learn how Moralis token prices are derived from onchain DEX activity, including pool selection, pair-based pricing, liquidity filtering, inactivity rules, and mainnet-only behavior.
## Token Prices
Moralis token prices are derived directly from **onchain DEX activity**, not from aggregated offchain price feeds.
Prices are based on real swaps, making them:
* Trust-minimized (no centralized oracle dependency)
* Chain-specific
* Deterministic and reproducible
Prices can be fetched:
* **By token address** (Moralis selects the best pool automatically), or
* **Directly by pair address**, when you want full control over which pool is used
Related concepts:
* [Supported DEXes](/data-api/data-features/integrations/supported-dexs)
* [Liquidity Filtering](/data-api/data-features/safety-and-trust/liquidity-filtering)
***
## How Token Prices Work
Moralis calculates token prices using the **last traded price** observed on supported decentralized exchanges.
Key characteristics:
* Prices come from real onchain swap events
* No volume-weighted averaging across exchanges
* Prices are returned in USD
* Pricing can be **pool-selected automatically** or **explicitly defined by pair**
This makes token prices safe to use in downstream features such as [Token Balances](/data-api/evm/wallet/token-balances), [Wallet Net Worth](/data-api/evm/wallet/net-worth), [PnL](/data-api/evm/wallet/wallet-pnl) and many more.
***
## Fetching Prices by Token vs Pair
Moralis supports two pricing models:
### Token-Based Pricing (Default)
When querying by token address:
* Moralis automatically selects the most appropriate pool
* Pool selection follows liquidity and activity rules
* Best suited for portfolio, net worth, and analytics use cases
This is the recommended approach for most applications.
Related pages:
* [Token price by token address](/data-api/evm/token/prices/token-price)
* [Token price by pair address](/data-api/evm/token/swaps/pair-stats)
***
### Pair-Based Pricing (Explicit Pool)
You can also fetch prices **directly by pair address**.
When querying by pair:
* The specified pool is always used
* No pool ranking or substitution occurs
* The price reflects swaps in that exact pair
This is useful when:
* You need deterministic pricing from a known pool
* You want to inspect or monitor a specific market
* You are building trading, monitoring, or analytics tools around a single pair
Liquidity and inactivity checks still apply to ensure price safety.
***
## Supported Pair Types
Moralis supports **all DEX pair types**, including:
* **Stablecoin pairs** (e.g. USDC / USDT / DAI)
* **Wrapped native token pairs** (e.g. WETH, WBNB, SOL)
* **Token / Token pairs** (e.g. REPPO / VIRTUAL)
This applies to both **token-based** and **pair-based** price queries, as long as sufficient onchain liquidity exists.
***
## Mainnet-Only Support
Token prices are **mainnet-only**.
Why:
* Prices depend on active onchain DEX liquidity
* Testnets generally lack sustained or meaningful trading activity
Any feature that depends on token prices is therefore also mainnet-only, including:
* Token price
* Wallet net worth
* Portfolio percentages
* PnL calculations
***
## What “Price” Means
A token’s price represents:
* The most recent swap price
* Extracted from the DEX swap log
* Converted to USD
For Token / Token pairs, the price is resolved from the selected pair and converted to USD using the best available onchain reference.
When querying by pair address, this conversion is based strictly on that pool’s swap activity.
***
### Multiple Swaps in the Same Block
If multiple swaps occur within a single block:
* The **final swap price in that block** is used
* Intra-block price movements are not tracked
This keeps pricing deterministic and avoids block-level noise.
***
## Pool Selection Logic (Token-Based Pricing)
When querying prices by token address:
### Real-Time Prices
1. Pools that fail [liquidity filtering](/data-api/data-features/safety-and-trust/liquidity-filtering) are excluded
2. Remaining pools are ranked by swap activity over the last 24 hours
3. The most active pool is selected
### Historical Prices
1. The top two pools by lifetime usage are selected
2. The most recent record from each pool is compared
3. The pool with higher liquidity is chosen
Pair-based queries bypass this logic and always use the specified pool.
***
## Liquidity Thresholds
Moralis enforces minimum liquidity requirements per chain.
Default thresholds:
* **EVM chains:** \$50 minimum liquidity per side (each token in the pair)
* **Solana:** no enforced liquidity threshold
This threshold applies at the pool level and is evaluated for both assets in the pair. The pool is considered eligible only if **both sides** meet the minimum threshold.
Read more about [Liquidity Thresholds](/data-api/data-features/safety-and-trust/liquidity-filtering).
***
## Inactivity Handling
Tokens or pairs with no recent trading activity can be excluded.
Use the `max_token_inactivity` query parameter to filter out inactive markets.
This applies to:
* Token-based pricing
* Pair-based pricing
* Token balances
***
## Common Error Scenarios
You may encounter the following:
* **No liquidity pool found**\
No qualifying pool exists for the token or pair
* **Insufficient liquidity**\
Pool fails liquidity filtering
* **Inactive market**\
Token or pair fails inactivity filtering
* **Testnet request**\
Token prices are not supported on testnets
***
## When to Use Token Prices (and When Not To)
Token prices are well-suited for:
* Wallet net worth calculations
* Portfolio tracking
* PnL and trading analytics
* Token discovery and filtering
Pair-based pricing is best suited for:
* Market monitoring
* Trading analytics
* Pool-specific dashboards
They are not intended to replace:
* High-frequency trading price feeds
* Offchain oracle systems
* Tick-level or order-book pricing data
# Transaction Decoding
Source: https://docs.moralis.com/data-api/data-features/data-enrichment/transaction-decoding
Moralis enriches raw blockchain transactions with human-readable meaning, making it easier to understand what actually happened onchain.
Instead of working with low-level logs and method calls, you get **decoded actions, labels, and categories** that describe wallet activity in a clear, consistent way.
***
## What This Includes
Transaction decoding and enrichment combines two core capabilities:
* **Wallet activity categorisation** (what type of action occurred)
* **ABI-based decoding and labelling** (what the transaction did at a contract level)
Together, these form Moralis’ **semantic transaction layer**.
***
## Wallet Activity Decoding
Moralis can return a **single, chronological view of a wallet’s onchain activity**, covering all major transaction types.
This includes:
* Native transfers
* ERC20 swaps and token transfers
* NFT transfers and sales
* DeFi interactions
* Smart contract interactions
All activity is normalized into a consistent timeline, removing the need to aggregate multiple endpoints or data sources.
### Key Benefits
* **Single API request**\
Fetch a complete wallet history in one call.
* **Automatic categorisation**\
Each transaction is classified into a clear, human-readable category.
* **Reduced complexity**\
No need to manually decode logs, traces, or contract calls.
* **Consistent ordering**\
Transactions are returned in a clean, chronological format.
***
## Transaction Categories
Each transaction is assigned a category based on its onchain behavior.
Currently supported categories include:
* Send
* Receive
* Token Send
* Token Receive
* NFT Send
* NFT Receive
* Deposit
* Withdraw
* Token Swap
* Airdrop
* Mint
* Burn
* NFT Purchase
* NFT Sale
* Borrow
* Approve
* Revoke
* Contract Interaction
Category support is continuously expanding as new transaction patterns and protocols are added.
***
## ABI Decoding & Transaction Labelling
Beyond high-level categories, Moralis also decodes transactions at the **contract interaction level**.
Using verified ABIs and internal decoding logic, Moralis:
* Decodes method calls
* Interprets parameters
* Assigns meaningful **labels** to transactions
This allows you to distinguish between different contract interactions even when they fall under the same high-level category.
***
## Why This Matters
Transaction decoding and enrichment enables you to:
* Build readable wallet activity feeds
* Show users *what they actually did* onchain
* Power analytics, notifications, and alerts
* Avoid custom ABI decoding and protocol-specific logic
* Deliver consistent UX across chains and protocols
This is especially valuable for:
* Wallets and portfolio trackers
* Analytics dashboards
* Tax and accounting tools
* Compliance and monitoring systems
***
## Important Notes
* Decoding and categorisation are **best-effort** and based on available onchain data and ABIs
* Unknown or unverified contracts may fall back to generic labels (e.g. `Contract Interaction`)
* New transactions occurring during pagination will not affect already-decoded results (see Pagination)
# Data Features Overview
Source: https://docs.moralis.com/data-api/data-features/data-features-overview
An overview of Moralis Data Features, including enrichment, safety signals, discovery tools, and protocol coverage that turn raw blockchain data into usable insights.
Moralis transforms raw blockchain data into **structured, enriched, and trustworthy insights** that are easy to build on.
Instead of dealing with low-level transactions, logs, and metadata inconsistencies, you get **interpreted data** - with context, labels, scores, and normalization applied consistently across chains and APIs.
These features fall into four broad areas:
Logic and normalization that add **meaning and context** to onchain data.
Signals that help identify legitimate assets and reduce exposure to scams.
Tools that help users **find relevant tokens and assets** across chains.
Understand how Moralis **decodes and normalizes** token and NFT prices.
Clear visibility into **what Moralis supports** across chains and protocols.
# DeFi Protocols
Source: https://docs.moralis.com/data-api/data-features/integrations/defi-protocols
A list of DeFi protocols supported by Moralis, including how protocol coverage works, what data is enriched, and how support expands over time.
## Supported Blockchains
DeFi protocol support is available across the following blockchain networks:
* Arbitrum
* Avalance
* Base
* Binance
* Ethereum
* Linea
* Monad
* Optimism
* Polygon
* Sei
**Important:** DeFi protocol support is **not uniform across all chains**. The level of support depends on protocol availability, adoption, and chain-specific deployments.
Refer to the table below for a detailed breakdown of **which protocols are supported on each chain**.
## Supported Protocols
By default, we track all forked Uniswap v2 protocols. If a particular protocol has not yet been decoded, it will appear as `unknown` within the API responses. Please reach out to our support team, and we will prioritize decoding these protocols.
| Protocol | Query Parameter | Supported Chains |
| -------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| Aave v2 | `aave-v2` | - Ethereum - Polygon |
| Aave v3 | `aave-v3` | - Base - Ethereum - Polygon |
| Dragonswap v2 | `dragonswap-v2` | - Sei |
| Dragonswap v3 | `dragonswap-v3` | - Sei |
| Eigenlayer | `eigenlayer` | - Ethereum |
| Etherfi\* | `etherfi` | - Ethereum - Arbitrum - Base - Binance - Linea - Optimism |
| FraxSwap v1 | `fraxswap-v1` | - Binance - Ethereum - Polygon |
| Kintsu | `kintsu` | - Monad |
| FraxSwap v2 | `fraxswap-v2` | - Binance - Ethereum - Polygon |
| Lido | `lido` | - Ethereum |
| MakerDAO | `makerdao` | - Ethereum |
| Neverland | `neverland` | - Monad |
| OKU Trade | `okutrade` | - Sei |
| Pancakeswap v2 | `pancakeswap-v2` | - Arbitrum - Base - Binance - Ethereum - Linea - Monad |
| Pancakeswap v3 | `pancakeswap-v3` | - Arbitrum - Base - Binance - Ethereum - Linea - Monad |
| Pendle | `pendle` | - Ethereum |
| QuickSwap v2 | `quickswap-v2` | - Polygon |
| QuickSwap v3 | `quickswap-v3` | - Polygon |
| Rocket Pool | `rocketpool` | - Ethereum - Arbitrum - Base - Polygon - Optimism |
| Sailor Swap | `sailorswap` | - Sei |
| Spark | `sparkfi` | - Ethereum |
| SushiSwap v2 | `sushiswap-v2` | - Base - Binance - Ethereum - Polygon |
| Takara Lend | `takara-lend` | - Sei |
| Uniswap v2\*\* | `uniswap-v2` | - Arbitrum - Base - Binance - Ethereum - Linea - Monad - Polygon |
| Uniswap v3 | `uniswap-v3` | - Arbitrum - Avalanche - Base - Binance - Ethereum - Monad - Optimism - Polygon |
| Yei Finance | `yei-finance` | - Sei |
*\*Etherfi currently only supports Staking positions. Yield positions are not yet supported.*
Many more protocols are on the way as we prioritize the top protocols and chains based on Total Value Locked (TVL).
# NFT Marketplaces
Source: https://docs.moralis.com/data-api/data-features/integrations/nft-marketplaces
See which NFT marketplaces Moralis supports across chains, powering NFT trades, sale prices, and marketplace analytics.
## Supported NFT Marketplaces
Moralis indexes onchain NFT trades from a growing set of **NFT marketplaces** across multiple chains. This coverage powers features such as:
* NFT trades
* NFT sale prices
* Collection and token-level trading analytics
* Wallet NFT activity
This page lists **marketplace coverage only**. Endpoint behavior and response structure are documented on the relevant NFT feature pages.
***
## Marketplace Support by Chain
### OpenSea
Supported chains:
* Ethereum
* Polygon
* Binance
* Arbitrum
* Avalanche
* Optimism
* Base
* Monad
OpenSea is the primary source of NFT trade activity across multiple EVM chains and provides broad, high-liquidity marketplace coverage.
***
### Blur
Supported chains:
* Ethereum
Blur trades are included for high-frequency and professional NFT trading activity on Ethereum.
***
### LooksRare
Supported chains:
* Ethereum
LooksRare trades are indexed for Ethereum-based NFT collections.
***
### X2Y2
Supported chains:
* Ethereum
X2Y2 marketplace trades are supported for Ethereum NFTs.
***
### 0x Protocol
Supported chains:
* Ethereum
0x Protocol trades are indexed where NFTs are bought and sold through the protocol's onchain execution layer.
***
## Notes and Expectations
* Marketplace coverage is **chain-specific**.
* Only **executed marketplace trades** are indexed - listings alone are not considered trades.
* NFT transfers that are not marketplace sales (e.g. gifts or direct transfers) are excluded.
* New marketplaces and chains are added continuously based on:
* Trading volume
* Ecosystem relevance
* Customer demand
# Supported DEXes
Source: https://docs.moralis.com/data-api/data-features/integrations/supported-dexs
See which decentralized exchanges (DEXes) Moralis indexes per chain across EVM and Solana, powering token pairs, swaps, pricing, and related DEX-derived features.
## Supported DEXes
Moralis indexes onchain liquidity and swaps from a curated set of decentralized exchanges (DEXes) across **EVM chains and Solana**. This coverage powers token pairs, swaps, token prices, OHLC, and other DEX-derived features.
If you don’t specify a DEX, Moralis automatically searches across supported DEXes on the target chain and selects eligible markets using safety rules such as [Liquidity Filtering](/data-api/data-features/safety-and-trust/liquidity-filtering).
Related pages:
* [Token Prices](/data-api/data-features/data-enrichment/token-prices)
* [Liquidity Filtering](/data-api/data-features/safety-and-trust/liquidity-filtering)
***
## EVM DEX support by chain
### Ethereum (0x1)
* Uniswap v4
* Uniswap v3
* Uniswap v2
* Sushiswap v2
* Fraxswap (v2)
### Polygon (0x89)
* Uniswap v4
* Quickswap v2
* Uniswap v3
* Uniswap v2
* MM Finance
### Binance Smart Chain / BSC (0x38)
* Uniswap v4
* PancakeSwap v3
* PancakeSwap v2
* PancakeSwap v1
* Uniswap v3
* Uniswap v2
### Avalanche (0xa86a)
* Uniswap v4
* Trader Joe
* Pangolin
### Fantom (0xfa)
* SpookySwap
* Uniswap v3
### Cronos (0x19)
* VVS Finance
* MM Finance
* Crodex
### Arbitrum (0xa4b1)
* Uniswap v4
* Uniswap v3
* Camelot v2
* Sparta Dex
### Optimism (0x64)
* Uniswap v4
* Sushiswap v2
* Uniswap v2
### Base (0x2105)
* Uniswap v4
* Uniswap v3
* Uniswap v2
* Sushiswap v2
* Sushiswap v3
* PancakeSwap v2
* PancakeSwap v3
* Aerodrome
* BaseSwap
* Sharkswap
### Linea (0xe708)
* PancakeSwap v3
* Nile
### Moonbeam (0x504)
* Beamswap v3
* StellaSwap
### Ronin (0x7e4)
* Katana
### PulseChain (0x171)
* PulseX
* 9inch
### Monad (0x8f)
* Uniswap v4
* Uniswap v3
* Uniswap v2
* PancakeSwap v3
* PancakeSwap v2
***
## Solana DEX support
Moralis indexes multiple DEX programs on Solana to support token pairs, swaps, pricing, and other DEX-derived features.
### Solana
* **Raydium v4**\
Program: `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8`
* **Raydium CLMM (concentrated liquidity)**\
Program: `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK`
* **Raydium CPMM (constant product)**\
Program: `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C`
* **Meteora Dynamic AMM**\
Program: `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB`
* **Meteora Dynamic AMM v2**\
Program: `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG`
* **Meteora DLMM (dynamic liquidity)**\
Program: `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo`
* **Meteora Dynamic Bonding Curve (DBC)**\
Program: `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN`
* **Orca / Whirlpool**\
Program: `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc`
* **PumpFun**\
Program: `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P`
* **PumpSwap**\
Program: `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA`
* **LaunchLab**\
Program: `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj`
***
## Notes and expectations
* DEX coverage is chain-specific: a DEX brand may not exist (or be indexed) on every chain.
* Inclusion does not guarantee every pool is eligible - [Liquidity Filtering](/data-api/data-features/safety-and-trust/liquidity-filtering) still applies.
* This page is intentionally coverage-only. Endpoint-specific behavior belongs on the relevant feature pages.
# NFT Floor Prices
Source: https://docs.moralis.com/data-api/data-features/prices/floor-prices
Learn how Moralis provides NFT floor prices, including what a floor price represents, supported chains, data sources, refresh cadence, inactivity rules, and historical availability.
NFT Floor Prices provide a **collection-level snapshot** of the lowest-priced NFT currently listed for sale. This gives a fast, comparable baseline for what it would cost to acquire the cheapest item in a collection *right now*.
Floor prices are best suited for:
* Market overviews and dashboards
* Collection comparisons
* Entry-price signals and alerts
They are intentionally different from [NFT Sale Prices](/data-api/data-features/prices/sale-prices), which are based on completed onchain trades.
***
## What a Floor Price Represents
The floor price is the **lowest active listing price** for an NFT in a given collection.
Important characteristics:
* Based on **active listings**, not completed sales
* Represents seller intent, not executed market price
* Calculated at the **collection level**, not per token
Because listings can be added or removed at any time, floor prices are inherently volatile and should be treated as **indicative**, not authoritative trade prices.
***
## Supported Chains
NFT floor prices are currently supported on:
* Ethereum
* Base
* Monad
* Arbitrum
* Ronin
* Flow
* Sei
Coverage may expand over time. For trade-based pricing with broader chain support, see NFT Sale Prices.
***
## Data Sources
Floor prices are sourced from a combination of marketplace and aggregation APIs:
* **OpenSea API** (primary source)
* **Magic Eden API**\
Magic Eden aggregates floor prices across multiple marketplaces, including OpenSea, Blur, X2Y2, and Magic Eden itself
* **CoinGecko** (fallback / enrichment)
These sources provide listing-level market data that cannot be derived purely from onchain events.
Important distinction:
* **NFT Sale Prices** → derived from onchain marketplace trades
* **NFT Floor Prices** → derived from offchain marketplace listing data
Related pages:
* [NFT Marketplaces](/data-api/data-features/integrations/nft-marketplaces)
* [NFT Sale Prices](/data-api/data-features/prices/sale-prices)
***
## Refresh Frequency
Floor prices are refreshed **every 60 minutes**.
This cadence balances:
* Marketplace rate limits
* Data freshness
* Platform-wide performance and stability
Floor prices are not real-time and should not be treated as tick-level market data.
***
## First-Time Requests (Warm-Up Behavior)
If a collection’s floor price has **never been requested before**, the first request will return:
* HTTP status: **202**
* Message:
```javascript theme={null}
{
"message": "This contract is currently being processed. Floor price data will be available shortly. Please try again later."
}
```
During this warm-up period:
* The collection is registered for tracking
* Floor price data begins syncing
Once processing completes, subsequent requests return floor price data normally.
***
## Inactivity Handling
If a collection has **no trading activity for 7 days**:
* Floor price updates are paused
* No new floor price snapshots are recorded
Once trading activity resumes:
* Floor price updates automatically resume
* No manual action is required
This prevents stale or misleading prices from being continuously refreshed for inactive markets.
***
## Historical Floor Price Data
### Backfilling
Historical floor prices are **not backfilled**.
Reason:
* Marketplace APIs do not currently expose historical listing data
* Historical tracking can only begin after the first request
Moralis starts saving floor prices in **60-minute intervals** from the moment a collection is first requested.
***
### Supported Historical Intervals
When requesting time-series floor price data, the interval determines the data resolution:
* **1 day**\
Data points every 60 minutes
* **7 days**\
Hourly data points
* **30 days**\
Hourly data points
* **Greater than 30 days**\
Daily data points
This adaptive resolution keeps queries efficient while preserving meaningful trends.
***
## Inactive Collections and Historical Access
If a collection becomes inactive:
* Floor prices stop updating
* **Previously saved historical data remains accessible**
This allows you to:
* Analyze past market conditions
* Build long-term charts
* Compare historical floors even for dormant collections
***
## When to Use Floor Prices (and When Not To)
Use NFT Floor Prices when you need:
* A quick market baseline
* Collection-to-collection comparisons
* Entry price signals
Do not rely on floor prices for:
* Valuation of a specific NFT
* Profitability or realized value calculations
* Historical execution accuracy
For executed market prices and provenance, use [NFT Sale Prices](/data-api/data-features/prices/sale-prices).
# NFT Sale Prices
Source: https://docs.moralis.com/data-api/data-features/prices/sale-prices
Understand how Moralis computes NFT sale prices from onchain marketplace trades, including last/lowest/highest/average sale, lookback windows, marketplace + chain coverage, and enriched trade metadata.
Moralis NFT Sale Prices summarize **real onchain sale and trade activity** for NFTs and collections, based on buys/sells from supported NFT marketplaces.
This feature is built on top of Moralis **NFT Trades** data and is designed for production use cases like:
* Sale price tracking and alerts
* Wallet and token-level trade analysis
* Portfolio valuation and historical provenance
***
## What “Sale Price” Means
A sale is recorded when an NFT is bought/sold on a supported marketplace. Moralis extracts and normalizes:
* The **payment token** used (native or ERC20)
* The **raw price** paid (base units) and **formatted price**
* The **USD price at time of sale**
* The **current USD value** using today’s token price
Important: these are **marketplace sales**, not arbitrary transfers. Simple NFT transfers (gift/send) are not considered sales.
***
## What You Get Back
Sale price summaries typically include:
### Last sale
The most recent recorded sale within the available trade history, including:
* `transaction_hash`
* `block_timestamp`
* `buyer_address` / `seller_address`
* `token_id`
* `price` (raw base units)
* `price_formatted` (decimal-adjusted)
* `usd_price_at_sale`
* `current_usd_value`
* `payment_token` metadata (name, symbol, decimals, address, logo)
### Lowest sale (within a lookback window)
The lowest recorded sale price within the specified lookback period (see “Lookback window” below).
### Highest sale
The highest recorded sale price (typically within the same scope as the response; depends on endpoint).
### Average sale
An average price across trades included in the response scope:
* `price` / `price_formatted`
* `current_usd_value`
### Total trades
A count of sales/trades included for that scope:
* `total_trades`
Notes on price fields:
* `price` is the raw integer amount in the payment token’s base units.
* `price_formatted` is the human-readable value using `token_decimals`.
* `usd_price_at_sale` is the USD valuation at the time the sale happened.
* `current_usd_value` is recalculated using the current price of the payment token (useful for mark-to-market comparisons).
***
## Lookback Window (`days`)
Some sale price summaries (notably **lowest sale**) support an optional `days` query parameter:
* Default: **7 days**
* Maximum: **365 days**
If you set `days=30`, “lowest sale” will be the lowest sale price found in the last 30 days. If you omit it, the system uses 7 days.
Practical guidance:
* Use smaller windows (7–30) for “recent floor” style features.
* Use larger windows (90–365) for long-term volatility and range analysis.
***
## Marketplace Coverage
Sale prices are derived from trades on supported marketplaces. Current coverage includes:
* OpenSea
* Blur
* LooksRare
* X2Y2
* 0xProtocol
Coverage can vary by chain and marketplace. For the authoritative matrix, use the [Marketplaces](/data-api/data-features/integrations/nft-marketplaces) page.
Related pages:
* [NFT Marketplaces](/data-api/data-features/integrations/nft-marketplaces)
***
## Chain Coverage
NFT Trades (and therefore NFT Sale Prices) are available on:
* Ethereum
* Polygon
* Binance
* Arbitrum
* Avalanche
* Optimism
* Base
* Monad
***
## Enriched Trade Metadata
All NFT Trade endpoints (including those powering sale price summaries) can include enriched metadata such as:
* Marketplace metadata (name + logo)
* Collection metadata (collection name + logo)
* Payment token metadata (name, symbol, logo, decimals, address)
* Current USD value for each trade (mark-to-market)
* Optional NFT metadata via `nft_metadata=true`
Use `nft_metadata=true` when you need token attributes/media in the same response. Leave it off for performance when you only need pricing and trade facts.
Related pages:
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata)
* [NFT Image Previews](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn)
***
## Related Endpoints (Trade Feeds)
Sale price summaries are most useful when paired with raw trade feeds:
* [NFT Trades by Collection](/data-api/evm/nft/trades/collection-trades)\
Fetch the full trade history for a collection (sales feed)
* [NFT Trades by Wallet](/data-api/evm/wallet/nft-trades-by-wallet)\
Fetch all NFT trades associated with a wallet address
* [NFT Trades by Token ID](/data-api/evm/nft/trades/trades-by-token-id)\
Fetch the trade history for a specific NFT (collection + token id)
# Liquidity Filtering
Source: https://docs.moralis.com/data-api/data-features/safety-and-trust/liquidity-filtering
Understand how Moralis uses liquidity filtering to protect price accuracy, including default thresholds, how pair-side liquidity is evaluated for both tokens in a pool, endpoint behavior, and custom liquidity controls.
## Liquidity Filtering
Liquidity Filtering is a safety mechanism used across Moralis price-dependent features to avoid returning unreliable or easily manipulated prices.
It ensures that prices are only derived from pools with sufficient onchain liquidity, making downstream data (net worth, PnL, analytics) safer and more predictable.
Liquidity filtering is applied across:
* [Token Prices](/data-api/evm/token/prices/token-prices-batch)
* [Wallet Token Balances](/data-api/evm/wallet/token-balances) (with prices)
* [Wallet Net Worth](/data-api/evm/wallet/net-worth)
* Other price-dependent features
***
## Why Liquidity Filtering Exists
Onchain markets often include:
* Thin or inactive pools
* Short-lived pools created for manipulation
* Pools where one side has meaningful liquidity but the other side is effectively empty
Without liquidity filtering, these pools can:
* Produce unstable or misleading prices
* Inflate portfolio values
* Distort rankings and analytics
Liquidity filtering acts as a minimum quality bar for any price Moralis returns.
***
## Default Liquidity Thresholds
Moralis enforces minimum liquidity requirements per chain.
Default thresholds:
* **EVM chains:** \$50 minimum liquidity per side (each token in the pair)
* **Solana:** no enforced liquidity threshold
This threshold applies at the pool level and is evaluated for both assets in the pair.
***
## What “pair-side liquidity” means
“Pair-side liquidity” means the USD liquidity of **each token in the pool**, evaluated independently.
For a TOKEN / USDC pool, Moralis checks:
* TOKEN-side liquidity (in USD)
* USDC-side liquidity (in USD)
The pool is considered eligible only if **both sides** meet the minimum threshold.
### Why this approach
This prevents pools where one side is effectively illiquid, even if the other side looks healthy.
Example:
* TOKEN liquidity: \$100,000
* USDC liquidity: \$10
Even though the TOKEN side is deep, the USDC side is too small for the pool to be a reliable pricing venue, so Moralis excludes it.
This is especially important for:
* Long-tail tokens
* Manipulation-resistant pricing
* Stable portfolio and net worth calculations
***
## Low Liquidity Behavior
When a pool fails liquidity filtering, behavior depends on the endpoint.
* [Get Token Price](/data-api/evm/token/prices/token-price)\
Returns a `404` error indicating insufficient liquidity
* [Get Multiple Token Prices](/data-api/evm/token/prices/token-prices-batch)\
The token is omitted from the response
* [Wallet Token Balances](/data-api/evm/wallet/token-balances) (with prices)\
Token price is returned as `null`
* [Wallet Net Worth](/data-api/evm/wallet/net-worth)\
Token is excluded from the net worth calculation
This behavior is intentional and consistent across price-dependent features.
***
## Consistency Across Features
Liquidity filtering is applied uniformly so that:
* A pool excluded from Token Prices\
will not silently be used to value assets in Wallet Net Worth
* A token with `null` price in balances\
will not inflate portfolio values unexpectedly
This consistency is critical for building reliable dashboards, analytics, and valuation logic.
***
## Custom Liquidity Thresholds
You can override the default threshold using the `min_pair_side_liquidity_usd` query parameter.
Example:\
`min_pair_side_liquidity_usd=5000`
This ensures that only pools where **both sides** have at least \$5,000 USD liquidity are considered.
***
### Common Use Cases for Custom Thresholds
* Risk-averse or institutional reporting
* Cleaner portfolio and net worth calculations
* Excluding long-tail or thinly traded tokens
* Reducing exposure to short-lived or manipulated pools
***
## What Liquidity Filtering Does Not Do
Liquidity filtering:
* Does not guarantee market fairness
* Does not detect scams by itself
* Does not replace deeper risk analysis
It is one component of Moralis’ broader Safety & Trust model and should be used alongside:
* [Token Scores](/data-api/data-features/token-scores)
* [Spam Filtering](/data-api/resources/spam-filtering)
* [Verified Contracts](/data-api/data-features/safety-and-trust/verified-contracts)
# Verified Contracts
Source: https://docs.moralis.com/data-api/data-features/safety-and-trust/verified-contracts
Moralis surfaces verification signals for ERC20 tokens and NFT collections to help you distinguish legitimate projects from impersonators, clones, or scams.
These signals are based on trusted third-party verification sources and are exposed directly in API responses.
## Verified Contracts (ERC20)
The `verified_contract` flag indicates that an **ERC20 token contract has been verified by CoinGecko**.
This verification is **not** based on Etherscan contract verification.
### What CoinGecko Verification Means
When a contract is marked as verified:
* The token has been reviewed by the **CoinGecko team**
* It has passed CoinGecko’s internal criteria for legitimacy
* It is considered a **trusted, recognised token** within the ecosystem
This helps developers:
* Filter out scam or impersonator tokens
* Prioritise legitimate assets in search and UI
* Build safer default experiences for users
***
## Verified NFT Collections
The `verified_collection` flag applies to **NFT collections** that have been verified by **OpenSea**.
When a collection is verified:
* OpenSea has reviewed and validated the collection
* The collection is recognised as authentic
* Users can more easily distinguish real projects from fakes
This is the same verification signal users see as a **verified badge on OpenSea**.
***
## Why Verification Matters
Verification signals are especially useful for:
* Wallets and portfolio trackers
* Token and NFT discovery
* Search and filtering experiences
* Reducing exposure to scams and copycat projects
They are often used alongside:
* [Spam Filtering](/data-api/resources/spam-filtering)
* [Token Scores](/data-api/data-features/token-scores)
* [Token Filtering](/data-api/data-features/search-and-discovery/token-filtering)
to build a layered safety model.
***
## Notes & Limitations
* Verification is **source-dependent**:
* ERC20 tokens → CoinGecko
* NFT collections → OpenSea
* Not all legitimate projects are verified
* Verification status may change over time as source data updates
Always treat verification as a **signal**, not a guarantee.
# Token Filtering
Source: https://docs.moralis.com/data-api/data-features/search-and-discovery/token-filtering
Filtered Tokens enables powerful, multi-chain token discovery using advanced metrics, filters, and time-based analysis.
Instead of relying on simple search or static lists, this feature allows you to **query the token universe dynamically**, using real market, holder, liquidity, and security signals.
It’s designed for:
* Token discovery platforms
* Market analytics tools
* Trading and research dashboards
***
## What Filtered Tokens Does
Filtered Tokens lets you:
* Query tokens across multiple chains in a single request
* Combine multiple filters using comparison operators
* Analyze short-term and long-term trends
* Sort tokens by any supported metric
* Include or exclude token categories
* Apply safety and quality thresholds
To start using these capabilities, see the [Filtered Tokens endpoint](/data-api/universal/token/filtered-tokens).
This makes it possible to express questions like:
> “Which high-liquidity tokens gained buyers in the last hour?”\
> “Which new tokens launched this week already have strong volume?”\
> “Which tokens meet my safety and maturity criteria?”
***
## Supported Blockchains
Filtered Tokens supports major networks, including:
* Ethereum
* Solana
* Base
* Arbitrum
* Polygon
* BNB Chain
* Avalanche
* Optimism
* Ronin
* Linea
* Fantom
* PulseChain
Coverage continues to expand.
***
## Available Metrics
### Market Metrics
* `marketCap` – Current market capitalization
* `fullyDilutedValuation` – FDV
* `totalLiquidityUsd` – Total liquidity (USD)
***
### Trading Metrics *(time-based)*
* `volumeUsd` – Trading volume
* `usdPricePercentChange` – Price change (%)
* `liquidityChange` – Liquidity change
* `liquidityChangeUSD` – Liquidity change (USD)
***
### Holder & Flow Metrics *(time-based)*
* `totalHolders` – Current holder count
* `holders` – Holder growth
* `buyers` / `sellers` – Active traders
* `netBuyers` – Net buyer flow
* `experiencedBuyers` / `experiencedSellers` – Experienced trader activity
***
### Acquisition Metrics
* `holdersBySwap` – % acquired via DEX
* `holdersByTransfer` – % acquired via transfers
* `holdersByAirdrop` – % acquired via airdrops
***
### Security & Age
* `securityScore` – Token security rating (0–100)
* `tokenAge` – Days since token creation
***
## Time Frames
Time-based metrics support the following windows:
* `tenMinutes`
* `thirtyMinutes`
* `oneHour`
* `fourHours`
* `twelveHours`
* `oneDay`
* `oneWeek`
* `oneMonth`
This allows both **real-time momentum tracking** and **longer-term trend analysis**.
***
## Common Use Cases
### Discover Trending Tokens
```json theme={null}
{
"chains": ["eth", "base"],
"filters": [
{ "metric": "volumeUsd", "timeFrame": "oneDay", "gt": 1000000 },
{ "metric": "buyers", "timeFrame": "oneHour", "gt": 50 },
{ "metric": "usdPricePercentChange", "timeFrame": "oneDay", "gt": 10 }
],
"sortBy": {
"metric": "volumeUsd",
"timeFrame": "oneDay",
"type": "DESC"
}
}
```
***
### Identify Newly Launched Tokens
```json theme={null}
{
"filters": [
{ "metric": "tokenAge", "gt": 1767325000 }, // Unix Timestamp
{ "metric": "marketCap", "gt": 500000 },
{ "metric": "totalHolders", "gt": 100 }
],
"sortBy": {
"metric": "volumeUsd",
"timeFrame": "oneDay",
"type": "DESC"
}
}
```
***
## Category Filtering
You can include or exclude token categories to fine-tune discovery:
```json theme={null}
{
"categories": {
"include": ["meme-token", "gaming"],
"exclude": ["stablecoins", "wrapped-tokens"]
}
}
```
Use [Token Categories](/data-api/evm/token/discovery/token-categories) to identify all supported categories.
***
## How Filters Work
* Filters are combined using **AND logic**
* All filter conditions must be met
* Snapshot metrics must **not** use a `timeFrame`
* Time-based metrics **require** a `timeFrame`
Example:
```json theme={null}
{
"filters": [
{ "metric": "marketCap", "gt": 1000000, "lt": 100000000 },
{ "metric": "volumeUsd", "timeFrame": "oneDay", "gt": 500000 },
{ "metric": "holders", "timeFrame": "oneWeek", "gt": 1000 },
{ "metric": "securityScore", "gt": 80 }
]
}
```
***
## Best Practices
Recommended baseline filters for most use cases:
* `marketCap` > \$100K
* `totalLiquidityUsd` > \$500
* `volumeUsd` (1d) > \$1,000
* `securityScore` > 70
Additional tips:
* Narrow chains to improve result relevance
* Choose time frames aligned with your UX
* Sort by the metric that best reflects intent
***
## Limits & Constraints
* Maximum of **100 tokens per request**
* No pagination support
* Highly restrictive filters may return fewer results
* Some tokens may lack specific metrics
***
## Data Freshness
* Most metrics update every **\~10 seconds**
* Acquisition metrics may lag by up to **5 minutes** for highly active tokens
* Price and volume data are near real-time
# Token Search
Source: https://docs.moralis.com/data-api/data-features/search-and-discovery/token-search
Token Search lets you discover tokens across multiple blockchains using names, symbols, token address or DEX pair addresses, with built-in ranking and verification signals to surface high-quality results.
Token Search indexes tokens across supported chains and returns ranked results based on relevance, activity, and verification signals.
It’s designed for building fast, reliable token discovery experiences in wallets, dashboards, and trading applications.
You can search by:
* Token name (e.g. `Pepe`)
* Token symbol (e.g. `PEPE`)
* Token address
* DEX pair address
* Partial matches (e.g. `PEP` → `PEPE`)
Search is:
* Case-insensitive
* Resilient to partial input
* Optimized to prioritize legitimate tokens
***
## Search Controls & Ranking
Token Search exposes several controls that affect how results are ranked and filtered.
### Verification Controls
* `isVerifiedContract`\
When `true`, only [verified tokens](/data-api/data-features/safety-and-trust/verified-contracts) are returned.\
Default: `false`
* `boostVerifiedContracts`\
When `true`, [verified tokens](/data-api/data-features/safety-and-trust/verified-contracts) are ranked higher.\
Default: `true`
***
### Sorting Options
You can sort results using:
* `volume1hDesc` *(default)*
* `volume24hDesc`
* `liquidityDesc`
* `marketCapDesc`
This allows you to tune search results for:
* Trading UIs
* Analytics dashboards
* Discovery vs relevance
***
## Multi-Chain Search
Token Search supports querying across multiple chains in a single request.
Blockchains currently supported:
* Ethereum
* Polygon
* BNB Chain
* Arbitrum
* Optimism
* Base
* Avalanche
* Fantom
* Linea
* Ronin
* PulseChain
* Solana
Support is continuously expanding.
***
## Verified Token Prioritisation
Token Search applies additional weighting to [verified tokens](/data-api/data-features/safety-and-trust/verified-contracts) to improve result quality.
### How verification affects results
* Tokens listed on **CoinGecko** are treated as verified
* Verified tokens are:
* Ranked higher by default
* Preferred over similarly named unverified tokens
* This reduces exposure to spam, clones, and misleading symbols
You can:
* **Boost** verified tokens (default behavior)
* **Filter** results to only verified tokens
***
## Response Data
Each search result may include:
```json theme={null}
{
"tokenAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
"chainId": "0x1",
"name": "Pepe",
"symbol": "PEPE",
"blockNumber": 17046105,
"blockTimestamp": 1681483895,
"usdPrice": 0.00000660795798374201,
"marketCap": 2779901844.180426,
"experiencedNetBuyers": {
"oneHour": -4,
"oneDay": -6,
"oneWeek": 50
},
"netVolumeUsd": {
"oneHour": -109135.83610023865,
"oneDay": 409602.78393524094
},
"liquidityChangeUSD": {
"oneHour": -102512.48357243836,
"oneDay": -334000.64153755084
},
"usdPricePercentChange": {
"oneHour": -1.0458516076000621,
"oneDay": 0.021417598614723917
},
"volumeUsd": {
"oneHour": 190965.87173599334,
"oneDay": 5241212.457093451
},
"securityScore": 96,
"logo": "https://adds-token-info-29a861f.s3.eu-central-1.amazonaws.com/marketing/evm/0x6982508145454ce325ddbe47a25d4ec3d2311933_icon.png",
"isVerifiedContract": true,
"fullyDilutedValuation": 2779901181.0952516,
"totalHolders": 503992,
"totalLiquidityUsd": 24553340.56545042,
"implementations": []
}
```
***
## Limits & Constraints
Current limitations to be aware of:
* Default limit: **10 results**
* Maximum limit: **1000 results**
* No pagination support
* Chain identifiers must be valid and correctly formatted
***
## Usage Guidelines
To get the best results:
* Use precise search queries where possible
* Limit searches to relevant chains
* Use verification filters for safer UX
* Choose appropriate sorting for your use case
***
## Availability & Access
Token Search is a **premium feature** and requires a **Pro plan** or higher.
Trial access can be activated to evaluate the feature before upgrading.
# Token Scores
Source: https://docs.moralis.com/data-api/data-features/token-scores
The Moralis Token Score is a unified 0-100 rating that evaluates the onchain quality of a token using six weighted metrics, supported across all EVM chains and Solana mainnet.
## What is the Token Score?
The Token Score summarizes a token's onchain fundamentals into a single value between 0 and 100, where:
* Higher scores indicate stronger onchain quality
* Lower scores indicate weaker liquidity, activity, distribution, or unrealistic valuations
It is designed to be:
* Simple to display
* Easy to filter and sort
* Transparent and easy to explain
***
## How is the Token Score calculated?
Each of the six metrics produces a sub-score from 0 to 100, and the final score is a weighted average. The metrics are:
1. Age - token activity across multiple timeframes
2. Liquidity - liquidity depth
3. FDV - fully diluted valuation reasonableness
4. Holder Supply - distribution of supply among top holders
5. Volume - trading volume
6. Activity - transaction counts
***
## Metrics Overview
### 1. Token Age & Maturity
* Evaluates activity across timeframes (10m → 30d).
* Tokens that sustain or grow activity over longer periods receive higher scores.
### 2. Liquidity Depth
* Measures liquidity across all pools belonging to a token.
* Higher liquidity generally indicates healthier and more resilient markets.
### 3. Fully Diluted Valuation (FDV)
* Penalizes extreme or unrealistic valuations.
* Reasonably valued tokens receive higher FDV scores.
### 4. Holder Distribution
* Assesses how much of the supply is concentrated in the top holders.
* More decentralization = higher score.
### 5. Trading Volume
* Measures trading volume across all time windows.
* High volume in any timeframe positively impacts the score.
### 6. Transaction Activity
* Measures frequency of swaps and transfers.
* High transaction counts indicate stronger adoption and usage.
***
## Dynamic Scoring
The Token Score is **dynamic**, meaning it updates automatically as new onchain data becomes available. Because the model incorporates multiple rolling timeframes (10 minutes up to 1 month), a token’s score may change due to:
* Increased or decreased transaction activity
* Shifts in liquidity
* Changes in trading volume
* Supply distribution evolving
* Market valuation moving significantly
Scores naturally **decay over time** if a token becomes inactive, as older datapoints fall out of the model. This ensures the score always reflects **current** onchain conditions.
***
## Early & New Tokens
Scores for very new tokens can sometimes be **volatile or appear inconsistent** in the earliest stages of trading. This is expected, as the scoring model is still collecting activity patterns across its time horizons.
**Key points about new-token scoring:**
* Early activity is often spiky and unstable
* Short-term timeframes dominate the score until longer periods accumulate
* As data builds up, the score stabilizes and becomes more representative
* Tokens with genuine early adoption will quickly rise into their appropriate score range
The model adapts rapidly to real onchain traction - tokens with strong fundamentals will see their scores normalize within a short timeframe.
***
## Score Updates
* Scores are recalculated whenever a token has activity
* As long as trading continues, the score stays up to date
* If activity stops, older data decays out of the model and the score may decline
***
## How can the Token Score be used?
The Token Score is an informational onchain quality signal suitable for:
#### Wallets & Explorers
* Displaying token quality at a glance
* Highlighting high-quality tokens
* Warning users about low-scoring assets
### DEXs & Trading Interfaces
* Supporting safer trading experiences
* Powering token discovery and ranking flows
### Analytics & Discovery Tools
* Filtering tokens by score (e.g., score ≥ 70)
* Sorting tokens by onchain quality
* Highlighting trending or improving tokens
### Risk & Monitoring Systems
* Triggering alerts for sharp score drops
* Flagging potentially risky assets for review
Note: The Token Score is not investment advice. It is an onchain quality indicator.
***
## Historical Token Scores
In addition to the latest score, Moralis provides [historical Token Scores](/data-api/universal/token/score/token-score-timeseries), allowing you to track how a token’s onchain quality evolves over time.
Historical scores return a **time-series of Token Scores**, making it possible to:
* Visualize long-term trends
* Detect momentum shifts
* Identify improving or deteriorating tokens
* Backtest filters and ranking strategies
This is especially powerful when combined with discovery, alerts, or trading analytics.
***
### Supported Timeframes
Historical Token Scores support the following lookback windows and resolutions:
* **1 day** → hourly resolution
* **7 days** → hourly resolution
* **30 days** → daily resolution
Each data point represents the Token Score at the start of the aggregation window.
***
### Historical Token Score Endpoint
Developers can fetch the historical scoring breakdown using the [Timeseries Token Score](/data-api/universal/token/score/token-score-timeseries) endpoint:
```
GET /tokens/{tokenAddress}/score/historical
```
Example response:
```javascript theme={null}
{
"chainId": "0x1",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"timeseries": [
{
"timestamp": "2026-01-22T00:00:00Z",
"score": 85
},
{
"timestamp": "2026-01-21T00:00:00Z",
"score": 84
},
{
"timestamp": "2026-01-20T00:00:00Z",
"score": 82
},
{},
{},
{}
]
}
```
Note: This endpoint is available on **Pro plans and above**.
***
## Accessing Detailed Score Data
Developers can fetch the full scoring breakdown using the [Token Score](/data-api/universal/token/score/token-score) endpoint:
```
GET /tokens/{address}/score
```
This endpoint returns:
* Final score (0–100)
* Sub-scores for all six metrics
* Raw onchain metrics used in the calculation
* Timestamp of last update
Example response:
```json theme={null}
{
"tokenAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
"chainId": "0x1",
"score": 94,
"updatedAt": "2025-12-17T13:13:16.000Z",
"metrics": {
"usdPrice": 0.00000402842434389702,
"liquidityUsd": 17796503.766060613,
"volumeUsd": {
"10m": 450.2313257520407,
"30m": 1698.933789208249,
"1h": 12046.524987589466,
"4h": 258302.39298010131,
"12h": 364831.1304703939,
"1d": 775582.3422029199,
"7d": 6831957.3632850265,
"30d": 40129952.32714323
},
"transactions": {
"10m": 4,
"30m": 27,
"1h": 47,
"4h": 106,
"12h": 389,
"1d": 1393,
"7d": 9614,
"30d": 87370
},
"supply": {
"total": 420689899653542.56,
"top10Percent": 41.53
}
}
}
```
Note: This endpoint is available on **Pro plans and above**.
***
## Supported Chains
The Token Score is available on all mainnet chains, for **both EVM and Solana tokens**. This allows you to **compare token quality across EVM chains and Solana using a unified metric**, while still respecting chain-specific data structures under the hood.
# Address Transactions
Source: https://docs.moralis.com/data-api/evm/blockchain/address-transactions
/openapi-files/data-api/api.json GET /{address}
Get raw native transactions ordered by block number in descending order.
# Address Transactions (Decoded)
Source: https://docs.moralis.com/data-api/evm/blockchain/address-transactions-decoded
/openapi-files/data-api/api.json GET /{address}/verbose
Get ABI-decoded native transactions ordered by block number in descending order.
# Block by Date
Source: https://docs.moralis.com/data-api/evm/blockchain/block-by-date
/openapi-files/data-api/api.json GET /dateToBlock
Find the closest block to a specific date on a blockchain.
# Block by Hash or Number
Source: https://docs.moralis.com/data-api/evm/blockchain/block-by-hash
/openapi-files/data-api/api.json GET /block/{block_number_or_hash}
Get the contents of a block given the block hash.
# Latest Block
Source: https://docs.moralis.com/data-api/evm/blockchain/latest-block
/openapi-files/data-api/api.json GET /latestBlockNumber/{chain}
Get the most recent block number for a specified blockchain.
# Blockchain API
Source: https://docs.moralis.com/data-api/evm/blockchain/overview
Low-level blockchain access made simple - query raw blocks, transactions, logs, and events with consistent, multi-chain APIs.
## Overview
The **Blockchain API** provides low-level access to raw blockchain data including blocks, transactions, and logs.
Query the blockchain directly without running your own nodes - get block data, transaction details, and decoded contract interactions across all supported EVM chains.
***
## What Is the Blockchain API?
The Blockchain API lets you query:
* **Blocks** - Block data by hash, number, or timestamp
* **Transactions** - Raw and decoded transaction details
* **Address Activity** - All transactions for a specific address
* **Logs** - Event logs and contract emissions
* **Internal Transactions** - Contract-to-contract calls
***
## Key Features
The Blockchain API includes:
* **Block Lookups** - Query blocks by hash or find blocks by timestamp
* **Transaction Details** - Full transaction data including gas and status
* **Decoded Transactions** - Human-readable interpretation of contract calls
* **Address History** - Complete transaction history for any address
* **Multi-Chain** - Consistent interface across all EVM chains
* **Latest Block** - Get the current block number for any chain
***
## Common Use Cases
The Blockchain API is commonly used for:
* **Block Explorers**\
(display block and transaction data)
* **Address Monitoring**\
(track transactions for specific wallets)
* **Historical Analysis**\
(query blockchain state at specific times)
* **Transaction Verification**\
(confirm transaction status and details)
* **Data Indexing**\
(build custom indexes from raw data)
* **Debugging**\
(inspect failed transactions and logs)
***
## Popular Endpoints
| Endpoint | Description |
| --------------------------------------------------------------------------- | ----------------------------------- |
| [Get Block by Hash](/data-api/evm/blockchain/block-by-hash) | Retrieve block data by hash |
| [Get Block by Date](/data-api/evm/blockchain/block-by-date) | Find block closest to a timestamp |
| [Get Transaction](/data-api/evm/blockchain/transaction-by-hash) | Get transaction details by hash |
| [Decoded Transaction](/data-api/evm/blockchain/transaction-by-hash-decoded) | Get decoded transaction data |
| [Address Transactions](/data-api/evm/blockchain/address-transactions) | Get all transactions for an address |
***
## Get Started
Explore some of the popular Blockchain API endpoints:
* [Get Block by Hash](/data-api/evm/blockchain/block-by-hash)
* [Get Block by Date](/data-api/evm/blockchain/block-by-date)
* [Get Transaction](/data-api/evm/blockchain/transaction-by-hash)
* [Get Address Transactions](/data-api/evm/blockchain/address-transactions)
# Get Transaction
Source: https://docs.moralis.com/data-api/evm/blockchain/transaction-by-hash
/openapi-files/data-api/api.json GET /transaction/{transaction_hash}
Get the contents of a transaction by the given transaction hash.
# Get Transaction (Decoded)
Source: https://docs.moralis.com/data-api/evm/blockchain/transaction-by-hash-decoded
/openapi-files/data-api/api.json GET /transaction/{transaction_hash}/verbose
Get the ABI-decoded contents of a transaction by the given transaction hash.
# Wallet Positions
Source: https://docs.moralis.com/data-api/evm/defi/legacy/wallet-positions
/openapi-files/data-api/api.json GET /wallets/{address}/defi/positions
Get a concise overview of a wallet’s DeFi positions across all protocols.
# Detailed Positions
Source: https://docs.moralis.com/data-api/evm/defi/legacy/wallet-positions-detailed
/openapi-files/data-api/api.json GET /wallets/{address}/defi/{protocol}/positions
Fetch detailed DeFi positions for a given wallet and protocol.
# Wallet Protocols
Source: https://docs.moralis.com/data-api/evm/defi/legacy/wallet-protocols
/openapi-files/data-api/api.json GET /wallets/{address}/defi/summary
Summarize a wallet’s DeFi activity, including total USD value, unclaimed rewards and active protocols.
# DeFi API
Source: https://docs.moralis.com/data-api/evm/defi/overview
Track DeFi positions, balances, rewards, and protocol interactions with enriched, protocol-aware data across supported chains.
## Overview
The **DeFi API** provides detailed insights into wallet positions across DeFi protocols including lending, borrowing, staking, and liquidity pools.
Query a wallet's DeFi exposure without manually integrating with each protocol - get a unified view of positions, balances, and rewards across supported protocols.
***
## What Is the DeFi API?
The DeFi API lets you query:
* **Protocol Summary** - Overview of all DeFi protocols a wallet uses
* **Positions** - Detailed position data per protocol
* **Position Details** - Enhanced breakdown with underlying assets
* **Multi-Protocol** - Support for major DeFi protocols
***
## Key Features
The DeFi API includes:
* **Protocol Detection** - Automatically identifies which protocols a wallet uses
* **Position Breakdown** - Detailed view of deposits, borrows, and rewards
* **USD Valuations** - Position values calculated in USD
* **Multi-Chain** - Track positions across supported EVM chains
* **Unified Format** - Consistent data structure across protocols
***
## Supported Protocols
The DeFi API supports major protocols including:
* Aave
* Compound
* Uniswap
* Lido
* Rocket Pool
* Eigenlayer
* And more
***
## Common Use Cases
The DeFi API is commonly used for:
* **Portfolio Trackers**\
(show DeFi positions alongside tokens and NFTs)
* **DeFi Dashboards**\
(aggregate positions across protocols)
* **Risk Monitoring**\
(track lending health factors and exposure)
* **Yield Tracking**\
(monitor staking rewards and LP positions)
* **Tax Reporting**\
(calculate DeFi gains and income)
***
## Popular Endpoints
| Endpoint | Description |
| ------------------------------------------------------------------ | ------------------------------------- |
| [Wallet Protocols](/data-api/evm/defi/wallet-protocols) | Summary of protocols used by a wallet |
| [Wallet Positions](/data-api/evm/defi/wallet-positions) | Detailed positions per protocol |
| [Detailed Positions](/data-api/evm/defi/wallet-positions-detailed) | Enhanced position breakdown |
***
## Get Started
* [Get Wallet Protocols](/data-api/evm/defi/wallet-protocols)
* [Get Wallet Positions](/data-api/evm/defi/wallet-positions)
* [Get Detailed Positions](/data-api/evm/defi/wallet-positions-detailed)
***
## DeFi API Overview Video
# Wallet Positions
Source: https://docs.moralis.com/data-api/evm/defi/wallet-positions
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/positions
Returns all DeFi positions (lending, liquidity, staking) for a wallet address across specified chains in a unified schema.
# Detailed Positions
Source: https://docs.moralis.com/data-api/evm/defi/wallet-positions-detailed
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/{protocol}/positions
Returns DeFi positions for a wallet address filtered by a specific protocol across specified chains.
# Wallet Protocols
Source: https://docs.moralis.com/data-api/evm/defi/wallet-protocols
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/summary
Returns a summary of all DeFi positions for a wallet address across specified chains.
# NFT Collections by Wallet
Source: https://docs.moralis.com/data-api/evm/nft/collections/nft-collections-by-wallet
/openapi-files/data-api/api.json GET /{address}/nft/collections
Fetch all NFT Collections held by a specified wallet address. Each Collection returned includes on-chain metadata as well as off-chain metadata, floor prices and more where available.
# NFTs by Collection
Source: https://docs.moralis.com/data-api/evm/nft/collections/nfts-by-collection
/openapi-files/data-api/api.json GET /nft/{address}
Fetch all NFTs for a given collection. Each NFT returned includes on-chain metadata as well as off-chain metadata, floor prices, rarity and more where available.
# NFTs by Wallet
Source: https://docs.moralis.com/data-api/evm/nft/collections/nfts-by-wallet
/openapi-files/data-api/api.json GET /{address}/nft/
# Trending NFTs by Market Cap
Source: https://docs.moralis.com/data-api/evm/nft/discovery/nfts-by-market-cap
/openapi-files/data-api/api.json GET /market-data/nfts/top-collections
Get top NFT collections by their current market cap. Currently only supports Ethereum.
# Trending NFTs by Trade Volume
Source: https://docs.moralis.com/data-api/evm/nft/discovery/nfts-by-volume
/openapi-files/data-api/api.json GET /market-data/nfts/hottest-collections
Get NFT collections by their 24 hour trading volume. Currently only supports Ethereum.
# Collection Metadata
Source: https://docs.moralis.com/data-api/evm/nft/metadata/collection-metadata
/openapi-files/data-api/api.json GET /nft/{address}/metadata
Fetch on-chain metadata like name, symbol, and base token URI for an NFT contract. Also returns off-chain metadata, floor prices and more where available.
# Collection Metadata (Batch)
Source: https://docs.moralis.com/data-api/evm/nft/metadata/collection-metadata-batch
/openapi-files/data-api/api.json POST /nft/metadata
Retrieve metadata (name, symbol) for up to 25 NFT contracts in one call. Also returns off-chain metadata, floor prices and more where available.
# Collection Stats
Source: https://docs.moralis.com/data-api/evm/nft/metadata/collection-stats
/openapi-files/data-api/api.json GET /nft/{address}/stats
Get summary stats by NFT collection including total NFT transfers, total tokens and total owners.
# NFT Metadata
Source: https://docs.moralis.com/data-api/evm/nft/metadata/nft-metadata
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}
Fetch metadata for a specific NFT. Includes on-chain metadata as well as off-chain metadata, floor prices, rarity and more where available.
# NFT Metadata (Batch)
Source: https://docs.moralis.com/data-api/evm/nft/metadata/nft-metadata-batch
/openapi-files/data-api/api.json POST /nft/getMultipleNFTs
Get NFT metadata for one or many NFTs. Accepts an array of up to 25 `tokens`, each requiring `token_address` and `token_id`. Each NFT returned includes on-chain metadata as well as off-chain metadata, floor prices, rarity and more where available.
# NFT API
Source: https://docs.moralis.com/data-api/evm/nft/overview
Everything you need to build NFT experiences - metadata, ownership, transfers, sales, rarity, floor prices, and marketplace activity across major chains.
## Overview
The **NFT API** provides complete NFT data including metadata, ownership, trading history, pricing, and collection analytics.
Whether you're building a marketplace, portfolio tracker, or analytics platform, the NFT API gives you everything you need to work with NFTs across all EVM chains.
***
## What Is the NFT API?
The NFT API lets you query:
* **Metadata** - Token and collection metadata with media URLs
* **Ownership** - Current owners and ownership history
* **Transfers** - Transfer history by collection or token ID
* **Pricing** - Floor prices, sale history, and price trends
* **Traits** - Attribute data and rarity analysis
* **Discovery** - Top collections by volume or market cap
***
## Key Features
The NFT API includes:
* **Rich Metadata** - Fully resolved metadata with IPFS gateway support
* **Floor Price Tracking** - Current and historical floor prices
* **Sales Data** - Trade history with prices and marketplaces
* **Trait Analysis** - Collection traits with rarity percentages
* **Ownership Queries** - Find all owners of a collection or token
* **Market Discovery** - Discover trending collections
* **Batch Queries** - Fetch metadata for multiple NFTs at once
***
## Common Use Cases
The NFT API is commonly used for:
* **NFT Marketplaces**\
(listings, metadata, ownership verification)
* **Portfolio Trackers**\
(display NFT holdings with valuations)
* **Analytics Platforms**\
(collection stats, volume, floor trends)
* **Rarity Tools**\
(trait analysis and rarity rankings)
* **Verification Systems**\
(prove NFT ownership for gating)
* **Collection Dashboards**\
(monitor collection performance)
***
## Popular Endpoints
| Endpoint | Description |
| --------------------------------------------------------------------- | ------------------------------------ |
| [NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) | Get metadata for a specific NFT |
| [Collection Metadata](/data-api/evm/nft/metadata/collection-metadata) | Get collection-level metadata |
| [Floor Price](/data-api/evm/nft/prices/collection-floor-price) | Current floor price for a collection |
| [NFT Owners](/data-api/evm/nft/ownership/owners-by-contract) | List all owners of a collection |
| [NFT Transfers](/data-api/evm/nft/transfers/collection-transfers) | Transfer history for a collection |
| [Collection Trades](/data-api/evm/nft/trades/collection-trades) | Recent sales for a collection |
***
## Get Started
Explore some of the popular NFT API endpoints:
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata)
* [Get Collection Floor Price](/data-api/evm/nft/prices/collection-floor-price)
* [Get NFT Owners](/data-api/evm/nft/ownership/owners-by-contract)
* [Get NFT Transfers](/data-api/evm/wallet/nft-transfers)
# Owners by Collection
Source: https://docs.moralis.com/data-api/evm/nft/ownership/owners-by-contract
/openapi-files/data-api/api.json GET /nft/{address}/unique-owners
Get unique wallet addresses owning NFTs from a contract.
# Owners by Token ID
Source: https://docs.moralis.com/data-api/evm/nft/ownership/owners-by-token-id
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/owners
List wallets owning a specific NFT, defined by its contract and token ID.
# Floor Price by Collection
Source: https://docs.moralis.com/data-api/evm/nft/prices/collection-floor-price
/openapi-files/data-api/api.json GET /nft/{address}/floor-price
Get floor price for a given collection. Refreshes every 30 minutes.
# Floor Price by Token ID
Source: https://docs.moralis.com/data-api/evm/nft/prices/floor
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/floor-price
Get the floor price for a specific NFT, defined by its contract and token ID. Refreshes every 30 minutes.
# Timeseries Floor Price by Contract
Source: https://docs.moralis.com/data-api/evm/nft/prices/historical-floor-price
/openapi-files/data-api/api.json GET /nft/{address}/floor-price/historical
Get timeseries historical floor prices for a given NFT collection. Refreshes every 30 minutes.
# Sale Price by Collection
Source: https://docs.moralis.com/data-api/evm/nft/prices/sale-price-by-contract
/openapi-files/data-api/api.json GET /nft/{address}/price
Fetch sale prices for NFTs in a contract over a specified number of days. Returns the last sale, lowest sale, highest sale, average sale and total trades within the specified period.
# Sale Price by Token ID
Source: https://docs.moralis.com/data-api/evm/nft/prices/sale-price-by-token-id
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/price
Fetch sale prices for a specific NFT over a specified number of days. Returns the last sale, lowest sale, highest sale, average sale and total trades within the specified period.
# NFT Trades by Collection
Source: https://docs.moralis.com/data-api/evm/nft/trades/collection-trades
/openapi-files/data-api/api.json GET /nft/{address}/trades
Get NFT trades for a given contract with the ability to filter by marketplace.
# NFT Trades by Token ID
Source: https://docs.moralis.com/data-api/evm/nft/trades/trades-by-token-id
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/trades
Get NFT trades for a specific NFT by specifying a contract addres and token ID.
# NFTs by Traits
Source: https://docs.moralis.com/data-api/evm/nft/traits/nfts-by-traits
/openapi-files/data-api/api.json POST /nft/{address}/nfts-by-traits
Find NFTs in a contract matching specific traits, perfect for attribute-based searches.
# NFT Traits by Collection
Source: https://docs.moralis.com/data-api/evm/nft/traits/traits-by-collection
/openapi-files/data-api/api.json GET /nft/{address}/traits
Explore the distinct traits of NFTs in a contract, showcasing their unique attributes.
# Traits by Collection (Paginated)
Source: https://docs.moralis.com/data-api/evm/nft/traits/traits-by-collection-paginated
/openapi-files/data-api/api.json GET /nft/{address}/traits/paginate
Fetch NFT traits for a contract with pagination for efficient navigation of large collections.
# NFT Transfers by Contract
Source: https://docs.moralis.com/data-api/evm/nft/transfers/collection-transfers
/openapi-files/data-api/api.json GET /nft/{address}/transfers
Get NFT transfers for a contract, with options to filter by date, token, or other parameters.
# NFT Transfers by Token ID
Source: https://docs.moralis.com/data-api/evm/nft/transfers/token-id-transfers
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/transfers
Get transfers of a specific NFT given a contract address and token ID.
# Resync NFT Metadata
Source: https://docs.moralis.com/data-api/evm/nft/utilities/resync-nft-metadata
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/metadata/resync
Update an NFT’s metadata, either from its current token URI or a new one. Choose sync for immediate results or async for background processing.
# Resync NFT Traits
Source: https://docs.moralis.com/data-api/evm/nft/utilities/resync-nft-traits
/openapi-files/data-api/api.json GET /nft/{address}/traits/resync
Refresh trait and rarity data for NFTs in a contract to ensure accuracy.
# EVM Data API
Source: https://docs.moralis.com/data-api/evm/overview
The EVM Data API provides a single, consistent interface for accessing blockchain data across 30+ supported chains, including Ethereum, Base, Binance Smart Chain, and more. It standardizes complex on-chain data into clean, developer-friendly formats.
### Overview
The **EVM API** provides **deep, EVM-native access** to blockchain data across **30+ EVM-compatible networks**, including Ethereum, Base, Binance Smart Chain, Polygon, Arbitrum, Optimism, and more.
It exposes rich EVM-specific concepts while still delivering data in clean, structured, developer-friendly formats.
***
### Explore Data APIs:
Wallet history, transfers balances, tokens and PnL.
Token search, balances, transfers, holders and swaps.
Metadata, floor prices, transfers and ownership.
Real-time crypto prices, OHLC, trading volume.
DeFi positions, liquidity, reserves and token pairs.
Raw blocks, transactions, internal transactions and logs.
***
### What the EVM API Is For
The EVM API is designed for:
* Applications focused primarily on **EVM ecosystems**
* Advanced use cases that rely on **EVM-specific behavior**
* Teams that need **maximum depth and flexibility** when working with EVM data
Some EVM-specific endpoints and data models are **not available** in the Universal API.
***
### Relationship to the Universal API
* The Universal API covers **shared functionality** across EVM and Solana
* The EVM API provides **deeper, more specialized EVM support**
* Not all EVM endpoints are candidates for universal consolidation
Think of the EVM API as the **expert-level interface** for EVM chains.
***
# Floor Price by Collection
Source: https://docs.moralis.com/data-api/evm/price/collection-floor-price
/openapi-files/data-api/api.json GET /nft/{address}/floor-price
Get floor price for a given collection. Refreshes every 30 minutes.
# OHLC by Pair Address
Source: https://docs.moralis.com/data-api/evm/price/ohlc
/openapi-files/data-api/api.json GET /pairs/{address}/ohlcv
Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for a token pair.
# Price API
Source: https://docs.moralis.com/data-api/evm/price/overview
Real-time crypto prices, OHLC, trading volume.
## Overview
The **Price API** provides real-time and historical pricing data for tokens and NFTs across all supported EVM chains.
Get current prices, OHLC candlestick data, floor prices, and trading volume without managing your own price feeds or aggregation infrastructure.
***
## What Is the Price API?
The Price API lets you query:
* **Token Prices** - Current USD prices for any ERC-20 token
* **OHLC Data** - Candlestick data for charting and technical analysis
* **NFT Floor Prices** - Current and historical floor prices by collection
* **Sale Prices** - Recent NFT sales with transaction details
* **Batch Queries** - Fetch prices for multiple tokens in one request
***
## Key Features
The Price API includes:
* **Real-Time Prices** - Current token prices with USD values
* **Historical Data** - Price history for trend analysis
* **OHLC Candles** - Open, high, low, close data for charting
* **Floor Price History** - Track NFT collection floor over time
* **Batch Support** - Query multiple tokens efficiently
* **Multi-Chain** - Consistent pricing across all EVM chains
***
## Common Use Cases
The Price API is commonly used for:
* **Price Feeds**\
(display current token prices in apps)
* **Trading Charts**\
(OHLC data for candlestick visualizations)
* **Portfolio Valuation**\
(calculate holdings value in USD)
* **NFT Analytics**\
(track floor price trends)
* **Alerts & Notifications**\
(trigger on price thresholds)
* **Market Data Dashboards**\
(aggregate pricing across tokens)
***
## Popular Endpoints
| Endpoint | Description |
| --------------------------------------------------------------------- | ------------------------------ |
| [Token Price](/data-api/evm/token/prices/token-price) | Get current price for a token |
| [Token Prices (Batch)](/data-api/evm/token/prices/token-prices-batch) | Get prices for multiple tokens |
| [OHLC](/data-api/evm/price/ohlc) | Candlestick data for charting |
| [Collection Floor Price](/data-api/evm/price/collection-floor-price) | Current NFT floor price |
| [Historical Floor Price](/data-api/evm/price/timeseries-floor-price) | Floor price over time |
# Sale Price by Token ID
Source: https://docs.moralis.com/data-api/evm/price/sale-price-by-token-id
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/price
Fetch sale prices for a specific NFT over a specified number of days. Returns the last sale, lowest sale, highest sale, average sale and total trades within the specified period.
# Sale Price by Collection
Source: https://docs.moralis.com/data-api/evm/price/sale-prices-by-collection
/openapi-files/data-api/api.json GET /nft/{address}/price
Fetch sale prices for NFTs in a contract over a specified number of days. Returns the last sale, lowest sale, highest sale, average sale and total trades within the specified period.
# Timeseries Floor Price by Contract
Source: https://docs.moralis.com/data-api/evm/price/timeseries-floor-price
/openapi-files/data-api/api.json GET /nft/{address}/floor-price/historical
Get timeseries historical floor prices for a given NFT collection. Refreshes every 30 minutes.
# Floor Price by Token ID
Source: https://docs.moralis.com/data-api/evm/price/token-id-floor-price
/openapi-files/data-api/api.json GET /nft/{address}/{token_id}/floor-price
Get the floor price for a specific NFT, defined by its contract and token ID. Refreshes every 30 minutes.
# Token Price
Source: https://docs.moralis.com/data-api/evm/price/token-price
/openapi-files/data-api/api.json GET /erc20/{address}/price
Retrieve the current or historical price of an ERC20 token in the blockchain’s native currency and USD. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
# Token Prices (Batch)
Source: https://docs.moralis.com/data-api/evm/price/token-prices-batch
/openapi-files/data-api/api.json POST /erc20/prices
Retrieve the current or historical prices for multiple ERC20 tokens in the blockchain’s native currency and USD. Accepts an array of up to 100 `tokens`, each requiring `token_address` and optional fields such as `to_block` or `exchange`. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
# Filtered Tokens
Source: https://docs.moralis.com/data-api/evm/token/discovery/filtered-tokens
/openapi-files/data-api/api.json POST /discovery/tokens
Fetch a list of tokens across multiple chains, filtered and ranked by dynamic on-chain metrics like volume, price change, liquidity, holder composition, and more. Supports advanced filters (e.g. “top 10 whales hold <40%”), category-based inclusion/exclusion (e.g. “exclude stablecoins”), and time-based analytics. Ideal for token discovery, investor research, risk analysis, and portfolio tools. Each token returned includes detailed trading metrics as well as on-chain and off-chain metadata.
# Token Categories
Source: https://docs.moralis.com/data-api/evm/token/discovery/token-categories
/openapi-files/data-api/api.json GET /tokens/categories
List all supported token categories, which can then be used for filtering on endpoints such as getFilteredTokens.
# Top Gainers
Source: https://docs.moralis.com/data-api/evm/token/discovery/top-gainers
/openapi-files/data-api/api.json GET /discovery/tokens/top-gainers
Identify tokens with the highest price increases over a period.
# Top Losers
Source: https://docs.moralis.com/data-api/evm/token/discovery/top-losers
/openapi-files/data-api/api.json GET /discovery/tokens/top-losers
List tokens with the largest price decreases over a period.
# Historical Token Holders
Source: https://docs.moralis.com/data-api/evm/token/holders/historical-token-holders
/openapi-files/data-api/api.json GET /erc20/{tokenAddress}/holders/historical
Track changes in the holder base of an ERC20 token over time. Supports timeseries data for total holders as well as change metrics such as holder distribution and holder acquisition.
# Token Holder Metrics
Source: https://docs.moralis.com/data-api/evm/token/holders/token-holder-stats
/openapi-files/data-api/api.json GET /erc20/{tokenAddress}/holders
Returns total holders for a given token, as well as aggregated stats holder supply, holder trends, holder distribution and holder acquisition metrics.
# Top Token Holders
Source: https://docs.moralis.com/data-api/evm/token/holders/token-holders
/openapi-files/data-api/api.json GET /erc20/{token_address}/owners
Identify the major holders of an ERC20 token and understand their ownership percentages. Includes known entities, exchanges and wallet labels.
# Token Metadata
Source: https://docs.moralis.com/data-api/evm/token/metadata/token-metadata
/openapi-files/data-api/api.json GET /erc20/metadata
Retrieve metadata (name, symbol, decimals, logo) for an ERC20 token contract, as well as off-chain metadata, total supply, categories, logos, spam status and more.
# Token Score
Source: https://docs.moralis.com/data-api/evm/token/metadata/token-score
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/score
Retrieve a score for a specific token along with detailed metrics including price, volume, liquidity, transaction counts, and supply information.
# Token Score - Timeseries
Source: https://docs.moralis.com/data-api/evm/token/metadata/token-score-timeseries
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/score/historical
Retrieve historical score data for a specific token over time.
# Token API Overview
Source: https://docs.moralis.com/data-api/evm/token/overview
The most powerful Token API in Web3 - fetch, analyse, and monitor ERC20 tokens across multiple chains, covering prices, balances, transfers, liquidity, holders, volume, profitability, and advanced safety signals through a single unified interface.
## Overview
The **Token API** provides comprehensive ERC-20 token data including prices, balances, transfers, holders, liquidity, swaps, and advanced analytics across all supported EVM chains.
From simple balance queries to complex token analytics, the Token API delivers the data you need to build trading platforms, portfolio trackers, and token analysis tools.
***
## What Is the Token API?
The Token API lets you query:
* **Balances** - Token holdings for any wallet address
* **Transfers** - Transfer history by wallet or token contract
* **Prices** - Real-time and historical token prices
* **Holders** - Token holder lists and distribution analytics
* **Swaps** - DEX trading activity and swap history
* **Liquidity** - Trading pairs, reserves, and liquidity data
* **Metadata** - Token details including name, symbol, decimals, and logo
***
## Key Features
* **Real-Time Prices** - Current token prices with USD values
* **Historical Data** - Price history and OHLC candlestick data
* **Holder Analytics** - Top holders, holder counts, and distribution
* **Swap Tracking** - DEX trades with token pairs and values
* **Pair Discovery** - Find trading pairs across DEXs
* **Token Search** - Search tokens by name or symbol
* **Safety Signals** - Token security analysis and risk indicators
* **Multi-Chain** - Consistent data across all EVM chains
***
## Common Use Cases
* **Trading Platforms**\
(real-time prices, charts, swap history)
* **Portfolio Trackers**\
(token balances with USD valuations)
* **Token Analytics**\
(holder distribution, volume, liquidity)
* **DEX Aggregators**\
(pair discovery, liquidity analysis)
* **Wallet Apps**\
(display token holdings and transfers)
* **Research Tools**\
(token metrics and safety analysis)
***
## Get Started
Explore some of the popular Token API endpoints:
* [Token Balances](/data-api/evm/wallet/token-balances) - Get token holdings for a wallet
* [Token Search](/data-api/data-features/search-and-discovery/token-search) - Search for tokens
* [Token Price](/data-api/evm/price/token-price) - Get current token price
* [Token Transfers](/data-api/evm/wallet/token-transfers) - Get transfer history
* [Token Metadata](/data-api/evm/token/metadata/token-metadata) - Get token details
* [Token Pairs](/data-api/evm/token/swaps/token-pairs) - Get trading pairs
# OHLC by Pair Address
Source: https://docs.moralis.com/data-api/evm/token/prices/ohlc
/openapi-files/data-api/api.json GET /pairs/{address}/ohlcv
Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for a token pair.
# Token Price
Source: https://docs.moralis.com/data-api/evm/token/prices/token-price
/openapi-files/data-api/api.json GET /erc20/{address}/price
Retrieve the current or historical price of an ERC20 token in the blockchain’s native currency and USD. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
# Token Prices (Batch)
Source: https://docs.moralis.com/data-api/evm/token/prices/token-prices-batch
/openapi-files/data-api/api.json POST /erc20/prices
Retrieve the current or historical prices for multiple ERC20 tokens in the blockchain’s native currency and USD. Accepts an array of up to 100 `tokens`, each requiring `token_address` and optional fields such as `to_block` or `exchange`. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
# Snipers
Source: https://docs.moralis.com/data-api/evm/token/signals/snipers
/openapi-files/data-api/api.json GET /pairs/{address}/snipers
Identify sniper wallets that bought a token within a specified timeframe (`blocksAfterCreation`). Each wallet returned includes detailed information about how much was bought, sold as well as PnL stats and more.
# Top Traders by Token
Source: https://docs.moralis.com/data-api/evm/token/signals/top-traders
/openapi-files/data-api/api.json GET /erc20/{address}/top-gainers
List the most profitable wallets that have traded a specific ERC20 token.
# Pair Stats
Source: https://docs.moralis.com/data-api/evm/token/swaps/pair-stats
/openapi-files/data-api/api.json GET /pairs/{address}/stats
Access key statistics for a token pair, such as price, buyers, sellers, liquidity, volume and more.
# Pair Swaps
Source: https://docs.moralis.com/data-api/evm/token/swaps/pair-swaps
/openapi-files/data-api/api.json GET /pairs/{address}/swaps
Fetch swap transactions (buy, sell, add/remove liquidity) for a specific token pair.
# Token Pairs
Source: https://docs.moralis.com/data-api/evm/token/swaps/token-pairs
/openapi-files/data-api/api.json GET /erc20/{token_address}/pairs
List supported trading pairs for a specific ERC20 token. Each pair returned includes price, liquidity, volume and more.
# Token Swaps
Source: https://docs.moralis.com/data-api/evm/token/swaps/token-swaps
/openapi-files/data-api/api.json GET /erc20/{address}/swaps
Get all swap transactions (buy/sell) for a specific ERC20 token.
# Wallet Swaps
Source: https://docs.moralis.com/data-api/evm/token/swaps/wallet-swaps
/openapi-files/data-api/api.json GET /wallets/{address}/swaps
List all swap transactions (buy/sell) for a specific wallet. Optionally filter by `tokenAddress` for specific token swaps.
# Token Transfers by Contract
Source: https://docs.moralis.com/data-api/evm/token/transfers/token-transfers
/openapi-files/data-api/api.json GET /erc20/{address}/transfers
Get all ERC20 token transfers for a contract, ordered by block number (newest first).
# Token Approvals
Source: https://docs.moralis.com/data-api/evm/wallet/approvals
/openapi-files/data-api/api.json GET /wallets/{address}/approvals
List active ERC20 token approvals for a wallet, showing which contracts have access.
# Wallet Chain Activity
Source: https://docs.moralis.com/data-api/evm/wallet/chain-activity
/openapi-files/data-api/api.json GET /wallets/{address}/chains
List the blockchain networks a wallet is active on, including their first and last seen timestamps. Options to query cross-chain using the `chains` parameter.
# Wallet Transactions (Decoded)
Source: https://docs.moralis.com/data-api/evm/wallet/decoded-transactions
/openapi-files/data-api/api.json GET /{address}/verbose
Get ABI-decoded native transactions ordered by block number in descending order.
# Detailed Positions
Source: https://docs.moralis.com/data-api/evm/wallet/detailed-positions
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/{protocol}/positions
Returns DeFi positions for a wallet address filtered by a specific protocol across specified chains.
# Resolve ENS Domain from Address
Source: https://docs.moralis.com/data-api/evm/wallet/ens-lookup
/openapi-files/data-api/api.json GET /resolve/{address}/reverse
Convert an Ethereum address to its associated ENS domain, if registered.
# Detailed Positions
Source: https://docs.moralis.com/data-api/evm/wallet/legacy/detailed-positions
/openapi-files/data-api/api.json GET /wallets/{address}/defi/{protocol}/positions
Fetch detailed DeFi positions for a given wallet and protocol.
# Token Balances (Legacy)
Source: https://docs.moralis.com/data-api/evm/wallet/legacy/token-balances
/openapi-files/data-api/api.json GET /wallets/{address}/tokens
Fetch ERC20 and native token balances for a given wallet address, including their USD prices. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude spam tokens, low-liquidity tokens and inactive tokens.
This endpoint returns token balances for a single chain per request. We recommend using the new multi-chain [Token Balances](/data-api/evm/wallet/token-balances) endpoint, which returns balances across multiple chains in a single call. All existing filters - spam exclusion, unverified contracts, liquidity thresholds, and USD pricing - are preserved.
# ERC-20 Token Balances (Legacy)
Source: https://docs.moralis.com/data-api/evm/wallet/legacy/token-balances-erc20
/openapi-files/data-api/api.json GET /{address}/erc20
Get an unpaginated list of token balances, without token prices, for a specific wallet address. Maximum of 2,000 tokens. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more.
We recommend using the latest multi-chain [Token Balances](/data-api/evm/wallet/token-balances) endpoint.
# Wallet Positions
Source: https://docs.moralis.com/data-api/evm/wallet/legacy/wallet-positions
/openapi-files/data-api/api.json GET /wallets/{address}/defi/positions
Get a concise overview of a wallet’s DeFi positions across all protocols.
# Wallet Protocols
Source: https://docs.moralis.com/data-api/evm/wallet/legacy/wallet-protocols
/openapi-files/data-api/api.json GET /wallets/{address}/defi/summary
Summarize a wallet’s DeFi activity, including total USD value, unclaimed rewards and active protocols.
# Native Balance
Source: https://docs.moralis.com/data-api/evm/wallet/native-balance
/openapi-files/data-api/api.json GET /{address}/balance
Check the native token balance (e.g. ETH) for a specific wallet.
# Native Balance (Batch)
Source: https://docs.moralis.com/data-api/evm/wallet/native-balances-batch
/openapi-files/data-api/api.json GET /wallets/balances
Retrieve native token balances (e.g. ETH) for one or many wallet addresses in single request.
**Endpoint cost:** 10 CUs per wallet. [Learn more about compute units](/data-api/pricing).
# Wallet Net Worth
Source: https://docs.moralis.com/data-api/evm/wallet/net-worth
/openapi-files/data-api/api.json GET /wallets/{address}/net-worth
Calculate the total net worth of a wallet in USD, with options to exclude spam tokens for accuracy. Options to query cross-chain using the `chains` parameter, as well as additional options to exclude spam tokens, low-liquidity tokens and inactive tokens.
# NFT Balances
Source: https://docs.moralis.com/data-api/evm/wallet/nft-balances
/openapi-files/data-api/api.json GET /{address}/nft
Fetch all NFTs held by a specified wallet address. Use `token_addresses` to filter by one or many specific contract(s). Each NFT returned includes on-chain metadata as well as off-chain metadata, floor prices, rarity and more where available.
# NFT Collections
Source: https://docs.moralis.com/data-api/evm/wallet/nft-collections
/openapi-files/data-api/api.json GET /{address}/nft/collections
Fetch all NFT Collections held by a specified wallet address. Each Collection returned includes on-chain metadata as well as off-chain metadata, floor prices and more where available.
# NFT Trades
Source: https://docs.moralis.com/data-api/evm/wallet/nft-trades-by-wallet
/openapi-files/data-api/api.json GET /wallets/{address}/nfts/trades
Get NFT trades for a specific wallet address.
# NFT Transfers
Source: https://docs.moralis.com/data-api/evm/wallet/nft-transfers
/openapi-files/data-api/api.json GET /{address}/nft/transfers
Get NFT transfers for a wallet, with filters like `contract_addresses` and other parameters. Supports ERC-721, ERC-1155 as well as custom contracts such as CryptoPunks and CryptoKitties.
# Wallet API
Source: https://docs.moralis.com/data-api/evm/wallet/overview
A unified Wallet API to fetch balances, transfers, DeFi positions, PnL, NFTs, and fully decoded wallet activity across multiple chains.
## Overview
The **Wallet API** provides complete wallet intelligence across all activity types - tokens, NFTs, DeFi positions, swaps, and P\&L tracking.
Instead of querying multiple endpoints and aggregating data yourself, the Wallet API gives you a unified view of any wallet's holdings, history, and financial performance across chains.
***
## What Is the Wallet API?
The Wallet API lets you query everything about a wallet address:
* **Asset Holdings** - Token balances, NFT collections, and ownership data
* **Transaction History** - Raw and decoded transactions with human-readable labels
* **DeFi Positions** - Protocol exposure across lending, staking, and liquidity pools
* **Financial Metrics** - Net worth calculations and profit/loss tracking
* **Identity** - ENS name resolution and address labels
* **Approvals** - Token allowances granted to contracts
***
## Key Features
The Wallet API includes:
* **Decoded Transactions** - Human-readable transaction labels and summaries
* **Multi-Chain Support** - Query across all supported EVM chains
* **Net Worth Calculation** - Aggregate USD value of all holdings
* **P\&L Tracking** - Realized and unrealized profit/loss per token
* **Swap History** - DEX trading activity with token pairs and values
* **NFT Trades** - Marketplace activity including buys, sells, and listings
* **Chain Activity** - Identify which chains a wallet is active on
***
## Common Use Cases
The Wallet API is commonly used for:
* **Portfolio Trackers**\
(display holdings, value, and performance)
* **Wallet Explorers**\
(transaction history and activity feeds)
* **DeFi Dashboards**\
(show positions across protocols)
* **Tax Tools**\
(calculate gains/losses from trading)
* **Security Apps**\
(monitor approvals and revoke permissions)
* **Identity Resolution**\
(resolve ENS names and wallet labels)
***
## Popular Endpoints
| Endpoint | Description |
| ----------------------------------------------------------------- | ------------------------------- |
| [Wallet History](/data-api/evm/wallet/wallet-history) | Complete decoded activity feed |
| [Token Balances](/data-api/evm/wallet/token-balances) | Current ERC-20 holdings |
| [NFT Balances](/data-api/evm/wallet/nft-balances) | Current NFT holdings |
| [Net Worth](/data-api/evm/wallet/net-worth) | Total wallet value in USD |
| [Wallet P\&L](/data-api/evm/wallet/wallet-pnl) | Profit/loss per token |
| [Decoded Transactions](/data-api/evm/wallet/decoded-transactions) | Human-readable transaction data |
***
## Get Started
Explore some of the popular Wallet API endpoints:
* [Token Balances](/data-api/evm/wallet/token-balances)
* [NFT Balances](/data-api/evm/wallet/nft-balances)
* [Wallet History](/data-api/evm/wallet/wallet-history)
* [Net Worth](/data-api/evm/wallet/net-worth)
# Resolve Address from ENS Domain
Source: https://docs.moralis.com/data-api/evm/wallet/resolve-address
/openapi-files/data-api/api.json GET /resolve/ens/{domain}
Resolve an ENS domain to its associated Ethereum address.
# Token Balances
Source: https://docs.moralis.com/data-api/evm/wallet/token-balances
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddressOrPublicKey}/tokens
Get token balances from multiple chains for a specific wallet address.
This is the multi-chain Token Balances endpoint. **A single request returns a wallet's token balances across multiple EVM chains** - no more one-call-per-chain stitching. All existing filters (spam exclusion, unverified contracts, liquidity thresholds, USD pricing) are preserved.
The previous single-chain and ERC-20 endpoints are still available under [Legacy](/data-api/evm/wallet/legacy/token-balances).
# Token Transfers
Source: https://docs.moralis.com/data-api/evm/wallet/token-transfers
/openapi-files/data-api/api.json GET /{address}/erc20/transfers
Get all ERC20 token transfers for a given wallet address, sorted by block number (newest first).
# Wallet History
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-history
/openapi-files/data-api/api.json GET /wallets/{address}/history
Get the complete decoded transaction history for a given wallet. All transactions are parsed, decoded, categorized and summarized into human-readable records.
# Wallet Insights
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-insights
/openapi-files/data-api/api.json GET /wallets/{address}/insight
Retrieve comprehensive wallet insight metrics including activity age, transfer counts, counterparties, and swap volume.
# Wallet PnL Breakdown
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-pnl
/openapi-files/data-api/api.json GET /wallets/{address}/profitability
Get a detailed profit and loss breakdown by token for a given wallet, over a specified timeframe (`days`). Optionally filter by `token_addresses` for specific tokens.
# Wallet PnL Summary
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-pnl-summary
/openapi-files/data-api/api.json GET /wallets/{address}/profitability/summary
Get a profit and loss summary for a given wallet, over a specified timeframe (`days`).
# Wallet Positions
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-positions
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/positions
Returns all DeFi positions (lending, liquidity, staking) for a wallet address across specified chains in a unified schema.
# Wallet Protocols
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-protocols
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/summary
Returns a summary of all DeFi positions for a wallet address across specified chains.
# Wallet Stats
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-stats
/openapi-files/data-api/api.json GET /wallets/{address}/stats
Retrieve key statistics for a wallet, such as total transaction count and activity.
# Wallet Swaps
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-swaps
/openapi-files/data-api/api.json GET /wallets/{address}/swaps
List all swap transactions (buy/sell) for a specific wallet. Optionally filter by `tokenAddress` for specific token swaps.
# Wallet Transactions (Raw)
Source: https://docs.moralis.com/data-api/evm/wallet/wallet-transactions
/openapi-files/data-api/api.json GET /{address}
Get raw native transactions ordered by block number in descending order.
# Make Your First Request
Source: https://docs.moralis.com/data-api/first-request
Learn how to get started with the Moralis Data API.
### Your first request
Let's make your first request using the [Wallet API](/data-api/evm/wallet/overview).\
In this example, we'll retrieve **token balances** for a wallet on Ethereum - including **formatted balances, USD values, prices, and metadata** - with a single API call using [Token Balances](/data-api/evm/wallet/token-balances).
### What we'll fetch
* All ERC-20 and native token balances for a wallet
* Enriched data such as token metadata, prices, and USD values
* Normalized output you can use directly in apps or dashboards
### Make the request
```bash cURL theme={null}
curl --request GET \
--url 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/tokens?chain=eth' \
--header 'X-API-Key: YOUR_API_KEY'
```
Replace `YOUR_API_KEY` with the API key from your [Moralis dashboard](/data-api/get-your-api-key).
### Response
The API returns a JSON object containing the wallet's token balances. Each entry includes balances, prices, USD values, and security metadata.
```json Response (JSON) expandable theme={null}
{
"cursor": null,
"page": 0,
"page_size": 100,
"block_number": 23998783,
"result": [
{
"token_address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"symbol": "ETH",
"name": "Ether",
"logo": "https://cdn.moralis.io/eth/0x.png",
"thumbnail": "https://cdn.moralis.io/eth/0x_thumb.png",
"decimals": 18,
"balance": "1709495362615127",
"possible_spam": false,
"verified_contract": true,
"total_supply": null,
"total_supply_formatted": null,
"percentage_relative_to_total_supply": null,
"security_score": 99,
"balance_formatted": "0.001709495362615127",
"usd_price": 3074.275584969874,
"usd_price_24hr_percent_change": -4.046936070446101,
"usd_price_24hr_usd_change": -129.54660056550028,
"usd_value": 5.255459855906907,
"usd_value_24hr_usd_change": -0.22145931290927692,
"native_token": true,
"portfolio_percentage": 57.264259068625606
},
{
"token_address": "0x4fabb145d64652a948d72533023f6e7a623c7c53",
"symbol": "BUSD",
"name": "BUSD",
"logo": "https://logo.moralis.io/0x1_0x4fabb145d64652a948d72533023f6e7a623c7c53_05b49a8d713a42d99fc194279df539e7.png",
"thumbnail": "https://logo.moralis.io/0x1_0x4fabb145d64652a948d72533023f6e7a623c7c53_05b49a8d713a42d99fc194279df539e7.png",
"decimals": 18,
"balance": "2102143890000000000",
"possible_spam": false,
"verified_contract": true,
"total_supply": "55026240205945520000000000",
"total_supply_formatted": "55026240.20594552",
"percentage_relative_to_total_supply": 0.000003820257175726,
"security_score": 76,
"balance_formatted": "2.10214389",
"usd_price": 0.9966474180866458,
"usd_price_24hr_percent_change": -0.33116797769114314,
"usd_price_24hr_usd_change": -0.0033115438720600077,
"usd_value": 2.0950962804151176,
"usd_value_24hr_usd_change": -0.006961341717117886,
"native_token": false,
"portfolio_percentage": 22.82847542647662
},
{},
{}
]
}
```
### What you get
With a single request, Moralis provides:
* **Low-latency access** to onchain wallet data
* **Normalized balances** across tokens
* **Enriched pricing and USD values**
* **Token metadata and security signals**
* Production-ready responses for apps and analytics
No RPC calls, no custom indexing, no manual price joins.
### Next steps
* Explore more endpoints in the **Wallet API**
* Fetch **NFT balances** or **transaction history**
* Combine with **Streams** to react to wallet activity in real time
* Use **Datashare** or **Data Indexer** for large-scale analytics
# Get Your API Key
Source: https://docs.moralis.com/data-api/get-your-api-key
Learn how to get your Moralis API Key
To start using Moralis products, you’ll need an API key to authenticate your requests.
Follow this quick guide to create your account and retrieve your API key- then you'll be ready to make your [first request](/data-api/first-request).
## 1. Create Your Account
Sign up for a **free Moralis account** by visiting the [Moralis Dashboard](https://admin.moralis.com/register).
## 2. Navigate to Data APIs
Once registered, navigate to the [Data APIs section](https://admin.moralis.com/data-api) in the dashboard.
## 3. Copy Your API Key
Click the **copy** icon next to your API key to add it to your clipboard.
## 4. Manage API keys (optional)
You can also manage your keys from the **API Keys** section - including creating new keys or rotating existing ones.
That's it - you're now ready to make your [first API request](/data-api/first-request)
# Performance
Source: https://docs.moralis.com/data-api/introduction/resources/performance-and-reliability
Performance characteristics of Moralis APIs, including latency percentiles, supported request rates, data freshness, uptime, and enterprise SLAs.
This page outlines the **real-world performance characteristics** of Moralis APIs, including **latency**, **request throughput**, **data freshness**, and **availability**.
The figures below reflect typical production behavior under normal load and are intended to help teams design and operate reliable systems.
***
## API Latency
Moralis APIs are optimized for **low-latency, high-throughput** access to blockchain data.
Typical response times across core read endpoints:
| Percentile | Latency |
| :--------- | :------------ |
| **p50** | **\< 50 ms** |
| **p90** | **\< 500 ms** |
| **p95** | **\< 1 s** |
Latency may vary based on:
* Endpoint complexity
* Chain and network conditions
* Result size and pagination
* Applied enrichment (decoding, pricing, analytics)
***
## Throughput & Request Rates
Moralis supports **high sustained request volumes** for production workloads.
* **1,000+ requests per second (RPS)** is supported on appropriate plans
* Throughput is governed by **Compute Units (CUs)** and plan-level limits
* Short bursts are supported within rolling rate-limit windows
* Enterprise customers can request **custom throughput limits** and dedicated capacity
For plan-specific limits, see:
* [**Rate Limits**](/data-api/resources/rate-limits)
* [**Pricing**](/data-api/pricing)
***
## Data Freshness
Data freshness reflects how quickly new on-chain activity becomes available via the API.
Typical freshness for indexed on-chain data:
| Percentile | Freshness |
| :--------- | :--------- |
| **p50** | **\< 4 s** |
| **p90** | **\< 8 s** |
Notes:
* Blocks, transactions, and transfers are indexed near real time
* Price and market data update continuously
* Derived metrics (holders, analytics, PnL) may lag slightly during periods of high activity
***
## Availability & Uptime
Moralis operates production infrastructure **24/7/365**.
* **Enterprise customers** are supported with a **24/7/365 SLA**
* Platform uptime and incident history are publicly available at:\
[**status.moralis.io**](http://status.moralis.io)
# Premium Endpoints
Source: https://docs.moralis.com/data-api/introduction/resources/premium-endpoints
Endpoints that require a Pro plan or above to access.
## Overview
Premium endpoints provide access to advanced analytics, market metrics, and token discovery features. These endpoints require an API key on the **Pro plan** or above.
***
## Token Analytics
| Endpoint | Method | Path | CUs |
| ---------------------------------------------------------------------------------------------- | ------ | ----------------------------------------- | --- |
| [Token Score](/data-api/evm/token/metadata/token-score) | GET | `/tokens/{tokenAddress}/score` | 100 |
| [Token Score - Timeseries](/data-api/evm/token/metadata/token-score-timeseries) | GET | `/tokens/{tokenAddress}/score/historical` | 150 |
| [Token Analytics (Batch)](/data-api/universal/token/analytics/token-analytics-multi) | POST | `/tokens/analytics` | 150 |
| [Token Analytics - Timeseries](/data-api/universal/token/analytics/token-analytics-timeseries) | POST | `/tokens/analytics/timeseries` | 200 |
***
## Token Discovery
| Endpoint | Method | Path | CUs |
| ------------------------------------------------------------------ | ------ | ------------------------------- | --- |
| [Token Search](/data-api/universal/token/search/token-search) | GET | `/tokens/search` | 150 |
| [Filtered Tokens](/data-api/universal/token/filtered-tokens) | POST | `/discovery/tokens` | 250 |
| [Top Gainers](/data-api/universal/token/top-gainers) | GET | `/discovery/tokens/top-gainers` | 250 |
| [Top Losers](/data-api/universal/token/top-losers) | GET | `/discovery/tokens/top-losers` | 250 |
| [Token Categories](/data-api/evm/token/discovery/token-categories) | GET | `/tokens/categories` | 10 |
| [Trending Tokens](/data-api/universal/token/trending-tokens) | GET | `/tokens/trending` | 150 |
***
## Volume & Market Metrics
| Endpoint | Method | Path | CUs |
| ------------------------------------------------------------------------------------------------------- | ------ | --------------------------------- | --- |
| [Chain Metrics](/data-api/universal/global/endpoints/trading-stats) | GET | `/volume/chains` | 150 |
| [Chain Metrics - Timeseries](/data-api/universal/global/endpoints/trading-stats-timeseries) | GET | `/volume/timeseries` | 150 |
| [Category Metrics](/data-api/universal/global/endpoints/trading-stats-category) | GET | `/volume/categories` | 150 |
| [Category Metrics - Timeseries](/data-api/universal/global/endpoints/trading-stats-category-timeseries) | GET | `/volume/timeseries/{categoryId}` | 150 |
***
## Upgrade to Pro
To access premium endpoints, upgrade your plan at [admin.moralis.io](https://admin.moralis.io).
# Onchain Skills
Source: https://docs.moralis.com/data-api/onchain-skills/overview
Give your AI agent the ability to query blockchain data using Moralis APIs. Works with Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, Codex, Gemini, and more.
## What are Onchain Skills?
Onchain Skills is an open-source package that lets AI agents call the [Moralis API](https://admin.moralis.com/register) directly — giving them the ability to query blockchain data from 40+ EVM chains and Solana in real time.
It works with any agent that supports the [Agent Skills](https://skills.sh/) standard, including **Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, Codex, Gemini**, and 18+ others.
***
## Quick Start
### 1. Install the Skills
```bash theme={null}
npx skills add MoralisWeb3/onchain-skills
```
### 2. Set Your API Key
Get your key from [admin.moralis.com](https://admin.moralis.com/register), then add it to a `.env` file in your project root:
```bash theme={null}
echo "MORALIS_API_KEY=your_key_here" >> .env
```
That's it — your AI agent can now query blockchain data through Moralis.
***
## Skills Overview
Onchain Skills includes three skills:
| Skill | Description | Endpoints |
| ----------------------- | ---------------------------------------------- | --------- |
| **moralis-data-api** | EVM + Solana blockchain data | 136 |
| **moralis-streams-api** | Real-time event monitoring with webhooks | 20 |
| **learn-moralis** | Routing, FAQ, pricing, and capability guidance | — |
### moralis-data-api
Unified skill for all blockchain data queries. Auto-detects EVM vs Solana from address format. For EVM addresses without a specified chain, defaults to Ethereum.
**136 endpoints** (102 EVM + 34 Solana) across these categories:
* **Wallet** (17) — balances, tokens, NFTs, history, profitability, net worth
* **Token** (22) — prices, metadata, pairs, DEX swaps, analytics, security scores, snipers
* **NFT** (22) — metadata, transfers, traits, rarity, floor prices, trades
* **DeFi** (3) — protocol positions, liquidity, exposure
* **Entity** (2) — labeled addresses (exchanges, funds, whales)
* **Price** (4) — OHLCV, token prices, pair prices
* **Blockchain** (5) — blocks, transactions, date-to-block
* **Discovery** (13) — trending tokens, market movers, top gainers/losers
* **Other** (14) — address resolution, token search, bonding, candlesticks, graduated tokens
* **Solana** (34) — native Solana endpoints + EVM endpoints with Solana support
**Example prompts:**
```
/moralis-data-api Get the balance of 0x1234...
/moralis-data-api Get the balance of 0x1234... on Polygon
/moralis-data-api Get the balance of Solana wallet ABC123...
```
### moralis-streams-api
Real-time blockchain event monitoring with webhooks. **20 endpoints** for creating, managing, and monitoring streams.
**Stream types:** `tx`, `log`, `erc20transfer`, `erc20approval`, `nfttransfer`, `internalTx`
**Example prompts:**
```
/moralis-streams-api Create a stream to monitor all ERC20 transfers on Ethereum
/moralis-streams-api Pause the stream with ID abc123
```
### learn-moralis
Knowledge-only skill for answering general questions about Moralis. Routes you to the correct technical skill after answering.
**Example prompts:**
```
/learn-moralis What is Moralis?
/learn-moralis Which Moralis API should I use for tracking wallet activity?
```
***
## Supported Chains
**EVM (40+):** Ethereum, Polygon, BNB Smart Chain, Arbitrum, Optimism, Avalanche, Fantom, Base, Sei, Monad, and more.
**Solana:** Mainnet and Devnet.
For the full list of supported chains, see [Supported Chains](/get-started/supported-chains).
***
## Architecture
* **Zero dependencies** — all API calls use curl
* **Works with 18+ agents** — any agent supporting the Agent Skills standard
* **Auto-detects chain** — determines EVM vs Solana from address format
***
## Resources
* [GitHub Repository](https://github.com/MoralisWeb3/onchain-skills)
* [Get an API Key](https://admin.moralis.com/register)
* [Agent Skills Standard](https://skills.sh/)
* [Video Tutorial: Build Web3 Apps With AI Using Real Onchain Data](https://www.youtube.com/watch?v=hq-SlxYji4w)
# Tutorial
Source: https://docs.moralis.com/data-api/onchain-skills/tutorial
Step-by-step guide to installing and using Moralis Onchain Skills with your AI agent.
## Video Tutorial
Watch the full walkthrough on setting up and using Onchain Skills to build Web3 apps with AI:
***
## Prerequisites
* **Node.js** installed on your machine
* A **Moralis API key** — get one free at [admin.moralis.com](https://admin.moralis.com/register)
* An AI agent that supports the [Agent Skills](https://skills.sh/) standard (e.g., Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, Codex, Gemini)
***
## Step 1: Install Onchain Skills
Run the following command in your project directory:
```bash theme={null}
npx skills add MoralisWeb3/onchain-skills
```
This installs three skills into your project:
* **moralis-data-api** — query blockchain data (136 endpoints)
* **moralis-streams-api** — real-time event monitoring (20 endpoints)
* **learn-moralis** — general Moralis knowledge and routing
### Alternative Installation Methods
**Via [ClawHub](https://clawhub.ai/):**
```bash theme={null}
clawhub install moralis-data-api
clawhub install moralis-streams-api
clawhub install learn-moralis
```
**Via OpenClaw agent:** If you have an [OpenClaw](https://openclaw.ai/) agent running, ask it to search for and install the Moralis API skills from ClawHub.
***
## Step 2: Configure Your API Key
Add your Moralis API key to a `.env` file in your project root:
```bash theme={null}
echo "MORALIS_API_KEY=your_key_here" >> .env
```
Replace `your_key_here` with your actual API key from [admin.moralis.com](https://admin.moralis.com/register).
Without the API key, the skills cannot call the Moralis API on your behalf.
**For OpenClaw users**, add the key to the `env` section in `~/.openclaw/openclaw.json` instead:
```json theme={null}
{
"env": {
"MORALIS_API_KEY": "your_key_here"
}
}
```
***
## Step 3: Start Using Skills
Once installed and configured, you can prompt your AI agent with skill-specific commands. Prefix your prompt with the skill name to load it directly.
### Query Blockchain Data
```
/moralis-data-api Get the token balances of 0x1234...
```
```
/moralis-data-api What are the top trending tokens on Ethereum?
```
```
/moralis-data-api Get the NFT collections owned by 0x1234...
```
### Monitor Real-Time Events
```
/moralis-streams-api Create a stream to monitor all ERC20 transfers on Ethereum
```
```
/moralis-streams-api List all my active streams
```
### Ask General Questions
```
/learn-moralis What chains does Moralis support?
```
```
/learn-moralis Which API should I use for tracking wallet activity?
```
***
## What's Next?
* Explore the full list of available endpoints in the [Onchain Skills Overview](/data-api/onchain-skills/overview)
* Browse the [EVM API](/data-api/evm) and [Solana API](/data-api/solana) documentation for detailed endpoint references
* Check out the [GitHub repository](https://github.com/MoralisWeb3/onchain-skills) for source code and contributions
# Data API
Source: https://docs.moralis.com/data-api/overview
The universal multichain Data API provides a single, consistent interface for accessing blockchain data across 30+ supported chains, including Ethereum, Solana, Base, Binance Smart Chain, and more. It standardizes complex on-chain data into clean, developer-friendly formats.
### How it's structured
The Data API is made up of **three core components**, designed to balance **cross-chain consistency** with **chain-specific depth**:
#### Universal API
Our [Universal API](/data-api/universal/overview) supports cross-chain endpoints that work across **EVM and Solana**, using unified schemas wherever possible. Ideal for applications that need to support multiple chains without maintaining separate integrations.
#### EVM API
The [EVM API](/data-api/evm/overview) offers deep, EVM-specific APIs covering Ethereum and EVM-compatible chains, exposing rich transaction, token, NFT, DeFi, and contract-level data.
#### Solana API
Our [Solana API](/data-api/solana/solana-index) provides parsed, high-performance access to Solana transactions, programs, token accounts, and NFTs, designed around Solana’s unique architecture.
### Explore Data APIs
Wallet history, transfers balances, tokens and PnL.
Token search, balances, transfers, holders and swaps.
Metadata, floor prices, transfers and ownership.
Real-time crypto prices, OHLC, trading volume.
DeFi positions, liquidity, reserves and token pairs.
Raw blocks, transactions, internal transactions and logs.
### Types of use cases
* Building wallets and portfolio trackers
* Powering Web3 dashboards and analytics tools
* Supporting multi-chain dApps from a single backend
* Tracking wallet activity, balances, and history
* Token discovery, monitoring, and market analysis
* NFT marketplaces and NFT analytics platforms
* DeFi apps showing positions, liquidity, and protocol data
* Backend services that need low-latency blockchain reads
### Key features
* **Low-latency APIs** optimized for production workloads
* **Unified schemas** across EVM and Solana where possible
* **Decoded and enriched data** (tokens, NFTs, prices, metadata)
* **Multi-chain support** across 30+ blockchains
* **High throughput & reliability** at scale
* **Consistent developer experience** across chains
* **Enterprise-grade infrastructure**, SLAs, and security
* No RPC management or custom indexer maintenance
### For which teams
* **Product teams** building wallets, dashboards, and user-facing apps
* **Backend engineers** who need reliable blockchain data without infra overhead
* **Frontend teams** consuming clean, predictable APIs
* **Analytics teams** accessing structured on-chain data
* **Startups and enterprises** scaling multi-chain applications
***
## Data API Overview Video
# Data API Pricing
Source: https://docs.moralis.com/data-api/pricing
Detailed pricing information for our Data API.
For a detailed explanation of Compute Units (CUs) and how they work, check out our [Compute Units section](/get-started/pricing).
***
## Universal API Compute Units
These endpoints support both EVM and Solana chains.
### Token Discovery & Analytics
| Method | CU Cost |
| --------------------------------------------------------------------------------------------- | ------- |
| [searchTokens](/data-api/universal/token/search/token-search) | 150 |
| [getTokenScore](/data-api/universal/token/score/token-score) | 100 |
| [getHistoricalTokenScore](/data-api/universal/token/score/token-score-timeseries) | 150 |
| [getTokenAnalytics](/data-api/universal/token/analytics/token-analytics) | 80 |
| [getMultipleTokenAnalytics](/data-api/universal/token/analytics/token-analytics-multi) | 150 |
| [getTimeSeriesTokenAnalytics](/data-api/universal/token/analytics/token-analytics-timeseries) | 200 |
| [getFilteredTokens](/data-api/universal/token/filtered-tokens) | 250 |
| [getTopGainersTokens](/data-api/universal/token/top-gainers) | 250 |
| [getTopLosersTokens](/data-api/universal/token/top-losers) | 250 |
| [getTrendingTokens](/data-api/universal/token/trending-tokens) | 150 |
### Entity API
| Method | CU Cost |
| -------------------------------------------------------------------------------- | ------- |
| [searchEntities](/data-api/universal/entity/endpoints/entity-search) | 50 |
| [getEntity](/data-api/universal/entity/endpoints/entity-by-id) | 50 |
| [getEntitiesByCategory](/data-api/universal/entity/endpoints/entity-by-category) | 50 |
| [getEntityCategories](/data-api/universal/entity/endpoints/entity-categories) | 10 |
### Volume & Market Data
| Method | CU Cost |
| ------------------------------------------------------------------------------------------------------- | ------- |
| [getVolumeStatsByChain](/data-api/universal/global/endpoints/trading-stats) | 150 |
| [getVolumeStatsByCategory](/data-api/universal/global/endpoints/trading-stats-category) | 150 |
| [getTimeSeriesVolume](/data-api/universal/global/endpoints/trading-stats-timeseries) | 150 |
| [getTimeSeriesVolumeByCategory](/data-api/universal/global/endpoints/trading-stats-category-timeseries) | 150 |
***
## EVM API Compute Units
### Wallet API
| Method | CU Cost |
| --------------------------------------------------------------------------- | ------------- |
| [getWalletHistory](/data-api/evm/wallet/wallet-history) | 150 |
| [getWalletStats](/data-api/evm/wallet/wallet-stats) | 50 |
| [getWalletActiveChains](/data-api/evm/wallet/chain-activity) | 50 per chain |
| [getWalletTokenBalancesPrice](/data-api/evm/wallet/token-balances) | 100 |
| [getWalletTokenBalances](/data-api/evm/wallet/legacy/token-balances-erc20) | 100 |
| [getNativeBalance](/data-api/evm/wallet/native-balance) | 10 |
| [getNativeBalancesForAddresses](/data-api/evm/wallet/native-balances-batch) | 10 per wallet |
| [getWalletNFTs](/data-api/evm/wallet/nft-balances) | 50 |
| [getWalletNFTCollections](/data-api/evm/wallet/nft-collections) | 50 |
| [getWalletNFTTransfers](/data-api/evm/wallet/nft-transfers) | 50 |
| [getNFTTradesByWallet](/data-api/evm/wallet/nft-trades-by-wallet) | 40 |
| [getWalletTokenTransfers](/data-api/evm/wallet/token-transfers) | 50 |
| [getWalletTransactions](/data-api/evm/wallet/wallet-transactions) | 30 |
| [getWalletTransactionsVerbose](/data-api/evm/wallet/decoded-transactions) | 50 |
| [getWalletApprovals](/data-api/evm/wallet/approvals) | 100 |
| [getWalletNetWorth](/data-api/evm/wallet/net-worth) | 250 per chain |
| [getWalletProfitability](/data-api/evm/wallet/wallet-pnl) | 50 |
| [getWalletProfitabilitySummary](/data-api/evm/wallet/wallet-pnl-summary) | 30 |
| [getDefiSummary](/data-api/evm/wallet/wallet-protocols) | 5000 |
| [getDefiPositionsSummary](/data-api/evm/wallet/wallet-positions) | 5000 |
| [getDefiPositionsByProtocol](/data-api/evm/wallet/detailed-positions) | 5000 |
| [getSwapsByWalletAddress](/data-api/evm/wallet/wallet-swaps) | 50 |
| [resolveENSDomain](/data-api/evm/wallet/ens-lookup) | 10 |
| [resolveAddress](/data-api/evm/wallet/resolve-address) | 10 |
| [getWalletInsight](/data-api/evm/wallet/wallet-insights) | 100 per chain |
### Token API
| Method | CU Cost |
| --------------------------------------------------------------------------------- | ------- |
| [getTokenMetadata](/data-api/evm/token/metadata/token-metadata) | 10 |
| [getTokenPrice](/data-api/evm/token/prices/token-price) | 50 |
| [getMultipleTokenPrices](/data-api/evm/token/prices/token-prices-batch) | 100 |
| [getPairCandlesticks](/data-api/evm/token/prices/ohlc) | 150 |
| [getTokenScore](/data-api/evm/token/metadata/token-score) | 100 |
| [getHistoricalTokenScore](/data-api/evm/token/metadata/token-score-timeseries) | 150 |
| [getTokenHolders](/data-api/evm/token/holders/token-holders) | 50 |
| [getHistoricalTokenHolders](/data-api/evm/token/holders/historical-token-holders) | 50 |
| [getTokenStats](/data-api/evm/token/holders/token-holder-stats) | 50 |
| [getTokenTransfers](/data-api/evm/token/transfers/token-transfers) | 50 |
| [getTokenPairs](/data-api/evm/token/swaps/token-pairs) | 50 |
| [getSwapsByTokenAddress](/data-api/evm/token/swaps/token-swaps) | 50 |
| [getSwapsByPairAddress](/data-api/evm/token/swaps/pair-swaps) | 50 |
| [getPairStats](/data-api/evm/token/swaps/pair-stats) | 100 |
| [getSnipersByPairAddress](/data-api/evm/token/signals/snipers) | 50 |
| [getTopProfitableWalletPerToken](/data-api/evm/token/signals/top-traders) | 50 |
| [getTokenCategories](/data-api/evm/token/discovery/token-categories) | 10 |
| [getFilteredTokens](/data-api/evm/token/discovery/filtered-tokens) | 250 |
| [getTopGainersTokens](/data-api/evm/token/discovery/top-gainers) | 250 |
| [getTopLosersTokens](/data-api/evm/token/discovery/top-losers) | 250 |
### NFT API
| Method | CU Cost |
| ------------------------------------------------------------------------------------------- | ------- |
| [getNFTMetadata](/data-api/evm/nft/metadata/nft-metadata) | 20 |
| [getMultipleNFTs](/data-api/evm/nft/metadata/nft-metadata-batch) | 150 |
| [getNFTContractMetadata](/data-api/evm/nft/metadata/collection-metadata) | 50 |
| [getNFTBulkContractMetadata](/data-api/evm/nft/metadata/collection-metadata-batch) | 5 |
| [getNFTCollectionStats](/data-api/evm/nft/metadata/collection-stats) | 50 |
| [getNFTFloorPriceByToken](/data-api/evm/nft/prices/floor) | 30 |
| [getNFTFloorPriceByContract](/data-api/evm/nft/prices/collection-floor-price) | 30 |
| [getNFTHistoricalFloorPriceByContract](/data-api/evm/nft/prices/historical-floor-price) | 50 |
| [getNFTSalePrices](/data-api/evm/nft/prices/sale-price-by-token-id) | 30 |
| [getNFTContractSalePrices](/data-api/evm/nft/prices/sale-price-by-contract) | 1 |
| [getNFTTrades](/data-api/evm/nft/trades/collection-trades) | 40 |
| [getNFTTradesByToken](/data-api/evm/nft/trades/trades-by-token-id) | 40 |
| [getNFTOwners](/data-api/evm/nft/ownership/owners-by-contract) | 50 |
| [getNFTTokenIdOwners](/data-api/evm/nft/ownership/owners-by-token-id) | 50 |
| [getNFTContractTransfers](/data-api/evm/nft/transfers/collection-transfers) | 50 |
| [getNFTTransfers](/data-api/evm/nft/transfers/token-id-transfers) | 20 |
| [getNFTTraitsByCollection](/data-api/evm/nft/traits/traits-by-collection) | 50 |
| [getNFTTraitsByCollectionPaginate](/data-api/evm/nft/traits/traits-by-collection-paginated) | 10 |
| [getNFTByContractTraits](/data-api/evm/nft/traits/nfts-by-traits) | 50 |
| [getTopNFTCollectionsByMarketCap](/data-api/evm/nft/discovery/nfts-by-market-cap) | 200 |
| [getHottestNFTCollectionsByTradingVolume](/data-api/evm/nft/discovery/nfts-by-volume) | 200 |
| [reSyncMetadata](/data-api/evm/nft/utilities/resync-nft-metadata) | 50 |
| [resyncNFTRarity](/data-api/evm/nft/utilities/resync-nft-traits) | 10 |
### Price API
| Method | CU Cost |
| ---------------------------------------------------------------------------------- | ------- |
| [getTokenPrice](/data-api/evm/price/token-price) | 50 |
| [getMultipleTokenPrices](/data-api/evm/price/token-prices-batch) | 100 |
| [getPairCandlesticks](/data-api/evm/price/ohlc) | 150 |
| [getNFTFloorPriceByToken](/data-api/evm/price/token-id-floor-price) | 30 |
| [getNFTFloorPriceByContract](/data-api/evm/price/collection-floor-price) | 30 |
| [getNFTHistoricalFloorPriceByContract](/data-api/evm/price/timeseries-floor-price) | 50 |
| [getNFTSalePrices](/data-api/evm/price/sale-price-by-token-id) | 30 |
| [getNFTContractSalePrices](/data-api/evm/price/sale-prices-by-collection) | 1 |
### DeFi API
| Method | CU Cost |
| -------------------------------------------------------------------------- | ------- |
| [getDefiSummary](/data-api/evm/defi/wallet-protocols) | 5000 |
| [getDefiPositionsSummary](/data-api/evm/defi/wallet-positions) | 5000 |
| [getDefiPositionsByProtocol](/data-api/evm/defi/wallet-positions-detailed) | 5000 |
### Blockchain API
| Method | CU Cost |
| ------------------------------------------------------------------------------------- | ------- |
| [getWalletTransactions](/data-api/evm/blockchain/address-transactions) | 30 |
| [getWalletTransactionsVerbose](/data-api/evm/blockchain/address-transactions-decoded) | 50 |
| [getDateToBlock](/data-api/evm/blockchain/block-by-date) | 1 |
| [getBlock](/data-api/evm/blockchain/block-by-hash) | 100 |
| [getLatestBlockNumber](/data-api/evm/blockchain/latest-block) | 10 |
| [getTransaction](/data-api/evm/blockchain/transaction-by-hash) | 10 |
| [getTransactionVerbose](/data-api/evm/blockchain/transaction-by-hash-decoded) | 20 |
***
## Solana API Compute Units
### Wallet API
| Method | CU Cost |
| --------------------------------------------------------------- | ------- |
| [balance](/data-api/solana/wallet/native-balance) | 10 |
| [getSPL](/data-api/solana/wallet/token-balances) | 10 |
| [getNFTs](/data-api/solana/wallet/nft-balances) | 10 |
| [getPortfolio](/data-api/solana/wallet/portfolio) | 10 |
| [getSwapsByWalletAddress](/data-api/solana/wallet/wallet-swaps) | 50 |
### Token API
| Method | CU Cost |
| ----------------------------------------------------------------------------------------------------- | ------- |
| [getTokenMetadata](/data-api/solana/token/token-metadata) | 10 |
| [getMultipleTokenMetadata](/data-api/solana/token/token-metadata-batch) | 100 |
| [getTokenScore](/data-api/solana/token/token-score) | 100 |
| [getHistoricalTokenScore](/data-api/solana/token/token-score-timeseries) | 150 |
| [getTokenPrice](/data-api/solana/token/prices/token-price) | 10 |
| [getMultipleTokenPrices](/data-api/solana/token/prices/token-prices-batch) | 100 |
| [getCandleSticks](/data-api/solana/token/prices/ohlc) | 150 |
| [getTopHolders](/data-api/solana/token/holders/top-holders) | 50 |
| [getHistoricalTokenHolders](/data-api/solana/token/holders/historical-holders) | 50 |
| [getTokenHolders](/data-api/solana/token/holders/holder-metrics) | 50 |
| [getTokenPairs](/data-api/solana/token/pairs/token-pairs) | 50 |
| [getSwapsByTokenAddress](/data-api/solana/token/swaps/token-swaps) | 50 |
| [getSwapsByPairAddress](/data-api/solana/token/pairs/pair-swaps) | 50 |
| [getPairStats](/data-api/solana/token/pairs/pair-stats) | 100 |
| [getAggregatedTokenPairStats](/data-api/solana/token/market-metrics/token-analytics) | 80 |
| [getSnipersByPairAddress](/data-api/solana/token/advanced-signals/snipers) | 50 |
| [getNewTokensByExchange](/data-api/solana/token/search-and-discovery/pump-fun-new-tokens) | 50 |
| [getGraduatedTokensByExchange](/data-api/solana/token/search-and-discovery/pump-fun-graduated-tokens) | 50 |
| [getBondingTokensByExchange](/data-api/solana/token/search-and-discovery/pump-fun-bonding-tokens) | 50 |
| [getTokenBondingStatus](/data-api/solana/token/search-and-discovery/pump-fun-bonding-status) | 20 |
### NFT API
| Method | CU Cost |
| --------------------------------------------------- | ------- |
| [getNFTMetadata](/data-api/solana/nft/nft-metadata) | 10 |
### Price API
| Method | CU Cost |
| ------------------------------------------------------------------- | ------- |
| [getTokenPrice](/data-api/solana/price/token-price) | 10 |
| [getMultipleTokenPrices](/data-api/solana/price/token-prices-batch) | 100 |
| [getCandleSticks](/data-api/solana/price/ohlc) | 150 |
# Pagination
Source: https://docs.moralis.com/data-api/resources/pagination
Moralis uses cursor-based pagination for endpoints that return lists (e.g. transactions, transfers, logs, NFTs, etc.).
Pagination lets an API return large result sets in smaller “pages” so responses stay fast and predictable.
Moralis uses **cursor-based pagination** for endpoints that return lists (e.g. transactions, transfers, logs, NFTs, etc.).
## Cursor Pagination
Cursor pagination works by returning a **cursor token** with each response. You pass that cursor into the next request to fetch the next page.
* **First request:** returns `result` + `cursor`
* **Next request:** send the returned `cursor` to get the next page
* When there are no more results, the cursor will be `null`
Cursor pagination is ideal for long lists because performance stays consistent even at large offsets.
## Cursor Pagination in Moralis
Moralis returns a cursor with list endpoints. Keep calling the endpoint with the latest cursor until no cursor is returned.
**Important notes**
* `limit` can only be set on the **initial request**. You can’t change the limit mid-pagination (because the cursor is tied to the original query settings).
* A cursor represents a **stable snapshot of the dataset at the time your first request was made** (a “point in time”).
## Snapshot Behavior (No Duplicates Across Pages)
When you paginate using a cursor, Moralis keeps the ordering consistent across pages for that pagination session.
Example: if you’re fetching “latest wallet transactions” and **new transactions occur while you’re paging**, those new transactions:
* **will not** reshuffle the pages you’re currently fetching
* **will not** cause items from page 1 to appear again on page 2
* **will not** be included in the current cursor run
If you want **new / delta results**, you should **start a new request** (i.e., re-call the endpoint without the old cursor) after you finish paging, or periodically re-poll from the top depending on your use case.
## Example: Cursor Pagination
Below is a simple Node.js example showing how to page through all results using a cursor.
This example:
* Makes an initial request with a `limit`
* Reuses the returned `cursor` to fetch the next page
* Stops when no cursor is returned
* Uses plain `fetch`
```typescript theme={null}
const fetch = require("node-fetch");
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://deep-index.moralis.io/api/v2.2";
const address = "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB";
const chain = "eth";
const limit = 100;
async function fetchAllPages() {
let cursor = null;
let allResults = [];
do {
const url = new URL(`${BASE_URL}/nft/${address}/owners`);
url.searchParams.set("chain", chain);
url.searchParams.set("limit", limit);
if (cursor) {
url.searchParams.set("cursor", cursor);
}
const res = await fetch(url.toString(), {
headers: {
"X-API-Key": API_KEY,
},
});
const data = await res.json();
allResults.push(...data.result);
cursor = data.cursor; // null / empty when no more pages
} while (cursor);
return allResults;
}
fetchAllPages().then((results) => {
console.log("Total records:", results.length);
});
```
# Rate Limits
Source: https://docs.moralis.com/data-api/resources/rate-limits
Moralis APIs use a throughput-based rate-limiting system, measured in requests per second.
Each plan defines how many requests you can send per second. If you exceed this, requests will be rate-limited.
## Throughput & Rolling Window
Throughput limits are evaluated over a **rolling 4-second window**, not per exact second.
This allows short request bursts, as long as your total request count stays within your plan's limits over that window.
## Maximum requests per second
| Plan | Throughput |
| :--------- | :--------- |
| Free | 40 reqs/s |
| Starter | 40 reqs/s |
| Pro | 80 reqs/s |
| Business | 200 reqs/s |
| Enterprise | Custom |
## Avoiding Rate Limits
To avoid rate limiting:
* Keep your request rate within your plan's throughput
* Avoid sustained spikes that exceed the rolling 4-second limit
* Upgrade your plan if you consistently hit limits
If you exceed your throughput, the API will return a **429 Too Many Requests** response.
# Response Codes
Source: https://docs.moralis.com/data-api/resources/response-codes
Moralis uses conventional HTTP response codes to indicate success or failure of an API request.
| Status Code | Message | Description |
| ----------- | --------------------- | ------------------------------------------------------------------------------ |
| 200 | OK | Everything worked as expected. |
| 201 | Created | Resource has been successfully created or added to a queue. |
| 202 | Accepted | Resource has been successfully created or added to a queue. |
| 400 | Bad Request | Bad request, often due to missing or malformed parameter(s). |
| 401 | Unauthorized | Missing or invalid API key. |
| 404 | Not Found | Resource not found (for example pair or token not found for a specific chain). |
| 429 | Rate Limited | Too many requests. Consider upgrading your plan. |
| 500 | Internal Server Error | Something went wrong on Moralis' end. |
# Spam Filtering
Source: https://docs.moralis.com/data-api/resources/spam-filtering
Spam detection helps you identify and handle potentially harmful contracts in the Web3 ecosystem, in real time.
Our spam filtering is designed to protect applications and end users from interacting with spam, phishing, or low-quality token and NFT contracts.
## How It Works
Moralis automatically evaluates contracts as they are processed onchain.
For both **ERC20 tokens** and **NFT contracts**, Moralis adds a boolean field:
```
"possible_spam": true | false
```
This field indicates whether a contract is **likely to be spam or malicious**.
Spam detection is applied **in real time** as part of contract metadata processing (e.g. name, symbol, decimals, NFT metadata).
## Detection Logic
Spam detection is based on multiple internal signals, including:
* Keyword-based matching across contract metadata
* Known spam and phishing patterns
* Heuristic analysis from historical onchain behavior
Detection rules are continuously updated as new spam patterns emerge.
## Using Spam Detection
You can use the `possible_spam` field to:
* Hide suspicious tokens or NFTs from your UI
* Warn users before interacting with risky contracts
* Filter out spam from analytics, balances, or portfolios
Many Moralis endpoints (such as [Token Balances](/data-api/evm/wallet/token-balances)) support **excluding spam contracts** directly at query time.
## ERC20 Tokens & Token Scores
For ERC20 tokens, spam detection works well alongside [**Token Scores**](/data-api/data-features/token-scores).
While `possible_spam` focuses on **known and likely spam signals**, Token Scores provide a broader **token quality and safety assessment**, considering factors such as:
* Liquidity
* Trading volume
* Holder distribution
* Transaction activity
* Token age
Using both together gives a more complete picture of token risk and quality.
***
## Notes
* `possible_spam` is a **best-effort signal**, not a guarantee
* Always apply additional validation for high-value or security-critical workflows
# Solana DeFi API
Source: https://docs.moralis.com/data-api/solana/defi/overview
Track DeFi positions, balances, and rewards across the most-used Solana protocols using the same Universal API endpoints as EVM.
## Overview
The **Solana DeFi API** provides a unified view of a wallet's DeFi positions across the most-used Solana protocols - lending, borrowing, staking, liquid staking, and liquidity pools.
The same three Universal API endpoints used for EVM DeFi positions now return Solana data, with no schema changes and no separate integration.
***
## What Is the Solana DeFi API?
The Solana DeFi API lets you query:
* **Protocol Summary** - Overview of all Solana DeFi protocols a wallet uses
* **Positions** - Detailed position data per protocol
* **Position Details** - Enhanced breakdown with underlying assets
* **Multi-Chain in One Call** - Query EVM and Solana wallets through the same endpoints
***
## Key Features
* **Protocol Detection** - Automatically identifies which Solana protocols a wallet uses
* **Position Breakdown** - Detailed view of deposits, borrows, staking, and rewards
* **USD Valuations** - Position values calculated in USD
* **Unified Schema** - Identical response shape across EVM and Solana
* **Single Integration** - Same filters and parameters as the EVM DeFi API
***
## Supported Protocols
At launch, the Solana DeFi API supports 7 of the most-used protocols on Solana:
* Jito
* Save (formerly Solend)
* Jupiter Lending
* Raydium
* Orca
* Drift
* Marinade
More Solana protocols are being added on a rolling basis. If you need a specific protocol prioritized, [reach out to the team](https://moralis.com/contact-sales).
***
## Common Use Cases
The Solana DeFi API is commonly used for:
* **Portfolio Trackers**\
(show Solana DeFi positions alongside SPL tokens and NFTs)
* **DeFi Dashboards**\
(aggregate positions across Solana protocols)
* **Cross-Ecosystem Wallets**\
(display EVM and Solana DeFi positions side by side)
* **Yield Tracking**\
(monitor staking rewards and LP positions on Solana)
* **Tax Reporting**\
(calculate DeFi gains and income across Solana)
***
## Popular Endpoints
| Endpoint | Description |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [Wallet Protocols](/data-api/solana/defi/wallet-protocols) | Summary of Solana protocols used by a wallet |
| [Wallet Positions](/data-api/solana/defi/wallet-positions) | Detailed Solana positions per protocol |
| [Detailed Positions](/data-api/solana/defi/wallet-positions-detailed) | Enhanced Solana position breakdown |
***
## Get Started
* [Get Wallet Protocols](/data-api/solana/defi/wallet-protocols)
* [Get Wallet Positions](/data-api/solana/defi/wallet-positions)
* [Get Detailed Positions](/data-api/solana/defi/wallet-positions-detailed)
# Wallet Positions
Source: https://docs.moralis.com/data-api/solana/defi/wallet-positions
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/positions
Returns all DeFi positions (lending, liquidity, staking) for a wallet address across specified chains in a unified schema.
# Detailed Positions
Source: https://docs.moralis.com/data-api/solana/defi/wallet-positions-detailed
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/{protocol}/positions
Returns DeFi positions for a wallet address filtered by a specific protocol across specified chains.
# Wallet Protocols
Source: https://docs.moralis.com/data-api/solana/defi/wallet-protocols
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddress}/defi/summary
Returns a summary of all DeFi positions for a wallet address across specified chains.
# NFT Metadata
Source: https://docs.moralis.com/data-api/solana/nft/nft-metadata
/openapi-files/data-api/solana-api.json GET /nft/{network}/{address}/metadata
Gets the contract level metadata (mint, standard, name, symbol, metaplex) for the given contract
# Solana NFT API Overview
Source: https://docs.moralis.com/data-api/solana/nft/overview
Query Solana NFT metadata including token details, attributes, and media URLs.
## Overview
The **Solana NFT API** provides NFT metadata for tokens on the Solana blockchain, including attributes, media URLs, and collection information.
Built for Solana's unique NFT standards, the API delivers the data you need to display and work with Solana NFTs.
***
## What Is the Solana NFT API?
The Solana NFT API lets you query:
* **NFT Metadata** - Token metadata including name, symbol, and description
* **Attributes** - NFT traits and properties
* **Media** - Image and media URLs
* **Collection Info** - Collection-level metadata
***
## Key Features
* **Complete Metadata** - Full NFT metadata with all attributes
* **Media Resolution** - Resolved media URLs for display
* **Solana Standards** - Support for Metaplex and other Solana NFT standards
* **Fast Queries** - Optimized for quick metadata retrieval
***
## Common Use Cases
* **NFT Galleries**\
(display Solana NFT collections)
* **Wallet Apps**\
(show NFT holdings with metadata)
* **Marketplaces**\
(NFT listings with full details)
* **Portfolio Trackers**\
(include NFTs in portfolio views)
***
## Get Started
Explore the Solana NFT API endpoints:
* [**NFT Metadata**](/data-api/solana/nft/nft-metadata) - Get metadata for a Solana NFT
# OHLC by Pair Address
Source: https://docs.moralis.com/data-api/solana/price/ohlc
/openapi-files/data-api/solana-api.json GET /token/{network}/pairs/{address}/ohlcv
Gets the candlesticks for a specific pair address
# Solana Price API Overview
Source: https://docs.moralis.com/data-api/solana/price/overview
Real-time and historical price data for Solana SPL tokens including current prices, batch queries, and OHLC candlestick data.
## Overview
The **Solana Price API** provides real-time and historical pricing data for SPL tokens on Solana, including current prices, batch queries, and OHLC candlestick data for charting.
Get accurate token prices without managing your own price feeds or aggregation infrastructure.
***
## What Is the Solana Price API?
The Solana Price API lets you query:
* **Token Prices** - Current USD prices for any SPL token
* **Batch Prices** - Fetch prices for multiple tokens in one request
* **OHLC Data** - Candlestick data for charting and technical analysis
***
## Key Features
* **Real-Time Prices** - Current token prices with USD values
* **Batch Support** - Query multiple tokens efficiently
* **OHLC Candles** - Open, high, low, close data for charts
* **Historical Data** - Price history for trend analysis
* **Fast Response** - Optimized for low-latency queries
***
## Common Use Cases
* **Price Feeds**\
(display current token prices)
* **Trading Charts**\
(OHLC data for candlestick visualizations)
* **Portfolio Valuation**\
(calculate holdings value in USD)
* **Price Alerts**\
(trigger notifications on price changes)
* **Market Dashboards**\
(aggregate pricing across tokens)
***
## Get Started
Explore the Solana Price API endpoints:
* [**Token Price**](/data-api/solana/price/token-price) - Get current price for a token
* [**Token Prices (Batch)**](/data-api/solana/price/token-prices-batch) - Get prices for multiple tokens
* [**OHLC**](/data-api/solana/price/ohlc) - Get candlestick data for charting
# Token Price
Source: https://docs.moralis.com/data-api/solana/price/token-price
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/price
Gets the token price (usd and native) for a given contract address and network.
# Solana Data API
Source: https://docs.moralis.com/data-api/solana/solana-index
A dedicated API for accessing Solana blockchain data with Solana-native semantics and structures.
### Overview
The **Solana Data API** provides **deep, Solana-native access** to Solana blockchain data, standardizing complex on-chain structures into clean, developer-friendly formats.
It is designed specifically around **Solana’s account model, programs, and transaction semantics**, rather than forcing Solana data into an EVM-style abstraction.
***
### What the Solana Data API Is For
The Solana Data API is built for:
* Applications focused exclusively on **Solana**
* Use cases that require **Solana-specific data models**
* Developers who need precise control over Solana program and account data
***
### Relationship to the Universal API
* The Universal API includes **shared EVM + Solana functionality**
* The Solana Data API provides **deeper Solana-specific coverage**
* Some Solana-specific endpoints are not available in the Universal API
As with EVM, not all Solana features are suitable for a fully universal abstraction.
***
### When to Use the Solana Data API
Use the Solana Data API if you:
* Are building a Solana-only application
* Need Solana-specific transaction or account details
* Want the most accurate representation of Solana on-chain behavior
# Snipers
Source: https://docs.moralis.com/data-api/solana/token/advanced-signals/snipers
/openapi-files/data-api/solana-api.json GET /token/{network}/pairs/{pairAddress}/snipers
Get all snipers.
# Historical Token Holders
Source: https://docs.moralis.com/data-api/solana/token/holders/historical-holders
/openapi-files/data-api/solana-api.json GET /token/{network}/holders/{address}/historical
# Token Holder Metrics
Source: https://docs.moralis.com/data-api/solana/token/holders/holder-metrics
/openapi-files/data-api/solana-api.json GET /token/{network}/holders/{address}
# Top Token Holders
Source: https://docs.moralis.com/data-api/solana/token/holders/top-holders
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/top-holders
# Token Analytics
Source: https://docs.moralis.com/data-api/solana/token/market-metrics/token-analytics
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/analytics
Retrieve detailed trading analytics for a specific token, including buy volume, sell volume, buyers, sellers, transactions, liquidity and FDV trends over time.
# Token Analytics (Batch)
Source: https://docs.moralis.com/data-api/solana/token/market-metrics/token-analytics-batch
/openapi-files/data-api/api.json POST /tokens/analytics
Fetch analytics for multiple tokens, including buy volume, sell volume, buyers, sellers, transactions, liquidity and FDV trends over time. Accepts an array of up to 200 tokens, each requiring chain and tokenAddress.
# Token Analytics - Timeseries
Source: https://docs.moralis.com/data-api/solana/token/market-metrics/token-analytics-timeseries
/openapi-files/data-api/api.json POST /tokens/analytics/timeseries
Fetch timeseries swap buy volume, sell volume, liquidity and FDV for multiple tokens. Accepts an array of up to 200 tokens, each requiring chain and tokenAddress.
# Solana Token API Overview
Source: https://docs.moralis.com/data-api/solana/token/overview
Comprehensive Solana token data including metadata, prices, holders, swaps, pairs, and advanced analytics for SPL tokens.
## Overview
The **Solana Token API** provides complete SPL token data including metadata, real-time prices, holder analytics, swap history, trading pairs, and advanced market metrics.
From basic token lookups to complex analytics, the Token API delivers everything you need to build trading platforms and token analysis tools on Solana.
***
## What Is the Solana Token API?
The Solana Token API lets you query:
* **Metadata** - Token details including name, symbol, and logo
* **Prices** - Real-time and historical token prices with OHLC data
* **Holders** - Top holders, holder metrics, and historical data
* **Swaps** - DEX trading activity and swap history
* **Pairs** - Trading pairs with liquidity and stats
* **Discovery** - Search tokens, find gainers/losers, track new launches
***
## Key Features
* **Real-Time Prices** - Current token prices with USD values
* **OHLC Data** - Candlestick data for charting
* **Holder Analytics** - Top holders and distribution metrics
* **Historical Holders** - Track holder changes over time
* **Swap Tracking** - DEX trades on Raydium, Orca, and more
* **Pair Stats** - Liquidity, volume, and trading metrics
* **Token Search** - Find tokens by name or address
* **Pump.fun Integration** - Track new and graduated tokens
* **Top Movers** - Discover top gainers and losers
* **Token Score** - Quality and safety metrics
***
## Common Use Cases
* **Trading Platforms**\
(prices, charts, swap execution)
* **Token Analytics**\
(holder distribution, volume, metrics)
* **DEX Interfaces**\
(pair discovery, liquidity data)
* **Token Screeners**\
(filter and discover tokens)
* **New Token Tracking**\
(monitor Pump.fun launches)
* **Research Tools**\
(token metrics and analysis)
***
## Get Started
Explore the Solana Token API endpoints:
* [**Token Metadata**](/data-api/solana/token/token-metadata) - Get token details
* [**Token Price**](/data-api/solana/token/prices/token-price) - Get current price
* [**OHLC**](/data-api/solana/token/prices/ohlc) - Get candlestick data
* [**Top Holders**](/data-api/solana/token/holders/top-holders) - Get holder list
* [**Token Swaps**](/data-api/solana/token/swaps/token-swaps) - Get swap history
* [**Token Pairs**](/data-api/solana/token/pairs/token-pairs) - Get trading pairs
* [**Token Search**](/data-api/solana/token/search-and-discovery/token-search) - Search tokens
# Pair Stats
Source: https://docs.moralis.com/data-api/solana/token/pairs/pair-stats
/openapi-files/data-api/solana-api.json GET /token/{network}/pairs/{pairAddress}/stats
Gets the stats for a specific pair address
# Pair Swaps
Source: https://docs.moralis.com/data-api/solana/token/pairs/pair-swaps
/openapi-files/data-api/solana-api.json GET /token/{network}/pairs/{pairAddress}/swaps
Get all swap related transactions (buy, sell, add liquidity & remove liquidity) for a specific pair address.
# Token Pairs
Source: https://docs.moralis.com/data-api/solana/token/pairs/token-pairs
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/pairs
Get the supported pairs for a specific token address.
# OHLC by Pair Address
Source: https://docs.moralis.com/data-api/solana/token/prices/ohlc
/openapi-files/data-api/solana-api.json GET /token/{network}/pairs/{address}/ohlcv
Gets the candlesticks for a specific pair address
# Token Price
Source: https://docs.moralis.com/data-api/solana/token/prices/token-price
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/price
Gets the token price (usd and native) for a given contract address and network.
# Token Price (Batch)
Source: https://docs.moralis.com/data-api/solana/token/prices/token-prices-batch
/openapi-files/data-api/solana-api.json POST /token/{network}/prices
Gets the token price (usd and native) for a given contract address and network.
# Filtered Tokens
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/filtered-tokens
/openapi-files/data-api/api.json POST /discovery/tokens
Fetch a list of tokens across multiple chains, filtered and ranked by dynamic on-chain metrics like volume, price change, liquidity, holder composition, and more. Supports advanced filters (e.g. “top 10 whales hold <40%”), category-based inclusion/exclusion (e.g. “exclude stablecoins”), and time-based analytics. Ideal for token discovery, investor research, risk analysis, and portfolio tools. Each token returned includes detailed trading metrics as well as on-chain and off-chain metadata.
# Pump.fun - Bonding Status
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/pump-fun-bonding-status
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/bonding-status
Returns the bonding progress for the specified token. For Pump.fun, only tokens with a graduation of 20% or higher are returned, sorted by graduation in descending order. Currently, only Pump.fun is supported.
# Pump.fun - Bonding Tokens
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/pump-fun-bonding-tokens
/openapi-files/data-api/solana-api.json GET /token/{network}/exchange/{exchange}/bonding
Returns bonding tokens for the specified exchange. For Pump.fun, only tokens with a graduation of 20% or higher are returned, sorted by graduation in descending order. Currently, only Pump.fun is supported.
# Pump.fun - Graduated Tokens
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/pump-fun-graduated-tokens
/openapi-files/data-api/solana-api.json GET /token/{network}/exchange/{exchange}/graduated
Get the list of graduated tokens by given exchange. Currently, only Pump.fun is supported.
# Pump.fun - New Tokens
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/pump-fun-new-tokens
/openapi-files/data-api/solana-api.json GET /token/{network}/exchange/{exchange}/new
Get the list of new tokens by given exchange. Pump.fun results include only tokens less than 24 hours old. Currently, only Pump.fun is supported.
# Token Search
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/token-search
/openapi-files/data-api/api.json GET /tokens/search
Search for tokens using their contract address, pair address, name, or symbol. Cross-chain by default with support to filter by chains. Additional options to sortBy various metrics, such as market cap, liquidity or volume.
# Top Gainers
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/top-gainers
/openapi-files/data-api/api.json GET /discovery/tokens/top-gainers
Identify tokens with the highest price increases over a period.
# Top Losers
Source: https://docs.moralis.com/data-api/solana/token/search-and-discovery/top-losers
/openapi-files/data-api/api.json GET /discovery/tokens/top-losers
List tokens with the largest price decreases over a period.
# Token Swaps
Source: https://docs.moralis.com/data-api/solana/token/swaps/token-swaps
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/swaps
Get all swap related transactions (buy, sell) for a specific token address.
# Wallet Swaps
Source: https://docs.moralis.com/data-api/solana/token/swaps/wallet-swaps
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/swaps
Get all swap related transactions (buy, sell) for a specific wallet address.
# Token Metadata
Source: https://docs.moralis.com/data-api/solana/token/token-metadata
/openapi-files/data-api/solana-api.json GET /token/{network}/{address}/metadata
Get the global token metadata for a given network and contract (mint, standard, name, symbol, metaplex).
# Token Metadata (Batch)
Source: https://docs.moralis.com/data-api/solana/token/token-metadata-batch
/openapi-files/data-api/solana-api.json POST /token/{network}/metadata
Get multiple global token metadata for a given network and contract (mint, standard, name, symbol, metaplex). Supports up to 100 tokens per request.
# Token Score
Source: https://docs.moralis.com/data-api/solana/token/token-score
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/score
Retrieve a score for a specific token along with detailed metrics including price, volume, liquidity, transaction counts, and supply information.
# Native Balance
Source: https://docs.moralis.com/data-api/solana/wallet/native-balance
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/balance
Gets native balance owned by the given address
# NFT Balances
Source: https://docs.moralis.com/data-api/solana/wallet/nft-balances
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/nft
Gets NFTs owned by the given address
# Solana Wallet API Overview
Source: https://docs.moralis.com/data-api/solana/wallet/overview
Query Solana wallet data including native SOL balance, SPL token holdings, NFT balances, portfolio overview, and swap history.
## Overview
The **Solana Wallet API** provides complete wallet data for Solana addresses including native SOL balance, SPL token holdings, NFT balances, and trading activity.
Built specifically for Solana's account model, the Wallet API delivers the data you need to build wallets, portfolio trackers, and Solana-native applications.
***
## What Is the Solana Wallet API?
The Solana Wallet API lets you query:
* **Native Balance** - SOL balance for any wallet address
* **Token Balances** - SPL token holdings with metadata and prices
* **NFT Balances** - NFT holdings on Solana
* **Portfolio** - Complete portfolio overview with valuations
* **Swaps** - DEX trading history on Solana
***
## Key Features
* **Native SOL Balance** - Current SOL holdings with USD value
* **SPL Token Support** - All SPL tokens with metadata
* **NFT Holdings** - Solana NFT balances and metadata
* **Portfolio Valuation** - Total portfolio value in USD
* **Swap History** - Trading activity on Solana DEXs
* **Real-Time Data** - Up-to-date wallet state
***
## Common Use Cases
* **Solana Wallets**\
(display SOL and token balances)
* **Portfolio Trackers**\
(aggregate holdings with valuations)
* **Trading Apps**\
(show swap history and activity)
* **NFT Galleries**\
(display Solana NFT collections)
* **DeFi Dashboards**\
(track wallet activity on Solana)
***
## Get Started
Explore the Solana Wallet API endpoints:
* [**Native Balance**](/data-api/solana/wallet/native-balance) - Get SOL balance
* [**Token Balances**](/data-api/solana/wallet/token-balances) - Get SPL token holdings
* [**NFT Balances**](/data-api/solana/wallet/nft-balances) - Get NFT holdings
* [**Portfolio**](/data-api/solana/wallet/portfolio) - Get complete portfolio
* [**Wallet Swaps**](/data-api/solana/wallet/wallet-swaps) - Get swap history
# Wallet Portfolio
Source: https://docs.moralis.com/data-api/solana/wallet/portfolio
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/portfolio
Gets all the native and token balances of the given address
# Token Balances
Source: https://docs.moralis.com/data-api/solana/wallet/token-balances
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/tokens
Gets token balances owned by the given address
# Wallet Swaps
Source: https://docs.moralis.com/data-api/solana/wallet/wallet-swaps
/openapi-files/data-api/solana-api.json GET /account/{network}/{address}/swaps
Get all swap related transactions (buy, sell) for a specific wallet address.
# Data API Supported Chains
Source: https://docs.moralis.com/data-api/supported-chains
Blockchains supported by the Moralis Data APIs for tokens, wallets, NFTs, DeFi, and pricing.
### Data API Supported Chains
The Moralis Data APIs support multiple blockchain networks for **onchain data access**, including wallets, tokens, NFTs, DeFi, and prices.
Chain support may vary by feature. Some chains support the full Data API surface, while others support a subset depending on:
* Indexing depth
* Protocol availability
* Onchain data structure
Use the table below to see which chains are supported by the Data APIs and which features are available on each chain.
| Chain | Type | Chain ID | Query Params | Data API | Wallet | NFT | Token | DeFi | Entity | Blockchain | PNL | Prices | Internal Txs | NFT Trades | NFT Prices | Floor Prices |
| --------------------------- | ------- | ------------------- | ---------------------------- | -------- | ------ | --- | ----- | ---- | ------ | ---------- | --- | ------ | ------------ | ---------- | ---------- | ------------ |
| Ethereum Mainnet | Mainnet | 0x1 (1) | `eth` · `0x1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Ethereum Sepolia | Testnet | 0xaa36a7 (11155111) | `sepolia` · `0xaa36a7` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Polygon Mainnet | Mainnet | 0x89 (137) | `polygon` · `0x89` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Polygon Amoy | Testnet | 0x13882 (80002) | `polygon amoy` · `0x13882` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Binance Smart Chain Mainnet | Mainnet | 0x38 (56) | `bsc` · `0x38` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Binance Smart Chain Testnet | Testnet | 0x61 (97) | `bsc testnet` · `0x61` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Arbitrum | Mainnet | 0xa4b1 (42161) | `arbitrum` · `0xa4b1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Base | Mainnet | 0x2105 (8453) | `base` · `0x2105` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Base Sepolia | Testnet | 0x14a34 (84532) | `base sepolia` · `0x14a34` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Optimism | Mainnet | 0xa (10) | `optimism` · `0xa` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Linea | Mainnet | 0xe708 (59144) | `linea` · `0xe708` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ |
| Linea Sepolia | Testnet | 0xe705 (59141) | `linea sepolia` · `0xe705` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Avalanche | Mainnet | 0xa86a (43114) | `avalanche` · `0xa86a` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Fantom Mainnet | Mainnet | 0xfa (250) | `fantom` · `0xfa` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ |
| Cronos Mainnet | Mainnet | 0x19 (25) | `cronos` · `0x19` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ |
| Gnosis | Mainnet | 0x64 (100) | `gnosis` · `0x64` | ✓ | ✓ | ✗ | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ |
| Gnosis Chiado | Testnet | 0x27d8 (10200) | `gnosis testnet` · `0x27d8` | ✓ | ✓ | ✗ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Chiliz Mainnet | Mainnet | 0x15b38 (88888) | `chiliz` · `0x15b38` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Chiliz Testnet | Testnet | 0x15b32 (88882) | `chiliz testnet` · `0x15b32` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Moonbeam | Mainnet | 0x504 (1284) | `moonbeam` · `0x504` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Moonriver | Testnet | 0x505 (1285) | `moonriver` · `0x505` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Moonbase | Testnet | 0x507 (1287) | `moonbase` · `0x507` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Flow | Mainnet | 0x2eb (747) | `flow` · `0x2eb` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Flow Testnet | Testnet | 0x221 (545) | `flow-testnet` · `0x221` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Ronin | Mainnet | 0x7e4 (2020) | `ronin` · `0x7e4` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Ronin Saigon Testnet | Testnet | 0x7e5 (2021) | `ronin-testnet` · `0x31769` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Lisk | Mainnet | 0x46f (1135) | `lisk` · `0x46f` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Lisk Sepolia Testnet | Testnet | 0x106a (4202) | `lisk-sepolia` · `0x106a` | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Pulsechain | Mainnet | 0x171 (369) | `pulse` · `0x171` | ✓ | ✓ | ✗ | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ |
| Sei | Mainnet | 0x531 (1329) | `sei` · `0x531` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sei Testnet | Testnet | 0x530 (1328) | `sei-testnet` · `0x530` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Monad | Mainnet | 0x8f (143) | `monad` · `0x8f` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
# Get Entities by Category
Source: https://docs.moralis.com/data-api/universal/entity/endpoints/entity-by-category
/openapi-files/data-api/api.json GET /entities/categories/{categoryId}
Fetch entities belonging to a specific category. Each entity returns name, logo, description, external links, total addresses and more.
# Get Entity
Source: https://docs.moralis.com/data-api/universal/entity/endpoints/entity-by-id
/openapi-files/data-api/api.json GET /entities/{entityId}
Retrieve details for a specific entity using its unique ID. Returns name, logo, description, external links and related addresses.
# Get Entity Categories
Source: https://docs.moralis.com/data-api/universal/entity/endpoints/entity-categories
/openapi-files/data-api/api.json GET /entities/categories
List available categories for blockchain entities.
# Entity Search
Source: https://docs.moralis.com/data-api/universal/entity/endpoints/entity-search
/openapi-files/data-api/api.json GET /entities/search
Find entities, organizations, addresses or wallets linked to blockchain addresses. Results are categorised into 3 arrays: entities, addresses, categories.
# Entity API Overview
Source: https://docs.moralis.com/data-api/universal/entity/overview
Search and discover blockchain entities including exchanges, institutions, protocols, and notable addresses with verified labels.
## Overview
The **Entity API** lets you search and discover blockchain entities - organizations, protocols, exchanges, and notable addresses with verified labels and metadata.
Instead of working with raw addresses, the Entity API provides context about who owns and operates wallets across the blockchain ecosystem.
***
## What Is the Entity API?
The Entity API lets you:
* **Search Entities** - Find entities by name (e.g., "Coinbase", "BlackRock")
* **Discover Addresses** - Get known addresses associated with an entity
* **Get Labels** - Retrieve verified labels and categories for addresses
* **Explore Protocols** - Find addresses related to dApps and protocols
***
## Key Features
* **Entity Search** - Query by name to find organizations and protocols
* **Address Discovery** - Find all addresses linked to an entity
* **Verified Labels** - Trusted address labels and categorization
* **Cross-Chain** - Entity data spans EVM and Solana chains
* **Rich Metadata** - Entity descriptions, logos, and categories
***
## Supported Entities
The Entity API covers:
* **Exchanges** - Coinbase, Kraken, Binance, and more
* **Institutions** - BlackRock, Grayscale, and asset managers
* **Protocols** - Uniswap, Aave, Compound, and DeFi protocols
* **DAOs** - Major DAOs and governance entities
* **Notable Wallets** - Whales, founders, and known addresses
***
## Common Use Cases
* **Address Labels**\
(display human-readable names for addresses)
* **Whale Tracking**\
(monitor institutional and large holder activity)
* **Compliance**\
(identify exchange and custodian addresses)
* **Analytics**\
(understand flows between known entities)
* **Portfolio Context**\
(show which entities hold similar assets)
***
## Get Started
Explore the Entity API to search and discover blockchain entities.
# Chain Metrics
Source: https://docs.moralis.com/data-api/universal/global/endpoints/trading-stats
/openapi-files/data-api/api.json GET /volume/chains
Retrieve swap volume, active wallets and swap transaction stats for a blockchain over various time periods. Returns data for all chains in a single request.
# Category Metrics
Source: https://docs.moralis.com/data-api/universal/global/endpoints/trading-stats-category
/openapi-files/data-api/api.json GET /volume/categories
Access volume, buyers, sellers and swap transaction stats for a blockchain, grouped by category. Filter by chain.
# Category Metrics - Timeseries
Source: https://docs.moralis.com/data-api/universal/global/endpoints/trading-stats-category-timeseries
/openapi-files/data-api/api.json GET /volume/timeseries/{categoryId}
Fetch timeseries buy volume, sell volume, liquidity and FDV for a specific category. Optionally filter by `chain`.
# Chain Metrics - Timeseries
Source: https://docs.moralis.com/data-api/universal/global/endpoints/trading-stats-timeseries
/openapi-files/data-api/api.json GET /volume/timeseries
Fetch timeseries swap volume, liquidity and FDV for a specific blockchain.
# Market Metrics Overview
Source: https://docs.moralis.com/data-api/universal/market-metrics/overview
Access market-wide metrics and analytics across chains including volume, market cap, and trending data.
## Overview
The **Market Metrics API** provides market-wide analytics and metrics across blockchain ecosystems, helping you understand broader market trends and activity.
Get aggregated market data without building your own analytics infrastructure.
***
## What Is the Market Metrics API?
The Market Metrics API lets you query:
* **Market Overview** - Aggregate market statistics
* **Volume Data** - Trading volume across markets
* **Trending Metrics** - Popular tokens and collections
* **Cross-Chain Data** - Unified metrics across chains
***
## Key Features
* **Aggregated Data** - Market-wide statistics and summaries
* **Volume Tracking** - Trading volume and activity metrics
* **Trend Analysis** - Identify trending assets and markets
* **Cross-Chain** - Unified view across EVM and Solana
* **Real-Time Updates** - Current market state
***
## Common Use Cases
* **Market Dashboards**\
(display overall market health and activity)
* **Analytics Platforms**\
(aggregate market metrics for analysis)
* **Trading Apps**\
(show market context and trends)
* **Research Tools**\
(track market-wide patterns)
***
## Get Started
Explore the Market Metrics API to access market-wide analytics and trends.
# Universal API
Source: https://docs.moralis.com/data-api/universal/overview
A unified, multichain API for accessing blockchain data across 30+ EVM networks and Solana through a single, consistent interface.
### Overview
The **Universal API** is Moralis’ unified, multichain Data API, designed to provide a **single, consistent interface** for accessing blockchain data across **30+ supported chains**, including both **EVM networks and Solana**.
It standardizes complex on-chain data into **clean, developer-friendly formats**, allowing you to build multichain applications without handling chain-specific differences.
***
### What the Universal API Is For
The Universal API is intended for:
* Applications that support **both EVM and Solana**
* Teams building **chain-agnostic** products
* Use cases where a **consistent data model** across chains is more important than chain-specific depth
Where possible, new endpoints are introduced in the Universal API first.
***
### Consolidation Strategy
Moralis is **gradually consolidating cross-chain functionality into the Universal API**.
This means:
* New multichain endpoints are added to the Universal API
* Existing EVM- or Solana-specific endpoints may be mirrored or superseded over time
* No breaking changes are introduced without notice
The Universal API represents the **long-term direction** for multichain data access at Moralis.
***
### When to Use the Universal API
Use the Universal API if you:
* Need the **same endpoint to work across EVM and Solana**
* Want to minimize chain-specific logic
* Are building dashboards, analytics, or wallets that span multiple ecosystems
***
### When Not to Use It
For advanced, chain-specific features, you may still want:
* **EVM API** for deep EVM-only functionality
* **Solana Data API** for Solana-specific data and semantics
# Token Analytics
Source: https://docs.moralis.com/data-api/universal/token/analytics/token-analytics
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/analytics
Retrieve detailed trading analytics for a specific token, including buy volume, sell volume, buyers, sellers, transactions, liquidity and FDV trends over time.
# Token Analytics (Batch)
Source: https://docs.moralis.com/data-api/universal/token/analytics/token-analytics-multi
/openapi-files/data-api/api.json POST /tokens/analytics
Fetch analytics for multiple tokens, including buy volume, sell volume, buyers, sellers, transactions, liquidity and FDV trends over time. Accepts an array of up to 200 tokens, each requiring chain and tokenAddress.
# Token Analytics - Timeseries
Source: https://docs.moralis.com/data-api/universal/token/analytics/token-analytics-timeseries
/openapi-files/data-api/api.json POST /tokens/analytics/timeseries
Fetch timeseries swap buy volume, sell volume, liquidity and FDV for multiple tokens. Accepts an array of up to 200 tokens, each requiring chain and tokenAddress.
# Filtered Tokens
Source: https://docs.moralis.com/data-api/universal/token/filtered-tokens
/openapi-files/data-api/api.json POST /discovery/tokens
Fetch a list of tokens across multiple chains, filtered and ranked by dynamic on-chain metrics like volume, price change, liquidity, holder composition, and more. Supports advanced filters (e.g. “top 10 whales hold <40%”), category-based inclusion/exclusion (e.g. “exclude stablecoins”), and time-based analytics. Ideal for token discovery, investor research, risk analysis, and portfolio tools. Each token returned includes detailed trading metrics as well as on-chain and off-chain metadata.
# Token Score
Source: https://docs.moralis.com/data-api/universal/token/score/token-score
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/score
Retrieve a score for a specific token along with detailed metrics including price, volume, liquidity, transaction counts, and supply information.
# Token Score - Timeseries
Source: https://docs.moralis.com/data-api/universal/token/score/token-score-timeseries
/openapi-files/data-api/api.json GET /tokens/{tokenAddress}/score/historical
Retrieve historical score data for a specific token over time.
# Token Search
Source: https://docs.moralis.com/data-api/universal/token/search/token-search
/openapi-files/data-api/api.json GET /tokens/search
Search for tokens using their contract address, pair address, name, or symbol. Cross-chain by default with support to filter by chains. Additional options to sortBy various metrics, such as market cap, liquidity or volume.
# Top Gainers
Source: https://docs.moralis.com/data-api/universal/token/top-gainers
/openapi-files/data-api/api.json GET /discovery/tokens/top-gainers
Identify tokens with the highest price increases over a period.
# Top Losers
Source: https://docs.moralis.com/data-api/universal/token/top-losers
/openapi-files/data-api/api.json GET /discovery/tokens/top-losers
List tokens with the largest price decreases over a period.
# Trending Tokens
Source: https://docs.moralis.com/data-api/universal/token/trending-tokens
/openapi-files/data-api/api.json GET /tokens/trending
List top tokens trending based on trading activity, volume, liquidity and more. By default this returns cross-chain results, including Solana. Optionally filter by `chain` for single chain results.
# Cross-Chain Token Balances
Source: https://docs.moralis.com/data-api/universal/wallet/cross-chain-token-balances
/openapi-files/data-api/api-v1.json GET /v1/wallets/{walletAddressOrPublicKey}/tokens
Get token balances from multiple chains for a specific wallet address.
This is the multi-chain successor to the legacy Deep Index [Token Balances](/data-api/evm/wallet/legacy/token-balances-erc20) endpoint. The same filters - spam exclusion, unverified contracts, liquidity thresholds, USD pricing - are preserved. The headline change is that **a single request now returns balances across multiple chains.**
Currently EVM. Bitcoin and Solana support is on the roadmap.
# Wallets API
Source: https://docs.moralis.com/data-api/universal/wallet/overview
Multi-chain wallet endpoints in the Universal API - return balances and holdings across multiple chains in a single request.
## Overview
The **Universal Wallets API** brings multi-chain wallet data into a single, consistent request shape. Instead of querying one chain at a time and stitching responses together client-side, you ask for the chains you care about in one call and receive a unified response.
The first endpoint in this group is **Cross-Chain Token Balances** - a multi-chain version of one of our most-used Deep Index endpoints.
***
## What Is the Universal Wallets API?
The Universal Wallets API lets you query:
* **Cross-Chain Token Balances** - Token balances for a wallet across multiple chains in one call
More multi-chain wallet endpoints are on the way as we consolidate cross-chain functionality into the Universal API.
***
## Key Features
* **Multi-chain in one call** - Query a wallet across many chains in a single request
* **Same trusted filters** - Spam exclusion, unverified contracts, liquidity thresholds, USD pricing - all carry over from the legacy Deep Index endpoints
* **Unified response shape** - One schema across chains, no client-side stitching
* **Direct migration path** - Existing implementations port cleanly with minimal changes
***
## Common Use Cases
* **Wallets** - Show full multi-chain holdings on a single screen
* **Exchanges** - Surface a user's deposit balances across networks
* **Portfolio Trackers** - Aggregate token holdings across EVM (and, soon, Bitcoin and Solana) in one query
* **Tax Tools** - Pull a complete asset list per wallet for cost-basis and reporting flows
* **AI Agents** - Hand the model a single response containing the wallet's full token footprint
***
## Roadmap
The current scope is EVM. Coming next:
* **Bitcoin** - native Bitcoin wallet balances in the same endpoint
* **Solana** - Solana token balances brought into the Universal API alongside our existing dedicated Solana Token Balances endpoint, unified into the same multi-chain request structure
The end state: one endpoint, one request shape, balances across EVM, Bitcoin, and Solana wallets.
***
## Get Started
* [Cross-Chain Token Balances](/data-api/universal/wallet/cross-chain-token-balances)
# Data Indexer Early Access
Source: https://docs.moralis.com/data-indexer/early-access
Request early access to Moralis Datashare, a platform for exporting large-scale onchain datasets into data warehouses for analytics, ML, and compliance.
### Request Data Indexer early access
The Moralis **Data Indexer** is currently available via **early access**.
It is designed for teams that need **custom onchain data pipelines**, full control over data schemas, and reliable delivery of indexed blockchain data into their own infrastructure.
### What early access means
Early access to the Data Indexer includes:
* Access to a managed, enterprise-grade indexing solution
* Close collaboration with Moralis on architecture and data models
* Influence over schema design, supported chains, and delivery options
* Guided onboarding and hands-on support
* Early insight into the long-term product roadmap
This phase allows us to build the Data Indexer alongside real customer requirements.
### How to request access
If you’re interested in shaping the Data Indexer and using it in production, request early access below.
We prioritise teams with **clear technical requirements** and **long-term data needs**.
[**Request Data Indexer early access →**](https://moralis.com/data-indexer/#request-data-indexer-access)
# Data Indexer Features
Source: https://docs.moralis.com/data-indexer/features
Core capabilities of Moralis Data Indexer: custom indexing pipelines, real-time and historical data, multi-chain support, and enterprise-grade reliability.
### Custom Indexing Pipelines
Build custom indexing pipelines with full control over your blockchain data.
| Capability | Description |
| ------------------- | ----------------------------------------------------------------------------------- |
| **Custom Schemas** | Define your own data models and schemas tailored to your use case |
| **Full Control** | Configure exactly which data to index, how to transform it, and where to deliver it |
| **Enterprise SLAs** | Guaranteed performance and uptime for mission-critical applications |
### Real-Time & Historical Data
Stream live events and backfill historical data across chains.
| Capability | Description |
| ------------------------ | ----------------------------------------------------------------- |
| **Live Streaming** | Stream events in real-time from any wallet, contract, or address |
| **Custom Filters** | Apply custom filters with guaranteed delivery |
| **Historical Backfills** | Fast backfills across chains to populate your data infrastructure |
### Multi-Chain Support
A single unified schema across EVM chains and beyond.
Support for **50+ chains** including Ethereum, Polygon, Arbitrum, Base, Optimism, Avalanche, BNB Chain, and more. Data is normalised into a unified schema, making cross-chain analytics straightforward.
### Enterprise-Grade Infrastructure
Built for teams with strict compliance, security, and reliability requirements.
| Capability | Description |
| --------------------------- | ------------------------------------------------------------- |
| **SOC 2 Type II Certified** | Pipelines meet enterprise security and compliance standards |
| **Dedicated Support** | Direct access to Moralis engineering and support teams |
| **Audit-Grade Data** | Data integrity verified for compliance and audit requirements |
| **High Availability** | Redundant infrastructure with guaranteed uptime SLAs |
### Get Started
The Data Indexer is currently in early access. If you're interested in building custom blockchain data pipelines, request access to work directly with the Moralis team.
Join the early access program and shape the product roadmap.
# How Data Indexer Works
Source: https://docs.moralis.com/data-indexer/how-it-works
Understand the Data Indexer workflow: define your data requirements, configure schemas, and have indexed blockchain data delivered to your infrastructure.
### Overview
Moralis Data Indexer handles the complexity of blockchain data indexing so you can focus on building your application. The workflow is straightforward:
### 1. Define
Specify which blockchain data you want to index:
* **Chains** – Select from 50+ supported chains
* **Contracts** – Target specific smart contracts or protocols
* **Events** – Index specific events, transactions, or state changes
* **Data types** – Choose raw data, decoded data, or both
### 2. Configure
Set up your custom schemas and transformation rules:
* Define your data models and field mappings
* Configure transformations and enrichments
* Set up filters to capture only the data you need
* Specify update frequency and delivery preferences
### 3. Deploy
Moralis deploys and manages the indexing infrastructure:
* No infrastructure to provision or maintain
* Automatic scaling based on data volume
* Built-in redundancy and fault tolerance
* Continuous monitoring and alerting
### 4. Deliver
Data streams directly to your destination:
* Real-time delivery as events occur on-chain
* Historical backfills delivered in parallel
* Data arrives in your preferred format and schema
### Delivery Options
Data Indexer supports multiple delivery destinations to fit your existing infrastructure.
| Destination | Description |
| ------------------- | -------------------------------------------------------- |
| **Data Warehouses** | Snowflake, BigQuery, and other cloud warehouses |
| **Object Storage** | Amazon S3, Google Cloud Storage, and compatible services |
| **Databases** | Direct delivery to your database infrastructure |
### Architecture Benefits
| Benefit | Description |
| ----------------------- | -------------------------------------------------------------------------- |
| **Fully Managed** | Moralis handles all infrastructure, scaling, and maintenance |
| **Low Latency** | Optimised pipelines for minimal delay between on-chain events and delivery |
| **Guaranteed Delivery** | No data loss with built-in retries and exactly-once semantics |
| **Cost Efficient** | Pay for the data you need, not unused infrastructure |
### Get Started
Ready to build custom blockchain data pipelines? Request early access to work with the Moralis team on your specific requirements.
Join the early access program and start building.
# Data Indexer
Source: https://docs.moralis.com/data-indexer/overview
Moralis Data Indexer is a blockchain indexing engine designed to build custom, enterprise-grade blockchain data pipelines. It combines real-time and historical indexing with rich schema controls and delivers data where you need it—straight into your environment—with high performance and reliability.
### At a glance
### Types of use cases
* Custom blockchain data pipelines for internal applications
* Real-time and historical on-chain analytics
* Back-office data systems needing structured blockchain data
* Apps needing tailored data models, beyond generic APIs
* Institutional workflows with compliance and SLA requirements
### For which teams
* **Data engineering & backend teams** who build in-house infrastructure
* **Analytics teams** requiring custom indexed datasets
* **Product teams** that need high control over how on-chain data is structured
* **Enterprise & institutional teams** with compliance, security, and SLA needs
* **Quant/trading and risk teams** building mission-critical data pipelines
# Credits & Pricing
Source: https://docs.moralis.com/datashare/credits-and-pricing
How Datashare's prepaid GB credit model works, including top-ups, tiered pricing, and credit consumption.
Datashare operates on a **prepaid GB credit model**. You purchase credits in advance, and they are consumed when exports complete.
***
### How Credits Work
* Credits are consumed upon **export completion**, not when you run an estimate
* Your current **GB balance** is displayed in the top-right corner of the Datashare dashboard
* Estimates are **free** — run as many as you need before committing
***
### Credit Consumption
Credit usage is based on **uncompressed data size**, regardless of the output format you choose.
| Factor | Impact on Credits |
| -------------------------------- | ------------------------------------------------------------ |
| Wider date range | More rows = more GB consumed |
| More selected fields | Larger row size = more GB consumed |
| No wallet/token filters | Full chain activity = significantly more GB |
| Output format (Parquet/CSV/JSON) | No impact — credits always calculated on uncompressed volume |
Parquet typically achieves 5–10x compression, so the actual files in your S3 bucket will be much smaller than the credited amount. CSV with gzip also compresses significantly.
***
### Topping Up Credits
1. Click **Top Up** in the top-right of the Datashare main screen
2. Enter the GB quantity you need
3. Tiered pricing applies — higher volumes receive a **lower per-GB cost**
4. Top-ups are **manually approved** with confirmation
***
### Mid-Process Top-Up
If you realize you have insufficient credits while configuring an export:
1. Request a top-up and wait for approval
2. Return to **Create Export**
3. Re-run the estimate
4. Proceed with the export
Always ensure you have sufficient credits **before** clicking Export. If credits run out mid-job, the export may fail, and the 5-minute export window may expire.
# Datashare Early Access
Source: https://docs.moralis.com/datashare/early-access
Request early access to Moralis Datashare, a platform for exporting large-scale onchain datasets into data warehouses for analytics, ML, and compliance.
### Request Datashare early access
Datashare is currently available via **early access**.
We’re opening Datashare to a small number of teams who need **large-scale onchain datasets** for analytics, machine learning, compliance, or internal data platforms - and who want to help shape the product as it evolves.
### What early access means
Early access gives you:
* Priority access to Datashare as features roll out
* Direct collaboration with the Moralis product and data teams
* The ability to influence supported datasets, schemas, and delivery options
* Early visibility into upcoming capabilities and roadmap
Datashare is being built with **real production use cases in mind**, and early access allows us to validate those needs closely with customers.
### How to request access
If Datashare sounds like a fit, request early access using the form below.
We review requests on a rolling basis and prioritize teams with **clear use cases** and **production data needs**.
[**Request Datashare early access →**](https://moralis.com/datashare/#request-datashare-access)
# Datashare Export Options
Source: https://docs.moralis.com/datashare/export-options
Supported export destinations for Moralis Datashare bulk data exports.
### Export Destinations
Moralis Datashare supports exporting blockchain data directly to a variety of S3-compatible object storage providers. This enables seamless integration with your existing data infrastructure and analytics pipelines.
| Provider | Description |
| ---------------------------------- | --------------------------------------------------------------- |
| **AWS S3** | Amazon Web Services Simple Storage Service |
| **Google Cloud Storage** | Google Cloud Platform object storage |
| **Cloudflare R2** | Cloudflare's S3-compatible object storage with zero egress fees |
| **Backblaze B2** | Cost-effective cloud storage with S3-compatible API |
| **DigitalOcean Spaces** | Simple object storage from DigitalOcean |
| **Wasabi** | High-performance cloud storage with no egress fees |
| **MinIO** | Self-hosted, high-performance object storage |
| **Linode (Akamai) Object Storage** | Akamai's S3-compatible cloud storage |
| **Vultr Object Storage** | S3-compatible storage from Vultr |
| **Scaleway Object Storage** | European cloud provider's object storage solution |
***
### Configuration
All export destinations use S3-compatible credentials and endpoints. When setting up an export, you'll need to provide:
* **Bucket name** - The destination bucket for your data
* **Access key** - Your storage provider access key ID
* **Secret key** - Your storage provider secret access key
* **Endpoint URL** - The S3-compatible endpoint (required for non-AWS providers)
* **Region** - The storage region (where applicable)
***
### Output Formats
Choose an output format based on your analytics tooling and use case.
| Format | Best For | Notes |
| ----------- | ------------------------------- | ------------------------------------------------------------------------- |
| **Parquet** | Athena, Spark, DuckDB, BigQuery | Columnar, highly compressed (5–10x). Recommended for analytics workloads. |
| **CSV** | Excel, general compatibility | Larger files than Parquet. Compresses well with gzip. |
| **JSON** | Debugging, human inspection | Largest output format. Useful for spot-checking data. |
Export size estimates are based on **uncompressed** data size. Parquet typically achieves 5–10x compression, and CSV with gzip also compresses significantly. Credits are calculated on uncompressed volume regardless of the format you choose.
***
### Getting Started
To request access to Datashare and configure your export destination, see the [Early Access](/datashare/early-access) page.
# Filters & Scoping
Source: https://docs.moralis.com/datashare/filters-and-scoping
Control the scope and cost of your Datashare exports using date range, wallet, and token filters.
Filters determine how much data your export includes — and how many credits it consumes. Apply filters to narrow exports to exactly the data you need.
***
### Date Range (Required)
The date range is the **single biggest driver of export size**. Wider ranges mean more rows, more GB, and higher credit cost.
* Start with a **single day or week** for initial runs
* Use the **"Current"** button to set the end date to the present
* Supports **datetime values** for hourly precision
An unfiltered Ethereum Token Transfers job spanning a month will be very large. Always estimate before you run.
***
### Wallet Address (Optional)
Filter results to activity involving specific wallet addresses.
* Supports up to **500 addresses** per job
* Useful for verifying output against known wallet activity
* If no addresses are specified, the export includes **all addresses** on the chain — useful for full-chain data pulls, but expect significantly larger exports
***
### Token Address (Optional)
Filter to specific token contracts — for example, USDC or WETH. This is useful when you only need transfer or swap data for particular tokens rather than all activity on the chain.
***
### Field Selection
When creating an export, you can select specific fields from each dataset. More fields increase export size and GB consumption **proportionally**.
Start with the minimum fields you actually need. You can always run additional exports with more fields later.
***
### Scoping Best Practices
| Approach | Impact |
| -------------------------- | ----------------------------------------------- |
| Narrow date range | Fewer rows, lower credit cost |
| Add wallet or token filter | Targets specific activity instead of full chain |
| Select fewer fields | Smaller file size per row |
| Combine all three | Minimal, focused export for validation |
You can run **estimates as many times as you want at no cost**. Use estimates to iterate on your filters before committing credits.
# Datashare
Source: https://docs.moralis.com/datashare/overview
Moralis DataShare is a blockchain data export service that delivers massive, decoded datasets across supported chains. Users can export historical data in formats like Parquet, CSV, or JSON, either as downloadable files or to supported S3-compatible storage. These outputs can then be ingested into data platforms like BigQuery, Snowflake, or Databricks for analytics and downstream workflows.
### At a glance
### Types of use cases
* Export historical blockchain data for analytics and reporting
* Generate datasets in Parquet, CSV, or JSON for downstream processing
* Load exported data into warehouses like BigQuery or Snowflake
* Use prebuilt schemas for common datasets (transfers, swaps, NFTs)
* Access decoded, structured data across supported chains
* Run large-scale backfills over custom date ranges
### For which teams
* **Data engineering** teams needing reliable blockchain data in internal stores
* **Analytics & BI** teams working with crypto or on-chain datasets
* **AI/ML teams** building models leveraging historical blockchain data
* **Compliance & security** teams needing traceable on-chain data for monitoring and reporting
* **Quants and trading desks** building strategic models or backtests
### Tutorials
Step-by-step guide to configuring an AWS S3 bucket to receive Datashare exports.
Video tutorial on exporting bulk blockchain data using Moralis Datashare.
***
## Datashare Tutorial Video
# Export Your First Dataset
Source: https://docs.moralis.com/datashare/quickstart
Learn how to create your first Datashare export, from selecting data to verifying output in your S3 bucket.
### Dashboard Overview
The Datashare dashboard is your export control panel. It displays all historical and active jobs, with options to:
* **Search** by Job ID to find specific exports
* **Filter** by status: Pending, Running, Completed, or Failed
* **View credits** — your GB balance is shown in the top-right corner
* **Create Export** — start a new export job
### Create Export Workflow
The Create Export screen has a three-panel layout:
| Panel | Purpose |
| ---------------------------------- | ----------------------------------------------------------------------- |
| **Schema Explorer** (left) | Select chain, dataset type, and fields |
| **Filters & Destination** (middle) | Set date range, wallet/token filters, output format, and S3 destination |
| **Preview & Export** (right) | View estimate, preview sample rows, and trigger the export |
The workflow is: **select data → scope with filters → choose destination → estimate → export**.
***
### Step 1: Select Your Data
**Choose a chain** — one chain per export job. See [Supported Chains](/datashare/supported-chains) for the full list.
**Choose a dataset** — see [Supported Data](/datashare/supported-data) for available types (Token Transfers, Native Transfers, NFT Transfers, Swap Events, Liquidity Events, plus raw data).
**Select fields** — after choosing a dataset, expand the field list and select only the fields you need. More fields increase export size and GB consumption proportionally.
DataShare exports raw on-chain data. Token names, symbols, logos, spam labels, and metadata enrichment are **not included**. Plan for separate metadata enrichment post-export if needed.
***
### Step 2: Apply Filters
Set date range, wallet address, and token address filters to control the scope and cost of your export. See [Filters & Scoping](/datashare/filters-and-scoping) for full details.
***
### Step 3: Choose Destination & Format
**Output Format**
| Format | Best For | Notes |
| ----------- | ------------------------------- | --------------------------------------------------------------- |
| **Parquet** | Athena, Spark, DuckDB, BigQuery | Columnar, highly compressed (5–10x). Recommended for analytics. |
| **CSV** | Excel, general compatibility | Larger files than Parquet. Compresses well with gzip. |
| **JSON** | Debugging, human inspection | Largest output. Useful for spot-checking data. |
**S3 Destination**
Select a saved destination or add a new one. Destination profiles are reusable across future jobs. See [S3 Bucket Setup](/datashare/s3-bucket-setup) for configuration instructions, or [Export Options](/datashare/export-options) for all supported providers.
***
### Step 4: Estimate
Click **Estimate** before triggering the export. This gives you:
* The GB of credits the export will consume
* A sample row preview to verify your schema
Estimates are **free** and can be run as many times as needed.
***
### Step 5: Export
Once you click **Export**, the system locks your configuration and begins processing.
There is a **5-minute export window** after clicking Export. Top up credits and finalize your S3 configuration before this step. Navigating away or session timeout during this window may require re-running the estimate.
***
### Your First Export Recipe
Use this minimal configuration to validate the end-to-end flow without significant credit spend:
| Setting | Value | Rationale |
| -------------- | --------------------------------------------------------- | --------------------------------------------- |
| Chain | Ethereum | Highest activity; good scale test |
| Dataset | Token Transfers | Most commonly used; well-understood schema |
| Date Range | Last 24 hours | Smallest reasonable validation window |
| Wallet Address | 1 recognized address | Verify output matches known activity |
| Fields | `from`, `to`, `value`, `token_address`, `block_timestamp` | Minimal schema confirming data delivery |
| Format | Parquet | Smallest files; compatible with DuckDB/Athena |
**After exporting:**
1. Check your S3 bucket for output files
2. Query locally with DuckDB:
```sql theme={null}
SELECT * FROM read_parquet('*.parquet') LIMIT 10;
```
3. Or use Athena to query directly from S3
4. Confirm rows match the expected wallet activity
# S3 Bucket Setup
Source: https://docs.moralis.com/datashare/s3-bucket-setup
This is a comprehensive step-by-step walkthrough on how to set up an AWS S3 bucket for your Datashare exports.
What is Amazon S3?
* [https://www.youtube.com/watch?v=ecv-19sYL3w](https://www.youtube.com/watch?v=ecv-19sYL3w)
**Account Setup**
1. Login into the AWS console / create an Amazon S3 Cloud Objective Storage account here with your IAM user ID or Root User Email: [https://aws.amazon.com/s3/](https://aws.amazon.com/s3/)
* Note: AWS may require you to have a 2 Factor Authentication method when creating an account. You can download Google Auth or similar to satisfy this account creation requirement
**Creating an S3 Storage Bucket**
2. After you have successfully signed into your account, naviagete to Amazon S3
3. Click the Create bucket button:
4. When configuring the storage bucket follow these setup steps below:
* General configuration = General Purpose
* Bucket name = anything you want, example: "moralis-datashare-bucket"
5. Objective Ownership = ACLs disabled (recommended)
6. Block Public Access settings for this bucket = True
7. Bucket Versioning = Disabled
8. Tags are optional. Skip or include tags.
9. Default encryption = Keep SSE-S3 selected and Enable Bucket Key
10. Click Create Bucket
**Create a Bucket Policy with IAM user**
11. In the Searchbar type "IAM" and select "IAM Manage access to AWS resources"
* You will be brought to the IAM Dashboard if you are logged in.
12. On the left sidebar under Access Management, click "Users"
13. Click the "Create user" button.
14. Set the user name, example = "moralis-datashare-bucket-user"
* Leave unchecked "Provide user access to the AWS Management Console"
* Click Next
15. Click "Attach policies directly". This is the best approach for a single-purpose user.
16. In the Seachbar type "S3Full" and click Next.
17. Click "Create user".
**Access Keys**
18. Next, you need to create Access Keys for this IAM user.
* Click on your username, example: "moralis-datashare-bucket-user" then go to the "Security credentials" tab.
* Scroll down on this page, you'll see an "Access keys" section with a "Create access key" button. Click that.
* Select "Third-party service" — since Moralis Datashare is an external service that will write to your S3 bucket. Then click "Next".
* Set description tab, example: "Moralis Datashare S3 export" then click Create access key.
* You're key has been created.
**Moralis Datashare Dashboard - Configuration**
19. Navigate to the Moralis Datashare Dashboard by clicking on the Create Export button. [https://moralis.com/](https://moralis.com/)
20. Select the chain and data types that you want to fetch bulk blockchain data for.
21. Set your date range
22. Add a Wallet or Token Address
23. Set a Destination and Output format
* Add new S3 compadible storage destination for the export - input your S3 Keys here.
24. Select Destination.
25. Click "Estimate" to view the required GB for your export.
**Complete - You can now export Bulk Blockchain Data with Moralis Datashare!**
# Datashare Supported Chains
Source: https://docs.moralis.com/datashare/supported-chains
Blockchains supported by Moralis DataShare for bulk historical data exports.
### Datashare Supported Chains
Moralis Datashare provides **bulk access to historical blockchain data**, designed for analytics, data science, and large-scale ingestion workflows.
Datashare chain support depends on:
* Availability of complete historical datasets
* Storage and export readiness
* Data normalization maturity
Use the table below to see which chains are supported for Datashare and what datasets are available per chain.
| Chain Name | Chain ID | Token Transfers | NFT Transfers | Native Transfers | Swaps | Liquidity Events |
| --------------------------- | ------------------- | --------------- | ------------- | ---------------- | ----- | ---------------- |
| Ethereum Mainnet | 0x1 (1) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Ethereum Sepolia | 0xaa36a7 (11155111) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Polygon Mainnet | 0x89 (137) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Polygon Amoy | 0x13882 (80002) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Binance Smart Chain Mainnet | 0x38 (56) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Binance Smart Chain Testnet | 0x61 (97) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Arbitrum | 0xa4b1 (42161) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Base | 0x2105 (8453) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Base Sepolia | 0x14a34 (84532) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Optimism | 0xa (10) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Linea | 0xe708 (59144) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Linea Sepolia | 0xe705 (59141) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Avalanche | 0xa86a (43114) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Fantom Mainnet | 0xfa (250) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Cronos Mainnet | 0x19 (25) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Gnosis | 0x64 (100) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Gnosis Chiado | 0x27d8 (10200) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Chiliz Mainnet | 0x15b38 (88888) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Chiliz Testnet | 0x15b32 (88882) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Moonbeam | 0x504 (1284) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Moonriver | 0x505 (1285) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Moonbase | 0x507 (1287) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Flow | 0x2eb (747) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Flow Testnet | 0x221 (545) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Ronin | 0x7e4 (2020) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Ronin Saigon Testnet | 0x7e5 (2021) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Lisk | 0x46f (1135) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Lisk Sepolia Testnet | 0x106a (4202) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Pulsechain | 0x171 (369) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Sei | 0x531 (1329) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Sei Testnet | 0x530 (1328) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Monad | 0x8f (143) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Solana Mainnet | mainnet | ✓ | ✓ | ✓ | ✓ | ✗ |
# Datashare Supported Data
Source: https://docs.moralis.com/datashare/supported-data
Data types available through Moralis Datashare for bulk historical exports.
### Supported Data Types
Moralis Datashare provides access to two categories of blockchain data: **decoded data** with enriched, human-readable information, and **raw data** for lower-level blockchain primitives.
***
## Decoded Data
Decoded data is processed and enriched blockchain data that has been parsed, labeled, and normalized for easier analysis. These datasets include contextual information such as token metadata, event types, and standardized schemas.
| Data Type | Description |
| -------------------- | --------------------------------------------------------------------------------------------- |
| **Liquidity Events** | DEX liquidity pool additions and removals, including pool addresses, token pairs, and amounts |
| **Native Transfers** | Transfers of native blockchain currencies (ETH, MATIC, BNB, etc.) between addresses |
| **NFT Transfers** | ERC-721 and ERC-1155 token transfers with collection metadata and token IDs |
| **Swap Events** | DEX swap transactions including input/output tokens, amounts, and exchange rates |
| **Token Transfers** | ERC-20 token transfers with token metadata, amounts, and decimal normalization |
***
## Raw Data
Raw data provides direct access to blockchain primitives as they exist on-chain. These datasets are useful for custom parsing, low-level analysis, or when you need complete blockchain state data.
| Data Type | Description |
| ------------------------- | ----------------------------------------------------------------------------------------- |
| **Blocks** | Block headers including timestamps, gas limits, miner/validator info, and block hashes |
| **Transactions** | Complete transaction data including sender, recipient, value, gas, input data, and status |
| **Internal Transactions** | Trace-level internal calls and value transfers within transaction execution |
| **Logs** | Event logs emitted by smart contracts, including topics and raw data fields |
***
### Field Selection
When creating an export, you can select specific fields from each dataset. More fields increase export size and GB consumption proportionally — start with the minimum fields you actually need.
DataShare exports raw on-chain data. Token names, symbols, logos, spam labels, and metadata enrichment are **not included**. Plan for separate metadata enrichment post-export if needed.
***
### Data Availability
Data availability varies by chain. See the [Supported Chains](/datashare/supported-chains) page for a complete breakdown of which data types are available for each blockchain.
# Troubleshooting
Source: https://docs.moralis.com/datashare/troubleshooting
Common issues and mistakes when using Datashare, and how to resolve them.
### Common Mistakes
| Mistake | Consequence | Prevention |
| -------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------- |
| No filters on wide date range | Massive export; large credit spend | Add wallet/token filter for initial runs; estimate first |
| Selecting all fields | Larger-than-necessary export | Start with the minimum fields you actually need |
| Expecting metadata in output | No token names, symbols, logos, or spam labels | Plan separate metadata enrichment post-export |
| No S3 destination configured | Export cannot proceed | Set up bucket and IAM before hitting Export |
| Incorrect bucket permissions | Job failure | Confirm IAM policy includes `s3:PutObject` on the correct bucket ARN |
| Skipping the estimate | Unexpected credit spend | Always estimate — it's free and instant |
| Topping up after clicking Export | Export may fail if credits run out; 5-minute window expires | Top up before running the estimate |
***
### Failed Exports
The most common cause of failed exports is **incorrect bucket credentials or missing write permissions** on the IAM user.
Double-check that:
* The **access key is active** and has not been revoked
* The IAM policy includes `s3:PutObject` on the **correct bucket ARN**
* The **bucket name and region** match your S3 configuration in Datashare
***
### Minimal IAM Policy
If you don't want to use `AmazonS3FullAccess`, you only need these three permissions on your bucket:
```json theme={null}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::YOUR-BUCKET-NAME",
"arn:aws:s3:::YOUR-BUCKET-NAME/*"
]
}
]
}
```
Replace `YOUR-BUCKET-NAME` with your actual S3 bucket name.
***
### Job States
| State | Meaning | Action |
| ------------- | ------------------------------------------ | -------------------------------------------------------- |
| **Pending** | Job queued, awaiting start | Wait for processing to begin |
| **Running** | Data extraction and S3 writing in progress | Monitor progress on the dashboard |
| **Completed** | Export finished — data is in your bucket | Access data via S3 Console, CLI, or analytics tooling |
| **Failed** | Error occurred | Check credentials, permissions, and bucket configuration |
There is no UI download link for completed exports. Data is accessed directly from your S3 bucket.
***
### High Estimates
If your estimate is higher than expected, check for:
* **Overly wide date ranges** — narrow to a single day or week
* **Too many selected fields** — start with the minimum you need
* **Missing wallet or token filters** — add filters to target specific activity
Estimates are free — iterate until the scope looks right before exporting.
# Get Your API Key
Source: https://docs.moralis.com/get-started/get-your-api-key
Learn how to get your Moralis API Key
To start using Moralis products, you’ll need an API key to authenticate your requests.
Follow this quick guide to create your account and retrieve your API key - then you'll be ready to make your [first request](/data-api/first-request).
## 1. Create Your Account
Sign up for a **free Moralis account** by visiting the [Moralis Dashboard](https://admin.moralis.com/register).
## 2. Navigate to Data APIs
Once registered, navigate to the [Data APIs section](https://admin.moralis.com/data-api) in the dashboard.
## 3. Copy Your API Key
Click the **copy** icon next to your API key to add it to your clipboard.
## 4. Manage API keys (optional)
You can also manage your keys from the **API Keys** section - including creating new keys or rotating existing ones.
That's it - you're now ready to make your [first API request](/data-api/first-request)
# Global API Reference
Source: https://docs.moralis.com/get-started/global-api-reference
This is a single, consolidated quick-reference catalog of the Moralis Data API endpoints.
A unified API to fetch balances, transfers, DeFi positions, PnL, NFTs, and fully decoded wallet activity across multiple chains.
### EVM Wallet API
A comprehensive suite of wallet-focused endpoints: balances, history, DeFi positions, PnL, approvals, and identity resolution.
| Endpoint | Description |
| :--------------------------------------------------------------------------------- | :----------------------------------------------------------- |
| [Wallet History](/data-api/evm/wallet/wallet-history) | Complete decoded activity feed for a wallet. |
| [Wallet Transactions](/data-api/evm/wallet/wallet-transactions) | Raw transaction list for a wallet. |
| [Decoded Transactions](/data-api/evm/wallet/decoded-transactions) | Human-readable transaction data and summaries. |
| [Token Balances](/data-api/evm/wallet/token-balances) | Multi-chain token holdings for a wallet in a single request. |
| [Token Balances (Legacy)](/data-api/evm/wallet/legacy/token-balances) | Single-chain legacy token balance endpoint. |
| [ERC-20 Token Balances (Legacy)](/data-api/evm/wallet/legacy/token-balances-erc20) | Older ERC-20 balance endpoint. |
| [Token Transfers](/data-api/evm/wallet/token-transfers) | ERC-20 transfer history for a wallet. |
| [Native Balance](/data-api/evm/wallet/native-balance) | Native currency balance for a wallet. |
| [Native Balances (Batch)](/data-api/evm/wallet/native-balances-batch) | Native balances for multiple wallets. |
| [NFT Balances](/data-api/evm/wallet/nft-balances) | Current NFT holdings for a wallet. |
| [NFT Collections](/data-api/evm/wallet/nft-collections) | NFT collections held by a wallet. |
| [NFT Transfers](/data-api/evm/wallet/nft-transfers) | NFT transfer history for a wallet. |
| [NFT Trades](/data-api/evm/wallet/nft-trades-by-wallet) | NFT trade history for a wallet. |
| [Net Worth](/data-api/evm/wallet/net-worth) | Total wallet value in USD. |
| [Wallet P\&L](/data-api/evm/wallet/wallet-pnl) | Profit / loss calculated per token. |
| [Wallet P\&L Summary](/data-api/evm/wallet/wallet-pnl-summary) | Aggregated profit / loss summary. |
| [Wallet Stats](/data-api/evm/wallet/wallet-stats) | General wallet statistics. |
| [Wallet Swaps](/data-api/evm/wallet/wallet-swaps) | DEX swap history for a wallet. |
| [Approvals](/data-api/evm/wallet/approvals) | Token approval / allowance data for a wallet. |
| [Chain Activity](/data-api/evm/wallet/chain-activity) | Multi-chain activity summary for a wallet. |
| [Wallet Protocols](/data-api/evm/wallet/wallet-protocols) | Summary of DeFi protocols used by a wallet. |
| [Wallet Positions](/data-api/evm/wallet/wallet-positions) | DeFi positions per protocol. |
| [Detailed Positions](/data-api/evm/wallet/detailed-positions) | Enhanced DeFi position breakdown. |
| [ENS Lookup](/data-api/evm/wallet/ens-lookup) | Resolve an ENS name to an address. |
| [Resolve Address](/data-api/evm/wallet/resolve-address) | Reverse-resolve an address to an ENS name. |
### EVM Token API
The most powerful Token API in Web3 — fetch, analyse, and monitor ERC-20 tokens across multiple chains, covering prices, balances, transfers, liquidity, holders, volume, profitability, and advanced safety signals.
#### Prices
| Endpoint | Description |
| :-------------------------------------------------------------------- | :---------------------------------------------- |
| [Token Price](/data-api/evm/token/prices/token-price) | Get real-time and historical price for a token. |
| [Token Prices (Batch)](/data-api/evm/token/prices/token-prices-batch) | Get prices for multiple tokens in one call. |
| [OHLC Candlesticks](/data-api/evm/token/prices/ohlc) | Get historical OHLC (Open-High-Low-Close) data. |
#### Transfers
| Endpoint | Description |
| :--------------------------------------------------------------- | :------------------------------------------------ |
| [Token Transfers](/data-api/evm/token/transfers/token-transfers) | Get transfer history by wallet or token contract. |
#### Metadata
| Endpoint | Description |
| :---------------------------------------------------------------------------- | :-------------------------------------------------- |
| [Token Metadata](/data-api/evm/token/metadata/token-metadata) | Get token details including name, symbol, and logo. |
| [Token Score](/data-api/evm/token/metadata/token-score) | Get safety / quality score for a token. |
| [Token Score Timeseries](/data-api/evm/token/metadata/token-score-timeseries) | Historical token score data over time. |
#### Pairs & Swaps
| Endpoint | Description |
| :--------------------------------------------------- | :--------------------------------------------------- |
| [Token Pairs](/data-api/evm/token/swaps/token-pairs) | Get DEX trading pairs, reserves, and liquidity data. |
| [Pair Stats](/data-api/evm/token/swaps/pair-stats) | Get stats for a specific DEX pair. |
| [Pair Swaps](/data-api/evm/token/swaps/pair-swaps) | Get recent swaps for a specific pair. |
| [Token Swaps](/data-api/evm/token/swaps/token-swaps) | Get swap history for a token. |
#### Holders
| Endpoint | Description |
| :------------------------------------------------------------------------------- | :-------------------------------------- |
| [Token Holders](/data-api/evm/token/holders/token-holders) | Get current holders of a token. |
| [Historical Token Holders](/data-api/evm/token/holders/historical-token-holders) | Get token holder counts over time. |
| [Token Holder Stats](/data-api/evm/token/holders/token-holder-stats) | Get holder distribution and statistics. |
#### Discovery
| Endpoint | Description |
| :----------------------------------------------------------------- | :--------------------------------------- |
| [Filtered Tokens](/data-api/evm/token/discovery/filtered-tokens) | Search tokens with advanced filters. |
| [Token Categories](/data-api/evm/token/discovery/token-categories) | Get available token categories. |
| [Top Gainers](/data-api/evm/token/discovery/top-gainers) | Get tokens with the highest price gains. |
| [Top Losers](/data-api/evm/token/discovery/top-losers) | Get tokens with the largest price drops. |
#### Signals
| Endpoint | Description |
| :----------------------------------------------------- | :-------------------------------------- |
| [Snipers](/data-api/evm/token/signals/snipers) | Detect sniper activity on a token. |
| [Top Traders](/data-api/evm/token/signals/top-traders) | Get top profitable traders for a token. |
### EVM NFT API
Everything needed to build NFT experiences: metadata, ownership, transfers, sales, rarity, floor prices, and marketplace activity.
#### Collections
| Endpoint | Description |
| :----------------------------------------------------------------------------------- | :------------------------------------ |
| [NFT Collections by Wallet](/data-api/evm/nft/collections/nft-collections-by-wallet) | Get NFT collections held by a wallet. |
| [NFTs by Collection](/data-api/evm/nft/collections/nfts-by-collection) | Get all NFTs in a collection. |
| [NFTs by Wallet](/data-api/evm/nft/collections/nfts-by-wallet) | Get all NFTs owned by a wallet. |
#### Metadata
| Endpoint | Description |
| :---------------------------------------------------------------------------------- | :------------------------------------- |
| [NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) | Get metadata for a specific NFT. |
| [NFT Metadata (Batch)](/data-api/evm/nft/metadata/nft-metadata-batch) | Get metadata for multiple NFTs. |
| [Collection Metadata](/data-api/evm/nft/metadata/collection-metadata) | Get collection-level metadata. |
| [Collection Metadata (Batch)](/data-api/evm/nft/metadata/collection-metadata-batch) | Get metadata for multiple collections. |
| [Collection Stats](/data-api/evm/nft/metadata/collection-stats) | Get statistics for a collection. |
#### Ownership
| Endpoint | Description |
| :------------------------------------------------------------------- | :------------------------------- |
| [Owners by Contract](/data-api/evm/nft/ownership/owners-by-contract) | List all owners of a collection. |
| [Owners by Token ID](/data-api/evm/nft/ownership/owners-by-token-id) | Get owner(s) of a specific NFT. |
#### Prices
| Endpoint | Description |
| :------------------------------------------------------------------------ | :------------------------------------ |
| [Collection Floor Price](/data-api/evm/nft/prices/collection-floor-price) | Current floor price for a collection. |
| [Floor Price by Token ID](/data-api/evm/nft/prices/floor) | Floor price for a specific token. |
| [Historical Floor Price](/data-api/evm/nft/prices/historical-floor-price) | Floor price history for a collection. |
| [Sale Price by Contract](/data-api/evm/nft/prices/sale-price-by-contract) | Last sale prices for a collection. |
| [Sale Price by Token ID](/data-api/evm/nft/prices/sale-price-by-token-id) | Last sale price for a specific NFT. |
#### Trades
| Endpoint | Description |
| :---------------------------------------------------------------- | :-------------------------------- |
| [Collection Trades](/data-api/evm/nft/trades/collection-trades) | Recent sales for a collection. |
| [Trades by Token ID](/data-api/evm/nft/trades/trades-by-token-id) | Trade history for a specific NFT. |
#### Transfers
| Endpoint | Description |
| :----------------------------------------------------------------------- | :----------------------------------- |
| [Collection Transfers](/data-api/evm/nft/transfers/collection-transfers) | Transfer history for a collection. |
| [Token ID Transfers](/data-api/evm/nft/transfers/token-id-transfers) | Transfer history for a specific NFT. |
#### Traits
| Endpoint | Description |
| :------------------------------------------------------------------------------------------ | :------------------------------------- |
| [NFTs by Traits](/data-api/evm/nft/traits/nfts-by-traits) | Filter NFTs by trait values. |
| [Traits by Collection](/data-api/evm/nft/traits/traits-by-collection) | Get all traits for a collection. |
| [Traits by Collection (Paginated)](/data-api/evm/nft/traits/traits-by-collection-paginated) | Paginated trait data for a collection. |
#### Discovery
| Endpoint | Description |
| :------------------------------------------------------------------- | :------------------------------------- |
| [NFTs by Market Cap](/data-api/evm/nft/discovery/nfts-by-market-cap) | Top NFT collections by market cap. |
| [NFTs by Volume](/data-api/evm/nft/discovery/nfts-by-volume) | Top NFT collections by trading volume. |
#### Utilities
| Endpoint | Description |
| :--------------------------------------------------------------------- | :----------------------------------------- |
| [Resync NFT Metadata](/data-api/evm/nft/utilities/resync-nft-metadata) | Trigger a metadata refresh for an NFT. |
| [Resync NFT Traits](/data-api/evm/nft/utilities/resync-nft-traits) | Trigger a traits refresh for a collection. |
### EVM DeFi API
Track DeFi positions, balances, rewards, and protocol interactions with enriched, protocol-aware data.
| Endpoint | Description |
| :----------------------------------------------------------------- | :------------------------------------- |
| [Wallet Protocols](/data-api/evm/defi/wallet-protocols) | Summary of protocols used by a wallet. |
| [Wallet Positions](/data-api/evm/defi/wallet-positions) | Detailed positions per protocol. |
| [Detailed Positions](/data-api/evm/defi/wallet-positions-detailed) | Enhanced position breakdown. |
### EVM Price API
Dedicated APIs to fetch comprehensive historical and real-time token and NFT price data.
| Endpoint | Description |
| :------------------------------------------------------------------------- | :----------------------------------------- |
| [Token Price](/data-api/evm/price/token-price) | Get real-time price for a token. |
| [Token Prices (Batch)](/data-api/evm/price/token-prices-batch) | Get prices for multiple tokens. |
| [OHLC Candlesticks](/data-api/evm/price/ohlc) | Get historical OHLC data. |
| [Collection Floor Price](/data-api/evm/price/collection-floor-price) | Current floor price for an NFT collection. |
| [Timeseries Floor Price](/data-api/evm/price/timeseries-floor-price) | Historical floor price data. |
| [Token ID Floor Price](/data-api/evm/price/token-id-floor-price) | Floor price for a specific token ID. |
| [Sale Prices by Collection](/data-api/evm/price/sale-prices-by-collection) | Sale prices for NFTs in a collection. |
| [Sale Price by Token ID](/data-api/evm/price/sale-price-by-token-id) | Last sale price for a specific NFT. |
### EVM Blockchain API
Core block-level data, logs, and internal transactions for EVM chains.
| Endpoint | Description |
| :-------------------------------------------------------------------------------------- | :------------------------------------------ |
| [Address Transactions](/data-api/evm/blockchain/address-transactions) | Get transactions for an address. |
| [Address Transactions (Decoded)](/data-api/evm/blockchain/address-transactions-decoded) | Get decoded transactions for an address. |
| [Block by Hash](/data-api/evm/blockchain/block-by-hash) | Retrieve a block by its hash. |
| [Block by Date](/data-api/evm/blockchain/block-by-date) | Retrieve the closest block to a given date. |
| [Latest Block](/data-api/evm/blockchain/latest-block) | Get the latest block number. |
| [Transaction by Hash](/data-api/evm/blockchain/transaction-by-hash) | Get a transaction by its hash. |
| [Transaction by Hash (Decoded)](/data-api/evm/blockchain/transaction-by-hash-decoded) | Get a decoded transaction by its hash. |
### Solana API
#### Solana Wallet API
| Endpoint | Description |
| :------------------------------------------------------- | :-------------------------------------------- |
| [Native Balance](/data-api/solana/wallet/native-balance) | Get the native SOL balance for a wallet. |
| [Token Balances](/data-api/solana/wallet/token-balances) | Get SPL token balances for a wallet. |
| [Wallet Swaps](/data-api/solana/wallet/wallet-swaps) | Get swap transactions for a wallet. |
| [Wallet Portfolio](/data-api/solana/wallet/portfolio) | Get complete portfolio overview for a wallet. |
| [NFT Balances](/data-api/solana/wallet/nft-balances) | Get NFT balances for a wallet. |
#### Solana Token API
**Metadata & Scores**
| Endpoint | Description |
| :---------------------------------------------------------------------- | :-------------------------------------- |
| [Token Metadata](/data-api/solana/token/token-metadata) | Get metadata for an SPL token. |
| [Token Metadata (Batch)](/data-api/solana/token/token-metadata-batch) | Get metadata for multiple SPL tokens. |
| [Token Score](/data-api/solana/token/token-score) | Get safety / quality score for a token. |
| [Token Score Timeseries](/data-api/solana/token/token-score-timeseries) | Historical token score data. |
**Prices**
| Endpoint | Description |
| :----------------------------------------------------------------------- | :-------------------------------------- |
| [Token Price](/data-api/solana/token/prices/token-price) | Get real-time price for a Solana token. |
| [Token Prices (Batch)](/data-api/solana/token/prices/token-prices-batch) | Get prices for multiple Solana tokens. |
| [OHLC Candlesticks](/data-api/solana/token/prices/ohlc) | Get OHLC price data for a Solana token. |
**Pairs & Swaps**
| Endpoint | Description |
| :-------------------------------------------------------- | :-------------------------------- |
| [Token Pairs](/data-api/solana/token/pairs/token-pairs) | Get DEX pairs for a Solana token. |
| [Pair Stats](/data-api/solana/token/pairs/pair-stats) | Get stats for a specific pair. |
| [Pair Swaps](/data-api/solana/token/pairs/pair-swaps) | Get recent swaps for a pair. |
| [Token Swaps](/data-api/solana/token/swaps/token-swaps) | Get swap history for a token. |
| [Wallet Swaps](/data-api/solana/token/swaps/wallet-swaps) | Get swap history for a wallet. |
**Holders**
| Endpoint | Description |
| :---------------------------------------------------------------------- | :------------------------------- |
| [Top Holders](/data-api/solana/token/holders/top-holders) | Get top holders of a token. |
| [Historical Holders](/data-api/solana/token/holders/historical-holders) | Get holder counts over time. |
| [Holder Metrics](/data-api/solana/token/holders/holder-metrics) | Get holder distribution metrics. |
**Market Metrics**
| Endpoint | Description |
| :--------------------------------------------------------------------------------------------- | :--------------------------------- |
| [Token Analytics](/data-api/solana/token/market-metrics/token-analytics) | Get market analytics for a token. |
| [Token Analytics (Batch)](/data-api/solana/token/market-metrics/token-analytics-batch) | Get analytics for multiple tokens. |
| [Token Analytics Timeseries](/data-api/solana/token/market-metrics/token-analytics-timeseries) | Historical analytics data. |
**Discovery**
| Endpoint | Description |
| :------------------------------------------------------------------------------------------------- | :------------------------------------------ |
| [Token Search](/data-api/solana/token/search-and-discovery/token-search) | Search for Solana tokens by name or symbol. |
| [Filtered Tokens](/data-api/solana/token/search-and-discovery/filtered-tokens) | Search tokens with advanced filters. |
| [Top Gainers](/data-api/solana/token/search-and-discovery/top-gainers) | Get tokens with the highest price gains. |
| [Top Losers](/data-api/solana/token/search-and-discovery/top-losers) | Get tokens with the largest price drops. |
| [Pump.fun New Tokens](/data-api/solana/token/search-and-discovery/pump-fun-new-tokens) | Get newly created Pump.fun tokens. |
| [Pump.fun Bonding Tokens](/data-api/solana/token/search-and-discovery/pump-fun-bonding-tokens) | Get Pump.fun tokens in bonding phase. |
| [Pump.fun Bonding Status](/data-api/solana/token/search-and-discovery/pump-fun-bonding-status) | Get bonding status for a Pump.fun token. |
| [Pump.fun Graduated Tokens](/data-api/solana/token/search-and-discovery/pump-fun-graduated-tokens) | Get graduated Pump.fun tokens. |
**Signals**
| Endpoint | Description |
| :--------------------------------------------------------- | :---------------------------------------- |
| [Snipers](/data-api/solana/token/advanced-signals/snipers) | Detect sniper activity on a Solana token. |
#### Solana NFT API
| Endpoint | Description |
| :------------------------------------------------ | :----------------------------- |
| [NFT Metadata](/data-api/solana/nft/nft-metadata) | Get metadata for a Solana NFT. |
#### Solana Price API
| Endpoint | Description |
| :---------------------------------------------------------------- | :-------------------------------------- |
| [Token Price](/data-api/solana/price/token-price) | Get real-time price for a Solana token. |
| [Token Prices (Batch)](/data-api/solana/price/token-prices-batch) | Get prices for multiple Solana tokens. |
| [OHLC Candlesticks](/data-api/solana/price/ohlc) | Get OHLC price data for a Solana token. |
### Universal API
Cross-chain data covering token analytics, entity data, and market metrics.
#### Token API
| Endpoint | Description |
| :------------------------------------------------------------------------------------------- | :-------------------------------------- |
| [Token Analytics](/data-api/universal/token/analytics/token-analytics) | Get cross-chain analytics for a token. |
| [Token Analytics (Multi)](/data-api/universal/token/analytics/token-analytics-multi) | Get analytics for multiple tokens. |
| [Token Analytics Timeseries](/data-api/universal/token/analytics/token-analytics-timeseries) | Historical cross-chain analytics. |
| [Token Score](/data-api/universal/token/score/token-score) | Get cross-chain safety / quality score. |
| [Token Score Timeseries](/data-api/universal/token/score/token-score-timeseries) | Historical token score data. |
| [Token Search](/data-api/universal/token/search/token-search) | Search tokens across all chains. |
| [Filtered Tokens](/data-api/universal/token/filtered-tokens) | Search tokens with advanced filters. |
| [Trending Tokens](/data-api/universal/token/trending-tokens) | Get currently trending tokens. |
| [Top Gainers](/data-api/universal/token/top-gainers) | Get top gaining tokens across chains. |
| [Top Losers](/data-api/universal/token/top-losers) | Get top losing tokens across chains. |
#### Entity API
| Endpoint | Description |
| :---------------------------------------------------------------------------- | :------------------------------------------------------ |
| [Entity Search](/data-api/universal/entity/endpoints/entity-search) | Search for known entities (exchanges, protocols, etc.). |
| [Entity by ID](/data-api/universal/entity/endpoints/entity-by-id) | Get entity details by ID. |
| [Entity by Category](/data-api/universal/entity/endpoints/entity-by-category) | Get entities filtered by category. |
| [Entity Categories](/data-api/universal/entity/endpoints/entity-categories) | List all entity categories. |
#### Trading Stats API
| Endpoint | Description |
| :---------------------------------------------------------------------------------------------------------- | :-------------------------------------- |
| [Trading Stats](/data-api/universal/global/endpoints/trading-stats) | Get global trading statistics. |
| [Trading Stats by Category](/data-api/universal/global/endpoints/trading-stats-category) | Get trading stats filtered by category. |
| [Trading Stats Timeseries](/data-api/universal/global/endpoints/trading-stats-timeseries) | Historical global trading data. |
| [Trading Stats Category Timeseries](/data-api/universal/global/endpoints/trading-stats-category-timeseries) | Historical trading data by category. |
### Streams API
Real-time blockchain event streaming via webhooks. Create and manage streams that push decoded blockchain data to your backend.
#### Stream Management
| Endpoint | Description |
| :-------------------------------------------------------------------------- | :--------------------------- |
| [Create Stream](/streams/api-reference/streams/create-streams) | Create a new stream. |
| [Get Streams](/streams/api-reference/streams/get-streams) | List all streams. |
| [Get Stream by ID](/streams/api-reference/streams/get-stream-by-id) | Get a specific stream. |
| [Update Stream](/streams/api-reference/streams/update-stream) | Update stream configuration. |
| [Update Stream Status](/streams/api-reference/streams/update-stream-status) | Pause or resume a stream. |
| [Delete Stream](/streams/api-reference/streams/delete-stream) | Delete a stream. |
| [Duplicate Stream](/streams/api-reference/streams/duplicate-stream) | Clone an existing stream. |
#### Address Management
| Endpoint | Description |
| :-------------------------------------------------------------------------- | :------------------------------- |
| [Add Address](/streams/api-reference/streams/add-address-to-stream) | Add an address to a stream. |
| [Get Addresses](/streams/api-reference/streams/get-addresses-by-stream) | List addresses on a stream. |
| [Replace Address](/streams/api-reference/streams/replace-address-on-stream) | Replace an address on a stream. |
| [Delete Address](/streams/api-reference/streams/delete-address-from-stream) | Remove an address from a stream. |
#### History & Replay
| Endpoint | Description |
| :-------------------------------------------------------------- | :-------------------------------- |
| [Get History](/streams/api-reference/history/get-history) | Get webhook delivery history. |
| [Get Logs](/streams/api-reference/history/get-logs) | Get stream processing logs. |
| [Replay History](/streams/api-reference/history/replay-history) | Replay missed webhook deliveries. |
#### Project Settings
| Endpoint | Description |
| :-------------------------------------------------------------------------- | :---------------------------- |
| [Get Project Settings](/streams/api-reference/project/get-project-settings) | Get current project settings. |
| [Set Project Settings](/streams/api-reference/project/set-project-settings) | Update project settings. |
#### Statistics
| Endpoint | Description |
| :---------------------------------------------------------------------- | :------------------------------------ |
| [Get Stats](/streams/api-reference/stats/get-stats) | Get global stream statistics. |
| [Get Stats by Stream](/streams/api-reference/stats/get-stats-by-stream) | Get statistics for a specific stream. |
#### Webhook Data
| Endpoint | Description |
| :--------------------------------------------------------------------------------------------- | :---------------------------------------- |
| [Get Webhook Data by Block](/streams/api-reference/streams/get-webhook-data-by-block-number) | Get webhook payload for a specific block. |
| [Send Webhook Data by Block](/streams/api-reference/streams/send-webhook-data-by-block-number) | Manually trigger webhook for a block. |
### Cortex API
AI-powered blockchain data query engine.
| Endpoint | Description |
| :-------------------------------- | :-------------------------------------------- |
| [Chat](/data-api/cortex-api/chat) | Query blockchain data using natural language. |
# Pricing
Source: https://docs.moralis.com/get-started/pricing
Pricing information about our products.
All Moralis plans come with generous monthly request limits. The number of included requests depends on your plan - check the [pricing page](#) for details.
Moralis uses **Compute Units (CUs)** as a standard way to measure and bill for usage across all products - including [Data API](/data-api/overview), [Streams](/streams/overview), [Datashare](/datashare/overview), and [RPC Nodes](/rpc-nodes/overview).
CUs provide a unified way to account for **computational complexity** and **rate limits**, regardless of the product you're using.
## What is a Compute Unit?
A **Compute Unit (CU)** represents the relative computational cost of a request, task, or operation within the Moralis platform. Simple operations consume fewer CUs, while more complex or resource-intensive ones consume more.
For example:
* A basic wallet balance check may consume a small number of CUs.
* A multi-chain portfolio aggregation, or a high-frequency stream of on-chain events, may consume significantly more.
CUs ensure you're only billed for the resources you actually use - and that high-load workloads are fairly metered across the system.
## CU Cost
Each product applies CU-based billing differently. Generally:
* **CUs are deducted from your plan’s included quota**.
* **Usage beyond your quota may incur overage charges**, depending on your plan and product.
Visit the individual pricing pages to see how CUs apply to each product:
* [Data API Pricing](/data-api/pricing)
* [Streams Pricing](/streams/pricing)
* [Datashare Pricing](#)
* [Nodes Pricing](/rpc-nodes/pricing)
## Dynamic Endpoints
Some API endpoints have **dynamic CU costs** that scale based on the scope of the request. Instead of a fixed cost per call, these endpoints charge a base CU amount multiplied by a variable factor such as the number of chains, wallets, or addresses involved.
For example:
* An endpoint costing **50 CUs per chain** that queries 3 chains will consume **150 CUs** total.
* An endpoint costing **250 CUs per chain** that queries 5 chains will consume **1,250 CUs** total.
Dynamic endpoints are clearly marked on their respective documentation pages. You can find CU costs for all endpoints on the individual product pricing pages listed above.
## CU Throughput (CU/s)
CUs are also used to enforce **rate limits**, measured in **CUs per second (CU/s)**.
This helps manage request throughput and protect system performance - allowing heavier requests to be made less frequently, while lightweight calls remain fast and responsive.
Different products may enforce CU/s limits differently. Check the respective documentation for details.
# Quickstart Guides
Source: https://docs.moralis.com/get-started/quickstart-guides
Get up and running with Moralis APIs and services.
Choose a product to get started:
Query blockchain data across 30+ chains with a unified API.
Receive real-time blockchain events via webhooks.
Access raw blockchain data for analytics and indexing.
Connect to blockchain nodes with reliable RPC endpoints.
Build custom indexes with SQL-based queries (Early Access).
Authenticate users with wallet signatures.
# Supported Chains
Source: https://docs.moralis.com/get-started/supported-chains
Overview of all blockchain networks supported by Moralis across Data APIs, Streams, Datashare and RPC.
### Supported Chains
Moralis supports a wide range of EVM and non-EVM blockchain networks across its product stack, including Data APIs, Streams, Datashare, and RPC nodes.
This page provides a **high-level view of chain coverage across Moralis**, helping you quickly understand:
* Which chains are actively supported
* Which products are available per chain
* Where coverage may differ between products
| Chain Name | Type | Chain ID | Data API | Streams | Datashare | RPC Nodes | Auth API |
| --------------------------- | ------- | ------------------- | -------- | ------- | --------- | --------- | -------- |
| Ethereum Mainnet | Mainnet | 0x1 (1) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Ethereum Sepolia | Testnet | 0xaa36a7 (11155111) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Polygon Mainnet | Mainnet | 0x89 (137) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Polygon Amoy | Testnet | 0x13882 (80002) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Binance Smart Chain Mainnet | Mainnet | 0x38 (56) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Binance Smart Chain Testnet | Testnet | 0x61 (97) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Arbitrum | Mainnet | 0xa4b1 (42161) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Base | Mainnet | 0x2105 (8453) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Base Sepolia | Testnet | 0x14a34 (84532) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Optimism | Mainnet | 0xa (10) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Linea | Mainnet | 0xe708 (59144) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Linea Sepolia | Testnet | 0xe705 (59141) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Avalanche | Mainnet | 0xa86a (43114) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Fantom Mainnet | Mainnet | 0xfa (250) | ✓ | ✓ | ✓ | ✗ | ✓ |
| Cronos Mainnet | Mainnet | 0x19 (25) | ✓ | ✓ | ✓ | ✗ | ✓ |
| Gnosis | Mainnet | 0x64 (100) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Gnosis Chiado | Testnet | 0x27d8 (10200) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Chiliz Mainnet | Mainnet | 0x15b38 (88888) | ✓ | ✓ | ✓ | ✗ | ✓ |
| Chiliz Testnet | Testnet | 0x15b32 (88882) | ✓ | ✓ | ✓ | ✗ | ✓ |
| Moonbeam | Mainnet | 0x504 (1284) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Moonriver | Testnet | 0x505 (1285) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Moonbase | Testnet | 0x507 (1287) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Flow | Mainnet | 0x2eb (747) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Flow Testnet | Testnet | 0x221 (545) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Ronin | Mainnet | 0x7e4 (2020) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Ronin Saigon Testnet | Testnet | 0x7e5 (2021) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Lisk | Mainnet | 0x46f (1135) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Lisk Sepolia Testnet | Testnet | 0x106a (4202) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Pulsechain | Mainnet | 0x171 (369) | ✓ | ✓ | ✓ | ✓ | ✗ |
| Sei | Mainnet | 0x531 (1329) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Sei Testnet | Testnet | 0x530 (1328) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Monad | Mainnet | 0x8f (143) | ✓ | ✓ | ✓ | ✗ | ✓ |
| Solana Mainnet | Mainnet | mainnet | ✓ | ✗ | ✓ | ✗ | ✗ |
For product-specific details, see the dedicated supported-chains pages below.
Related pages:
* [Data API Supported Chains](/data-api/supported-chains)
* [Streams Supported Chains](/streams/supported-chains)
* [Datashare Supported Chains](/datashare/supported-chains)
* [RPC Node Supported Chains](/rpc-nodes/supported-chains)
# How to Authenticate Users with Coinbase Wallet
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-coinbase-wallet
This tutorial will teach you how to add secure Web3 Moralis authentication to your NextJS application by walking you through creating a full-stack Web3 authentication solution using the popular NextJS framework.
## Before Starting
You can start this tutorial if you already have a NextJS dapp with [MetaMask sign-in](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask) functionality.
## Configuring the Coinbase Wallet Connector
1. Open the `pages/signin.jsx` file and add `CoinbaseWalletConnector` as a connector to `connectAsync()`:
```javascript theme={null}
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
import { signIn } from 'next-auth/react'
import { useAccount, useConnect, useSignMessage, useDisconnect } from 'wagmi'
import { useRouter } from 'next/router'
import { useAuthRequestChallengeEvm } from '@moralisweb3/next'
function SignIn() {
const { connectAsync } = useConnect()
const { disconnectAsync } = useDisconnect()
const { isConnected } = useAccount()
const { signMessageAsync } = useSignMessage()
const { push } = useRouter()
const { requestChallengeAsync } = useAuthRequestChallengeEvm()
const handleAuth = async () => {
if (isConnected) {
await disconnectAsync()
}
const { account, chain } = await connectAsync({
connector: new CoinbaseWalletConnector({
options: {
appName: 'amazing.finance',
},
}),
})
const userData = { address: account, chain: chain.id, network: 'evm' }
const { message } = await requestChallengeAsync(userData)
const signature = await signMessageAsync({ message })
// redirect user after success authentication to '/user' page
const { url } = await signIn('moralis-auth', {
message,
signature,
redirect: false,
callbackUrl: '/user',
})
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url)
}
return (
Web3 Authentication
)
}
export default SignIn
```
## Testing the Coinbase Wallet Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin) to test authentication.
1. Click on `Authenticate via Coinbase Wallet`
2. Connect Coinbase Wallet
3. Sign the message
4. After successful authentication, you will be redirected to the `/user` page
5. Visit [`http://localhost:3000/user`](http://localhost:3000/user) to test the user session's functionality:
* When a user is authenticated, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page. ([***`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT [JWE] stored inside. It contains session info [such as an address and signed message] in the user's browser.`***](https://jwt.io/introduction))
# How to Authenticate Users with Magic.Link
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-magic-link
This tutorial will teach you how to add secure Web3 Moralis authentication to your NextJS application by walking you through the task of creating a full-stack Web3 authentication solution using the popular NextJS framework.
## Before Starting
You can start this tutorial if you already have a NextJS dapp with [MetaMask sign-in](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask) functionality.
## Installing the Magic Connector
[WAGMI Magic Connector](https://www.npmjs.com/package/@everipedia/wagmi-magic-connector) - the easiest way to add [Magic.Link authentication](https://magic.link/auth) for dapps using [wagmi](https://wagmi.sh/):
```bash npm2yarn theme={null}
npm install @everipedia/wagmi-magic-connector
```
## Configuring the Magic Connector
1. Open the`pages/signin.jsx` file and add `MagicConnector` as a connector to the `useConnect()` hook:
```javascript theme={null}
import { MagicAuthConnector } from "@everipedia/wagmi-magic-connector";
import { signIn } from "next-auth/react";
import { useAccount, useConnect, useSignMessage, useDisconnect } from "wagmi";
import { useRouter } from "next/router";
import { useAuthRequestChallengeEvm } from "@moralisweb3/next";
function SignIn() {
const { connectAsync } = useConnect({
connector: new MagicAuthConnector({
options: {
apiKey: "YOUR_MAGIC_LINK_API_KEY", //required
},
}),
});
const { disconnectAsync } = useDisconnect();
const { isConnected } = useAccount();
const { signMessageAsync } = useSignMessage();
const { requestChallengeAsync } = useAuthRequestChallengeEvm();
const { push } = useRouter();
const handleAuth = async () => {
if (isConnected) {
await disconnectAsync();
}
const { account } = await connectAsync();
const { message } = await requestChallengeAsync({
address: account,
chainId: "0x1",
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
return (
Web3 Authentication
);
}
export default SignIn;
```
## Testing the WalletConnect Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin) to test authentication.
1. Click on `Authenticate via Magic.Link`
2. Enter your email
3. Verify the login from your email
4. After successful authentication, you will be redirected to the `/user` page
5. Visit [`http://localhost:3000/user`](http://localhost:3000/user) to test the user session's functionality:
* When a user is authenticated, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page. ([***`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT [JWE] stored inside. It contains session info [such as an address and signed message] in the user's browser.`***](https://jwt.io/introduction))
# How to Authenticate Users with MetaMask
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-meta-mask
## Introduction
This tutorial demonstrates how to create a NextJS application that allows users to log in using their Web3 wallets.
After Web3 wallet authentication, the [**next-auth**](https://next-auth.js.org/) library creates a session cookie with an encrypted [**JWT**](https://jwt.io/introduction) (**JWE**) stored inside. It contains session info (such as an address, signed message, and expiration time) in the user's browser. It's a secure way to store users' info without a database, and it's impossible to read/modify the **JWT** without a [secret key](https://next-auth.js.org/configuration/options#secret).
Once the user is logged in, they will be able to visit a page that displays all their user data.
You can find the repository with the final code [here](https://github.com/MoralisWeb3/demo-apps/tree/main/nextjs_moralis_auth).
You can find the final dapp with implemented style on our [GitHub](https://github.com/MoralisWeb3/Moralis-JS-SDK/tree/beta/demos/nextjs).
## Prerequisites
1. Create a [Moralis account](https://www.moralis.io).
2. Install and set up [Visual Studio](https://code.visualstudio.com/).
3. Create your NextJS dapp (you can create it using [**create-next-app**](https://nextjs.org/docs/api-reference/create-next-app) or follow the **NextJS dapp** tutorial).
## Install the Required Dependencies
1. Install `moralis` and `@moralisweb3/next` (if not installed) and `next-auth`dependencies:
```bash npm2yarn theme={null}
npm install moralis @moralisweb3/next next-auth
```
2. To implement authentication using a Web3 wallet (e.g., MetaMask), we need to use a Web3 library. For the tutorial, we will use [wagmi](https://wagmi.sh/docs/getting-started). So, install the `wagmi` dependency:
```bash npm2yarn theme={null}
npm install wagmi viem
```
3. Add new environment variables in your `.env.local` file in the app root:
* **APP\_DOMAIN**: RFC 4501 DNS authority that is requesting the signing.
* **MORALIS\_API\_KEY**: You can get it [here](https://admin.moralis.com/account/profile).
* **NEXTAUTH\_URL**: Your app address. In the development stage, use [`http://localhost:3000`](http://localhost:3000).
* **NEXTAUTH\_SECRET**: Used for encrypting JWT tokens of users. You can put any value here or generate it on [`https://generate-secret.now.sh/32`](https://generate-secret.now.sh/32). Here's an `.env.local` example:
```text .env.local theme={null}
APP_DOMAIN=amazing.finance
MORALIS_API_KEY=xxxx
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=7197b3e8dbee5ea6274cab37245eec212
```
Keep your `NEXTAUTH_SECRET` value in secret to prevent security problems.\
\
Every time you modify the `.env.local` file, you need to restart your dapp.
## Wrapping App with `WagmiConfig` and `SessionProvider`
4. Create the `pages/_app.jsx` file. We need to wrap our pages with `WagmiConfig` ([docs](https://wagmi.sh/docs/WagmiConfig)) and `SessionProvider` ([docs](https://next-auth.js.org/getting-started/client#sessionprovider)):
```javascript theme={null}
import { createConfig, configureChains, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import { SessionProvider } from "next-auth/react";
import { mainnet } from "wagmi/chains";
const { publicClient, webSocketPublicClient } = configureChains(
[mainnet],
[publicProvider()]
);
const config = createConfig({
autoConnect: true,
publicClient,
webSocketPublicClient,
});
function MyApp({ Component, pageProps }) {
return (
);
}
export default MyApp;
```
NextJS uses the `App` component to initialize pages. You can override it and control the page initialization. Check out the [NextJS docs](https://nextjs.org/docs/advanced-features/custom-app).
## Configure Next-Auth and MoralisNextAuth
5. Create a new file, `pages/api/auth/[...nextauth].js`, with the following content:
```javascript Javascript theme={null}
import NextAuth from "next-auth";
import { MoralisNextAuthProvider } from "@moralisweb3/next";
export default NextAuth({
providers: [MoralisNextAuthProvider()],
// adding user info to the user session object
callbacks: {
async jwt({ token, user }) {
if (user) {
token.user = user;
}
return token;
},
async session({ session, token }) {
session.user = token.user;
return session;
},
},
});
```
```typescript theme={null}
import NextAuth from "next-auth";
import { MoralisNextAuthProvider } from "@moralisweb3/next";
export default NextAuth({
providers: [MoralisNextAuthProvider()],
// adding user info to the user session object
callbacks: {
async jwt({ token, user }) {
if (user) {
token.user = user;
}
return token;
},
async session({ session, token }) {
(session as { user: unknown }).user = token.user;
return session;
},
},
});
```
6. Add an authenticating config to the `pages/api/moralis/[...moralis].ts`:
```javascript theme={null}
import { MoralisNextApi } from "@moralisweb3/next";
export default MoralisNextApi({
apiKey: process.env.MORALIS_API_KEY,
authentication: {
domain: "amazing.dapp",
uri: process.env.NEXTAUTH_URL,
timeout: 120,
},
});
```
## Create Sign-In Page
7. Create a new page file, `pages/signin.jsx`, with the following content:
```javascript theme={null}
function SignIn() {
return (
);
}
export default SignIn;
```
## Secure Authentication after Signing and Verifying the Signed Message
10. Return to the `pages/signin.jsx` file. Let's add the `next-auth` authentication:
```javascript theme={null}
import { MetaMaskConnector } from "wagmi/connectors/metaMask";
import { signIn } from "next-auth/react";
import { useAccount, useConnect, useSignMessage, useDisconnect } from "wagmi";
import { useRouter } from "next/router";
import { useAuthRequestChallengeEvm } from "@moralisweb3/next";
function SignIn() {
const { connectAsync } = useConnect();
const { disconnectAsync } = useDisconnect();
const { isConnected } = useAccount();
const { signMessageAsync } = useSignMessage();
const { requestChallengeAsync } = useAuthRequestChallengeEvm();
const { push } = useRouter();
const handleAuth = async () => {
if (isConnected) {
await disconnectAsync();
}
const { account, chain } = await connectAsync({
connector: new MetaMaskConnector(),
});
const { message } = await requestChallengeAsync({
address: account,
chainId: chain.id,
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
return (
Web3 Authentication
);
}
export default SignIn;
```
## Showing the User Profile
11. Let's create a user page, `pages/user.jsx`, with the following content:
```javascript theme={null}
import { getSession, signOut } from "next-auth/react";
// gets a prop from getServerSideProps
function User({ user }) {
return (
User session:
{JSON.stringify(user, null, 2)}
);
}
export async function getServerSideProps(context) {
const session = await getSession(context);
// redirect if not authenticated
if (!session) {
return {
redirect: {
destination: "/signin",
permanent: false,
},
};
}
return {
props: { user: session.user },
};
}
export default User;
```
## Testing the MetaMask Wallet Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin`) to test the authentication.
1. Click on the `Authenticate via Metamask` button:
2. Connect the MetaMask wallet
3. Sign the message
4. After successful authentication, you will be redirected to the `/user` page
5. Visit [`http://localhost:3000/user`](http://localhost:3000/user`) to test the user session functionality:
* When a user authenticates, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page.
* (**Explanation:** [*****`After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT (JWE) stored inside. It contains session info [such as an address and signed message] in the user's browser.)`*****](https://jwt.io/introduction)
*
# How to Authenticate Users with MetaMask using Angular
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-meta-mask-using-angular
Learn how Moralis authentication works and see how to add secure authentication to your Angular dapp. This tutorial covers how to create full-stack Web3 authentication using the popular Angular framework.
## Introduction
This tutorial demonstrates how to create an Angular application that allows users to log in using their Web3 wallets.
After Web3 wallet authentication, the server creates a session cookie with a signed [JWT](https://jwt.io/introduction) stored inside. It contains session info (such as an address, signed message) in the user's browser.
Once the user is logged in, they will be able to visit a page that displays all their user data.
## Prerequisites
1. Follow the Your First Dapp - Angular tutorial to set up your Angular dapp and server
## Install the Required Dependencies
To implement authentication using a Web3 wallet (e.g., MetaMask), we will use a Web3 library. For the tutorial, we will use [@wagmi/core](https://github.com/wagmi-dev/wagmi/tree/main/packages/core).
1. Install `@wagmi/core`, `@wagmi/connectors`, `viem@2.x`, and `axios` dependencies.
```bash npm2yarn theme={null}
npm install @wagmi/core @wagmi/connectors viem@2.x
```
2. Generate an environment file for our Angular app:
```bash npm2yarn theme={null}
ng generate environments
```
3. Open `src/environments/environment.ts` and `src/environments/environment.prod.ts` - add a variable of `SERVER_URL` for our server.
```typescript theme={null}
export const environment = {
SERVER_URL: "http://localhost:3000",
};
```
4. We will generate two components (pages) - `/signin` (to authenticate) and `/user` (to show the user profile):
```shell theme={null}
ng generate component signin
ng generate component user
```
5. Open `src/app/app.routes.ts`, add these two components as routes:
```typescript theme={null}
import { SigninComponent } from "./signin/signin.component";
import { UserComponent } from "./user/user.component";
const routes: Routes = [
{ path: "signin", component: SigninComponent },
{ path: "user", component: UserComponent },
];
```
## Initial Setup
We will do an initial setup of our `/signin` and `/user` pages to make sure they work before integrating with our server.
1. Open `src/app/signin/signin.component.html` and replace the contents with:
```typescript theme={null}
Web3 Authentication
```
2. Open `src/app/signin/signin.component.ts` and add an empty `handleAuth` function below `ngOnInit(): void {}`:
```typescript theme={null}
ngOnInit(): void {}
async handleAuth() {}
```
3. Run `npm run start` and open [`http://localhost:4200/signin`](http://localhost:4200/signin) in your browser. It should look like:
4. Import `NgIf` in `src/app/user/user.component.ts`:
```typescript theme={null}
import { Component } from "@angular/core";
import { NgIf } from "@angular/common"; // Import NgIf
@Component({
selector: "app-user",
standalone: true,
imports: [NgIf], // Include NgIf in the imports array
templateUrl: "./user.component.html",
styleUrls: ["./user.component.css"],
})
export class UserComponent {}
```
5. Open `src/app/user/user.component.html` and replace the contents with:
```typescript theme={null}
User session:
{{ session }}
```
6. Open `src/app/user/user.component.ts` and add the variable we used above and an empty `signOut()` function:
```typescript theme={null}
session = '';
ngOnInit(): void {}
async signOut() {}
```
## Server Setup
Now we will update our server's `index.js` for the code we need for authentication. In this demo, cookies will be used for the user data.
1. Install the required dependencies for our server:
```shell theme={null}
npm install cookie-parser jsonwebtoken dotenv
```
2. Create a file called `.env` in your server's root directory (where `package.json` is):
* **APP\_DOMAIN**: RFC 4501 DNS authority that is requesting the signing.
* **MORALIS\_API\_KEY**: You can get it [here](https://admin.moralis.com/account/profile).
* **ANGULAR\_URL**: Your app address. By default Angular uses [`http://localhost:4200`](http://localhost:4200/).
* **AUTH\_SECRET**: Used for signing JWT tokens of users. You can put any value here or generate it on [`https://generate-secret.now.sh/32`](https://generate-secret.now.sh/32). Here's an `.env` example:
```
APP_DOMAIN=localhost
MORALIS_API_KEY=xxxx
ANGULAR_URL=http://localhost:4200
AUTH_SECRET=1234
```
3. Open `index.js`. We will create a `/request-message` endpoint for making requests to `Moralis.Auth` to generate a unique message (Angular will use this endpoint on the `/signin` page):
```javascript theme={null}
// to use our .env variables
require("dotenv").config();
// for our server's method of setting a user session
const cookieParser = require("cookie-parser");
const jwt = require("jsonwebtoken");
const config = {
domain: process.env.APP_DOMAIN,
statement: "Please sign this message to confirm your identity.",
uri: process.env.ANGULAR_URL,
timeout: 60,
};
app.post("/request-message", async (req, res) => {
const { address, chain } = req.body;
try {
const message = await Moralis.Auth.requestMessage({
address,
chain,
...config,
});
res.status(200).json(message);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
```
4. We will create a `/verify` endpoint for verifying the signed message from the user. After the user successfully verifies, they will be redirected to the `/user` page where their info will be displayed.
```javascript theme={null}
app.post("/verify", async (req, res) => {
try {
const { message, signature } = req.body;
const { address, profileId } = (
await Moralis.Auth.verify({
message,
signature,
networkType: "evm",
})
).raw;
const user = { address, profileId, signature };
// create JWT token
const token = jwt.sign(user, process.env.AUTH_SECRET);
// set JWT cookie
res.cookie("jwt", token, {
httpOnly: true,
});
res.status(200).json(user);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
```
5. We will create an `/authenticate` endpoint for checking the JWT cookie we previously set to allow the user access to the `/user` page:
```javascript theme={null}
app.get("/authenticate", async (req, res) => {
const token = req.cookies.jwt;
if (!token) return res.sendStatus(403); // if the user did not send a jwt token, they are unauthorized
try {
const data = jwt.verify(token, process.env.AUTH_SECRET);
res.json(data);
} catch {
return res.sendStatus(403);
}
});
```
6. Lastly we will create a `/logout` endpoint for removing the cookie.
```javascript theme={null}
app.get("/logout", async (req, res) => {
try {
res.clearCookie("jwt");
return res.sendStatus(200);
} catch {
return res.sendStatus(403);
}
});
```
Your final `index.js` should look like this:
```javascript theme={null}
const Moralis = require("moralis").default;
const express = require("express");
const cors = require("cors");
const cookieParser = require("cookie-parser");
const jwt = require("jsonwebtoken");
require("dotenv").config();
const app = express();
const port = 3000;
app.use(express.json());
app.use(cookieParser());
// allow access to Angular app domain
app.use(
cors({
origin: process.env.ANGULAR_URL,
credentials: true,
})
);
const config = {
domain: process.env.APP_DOMAIN,
statement: "Please sign this message to confirm your identity.",
uri: process.env.ANGULAR_URL,
timeout: 60,
};
// request message to be signed by client
app.post("/request-message", async (req, res) => {
const { address, chain } = req.body;
try {
const message = await Moralis.Auth.requestMessage({
address,
chain,
...config,
});
res.status(200).json(message);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
// verify message signed by client
app.post("/verify", async (req, res) => {
try {
const { message, signature } = req.body;
const { address, profileId } = (
await Moralis.Auth.verify({
message,
signature,
networkType: "evm",
})
).raw;
const user = { address, profileId, signature };
// create JWT token
const token = jwt.sign(user, process.env.AUTH_SECRET);
// set JWT cookie
res.cookie("jwt", token, {
httpOnly: true,
});
res.status(200).json(user);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
// verify JWT cookie to allow access
app.get("/authenticate", async (req, res) => {
const token = req.cookies.jwt;
if (!token) return res.sendStatus(403); // if the user did not send a jwt token, they are unauthorized
try {
const data = jwt.verify(token, process.env.AUTH_SECRET);
res.json(data);
} catch {
return res.sendStatus(403);
}
});
// remove JWT cookie
app.get("/logout", async (req, res) => {
try {
res.clearCookie("jwt");
return res.sendStatus(200);
} catch {
return res.sendStatus(403);
}
});
const startServer = async () => {
await Moralis.start({
apiKey: process.env.MORALIS_API_KEY,
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});
};
startServer();
```
7. Run `npm run start` to make sure your server runs without immediate errors.
```shell theme={null}
node index.js
```
## Bringing It All Together
Now we will finish setting up our Angular pages to integrate with our server.
1. Open `src/app/signin/signin.component.ts`. Add our required imports:
```typescript theme={null}
import { Component } from "@angular/core";
// for navigating to other routes
import { Router } from "@angular/router";
// for making HTTP requests
import axios from "axios";
import {
connect,
disconnect,
getAccount,
injected,
signMessage,
} from "@wagmi/core";
import { http, createConfig } from "@wagmi/core";
import { mainnet, sepolia } from "@wagmi/core/chains";
import { environment } from "../../environments/environment";
```
2. Add this code to set up the Wagmi client:
```typescript theme={null}
export const config = createConfig({
chains: [mainnet, sepolia],
transports: {
[mainnet.id]: http(),
[sepolia.id]: http(),
},
});
```
3. Replace our empty `handleAuth()` function with the following:
```typescript theme={null}
async handleAuth() {
const { isConnected } = getAccount(config);
if (isConnected) await disconnect(config); //disconnects the web3 provider if it's already active
const provider = await connect(config, { connector: injected() }); // enabling the web3 provider metamask
const userData = {
address: provider.accounts[0],
chain: provider.chainId,
};
const { data } = await axios.post(
`${environment.SERVER_URL}/request-message`,
userData
);
const message = data.message;
const signature = await signMessage(config, { message });
await axios.post(
`${environment.SERVER_URL}/verify`,
{
message,
signature,
},
{ withCredentials: true } // set cookie from Express server
);
// redirect to /user
this.router.navigateByUrl('/user');
}
```
4. The full `signin.component.ts` should look like:
```typescript theme={null}
import { Component } from "@angular/core";
// for navigating to other routes
import { Router } from "@angular/router";
// for making HTTP requests
import axios from "axios";
import {
connect,
disconnect,
getAccount,
injected,
signMessage,
} from "@wagmi/core";
import { http, createConfig } from "@wagmi/core";
import { mainnet, sepolia } from "@wagmi/core/chains";
import { environment } from "../../environments/environment";
export const config = createConfig({
chains: [mainnet, sepolia],
transports: {
[mainnet.id]: http(),
[sepolia.id]: http(),
},
});
@Component({
selector: "app-signin",
standalone: true,
imports: [],
templateUrl: "./signin.component.html",
styleUrl: "./signin.component.css",
})
export class SigninComponent {
constructor(private router: Router) {}
ngOnInit(): void {}
async handleAuth() {
const { isConnected } = getAccount(config);
if (isConnected) await disconnect(config); //disconnects the web3 provider if it's already active
const provider = await connect(config, { connector: injected() }); // enabling the web3 provider metamask
const userData = {
address: provider.accounts[0],
chain: provider.chainId,
};
const { data } = await axios.post(
`${environment.SERVER_URL}/request-message`,
userData
);
const message = data.message;
const signature = await signMessage(config, { message });
await axios.post(
`${environment.SERVER_URL}/verify`,
{
message,
signature,
},
{ withCredentials: true } // set cookie from Express server
);
// redirect to /user
this.router.navigateByUrl("/user");
}
}
```
5. Open `src/app/user/user.component.ts`. Add our required imports:
```typescript theme={null}
import { Router } from "@angular/router";
import axios from "axios";
import { environment } from "../../environments/environment";
```
6. Replace `ngOnInit(): void {}` with:
```typescript theme={null}
async ngOnInit() {
try {
const { data } = await axios.get(
`${environment.SERVER_URL}/authenticate`,
{
withCredentials: true,
}
);
const { iat, ...authData } = data; // remove unimportant iat value
this.session = JSON.stringify(authData, null, 2); // format to be displayed nicely
} catch (err) {
// if user does not have a "session" token, redirect to /signin
this.router.navigateByUrl('/signin');
}
}
```
7. Replace our empty `signOut()` function with the following:
```typescript theme={null}
async signOut() {
await axios.get(`${environment.SERVER_URL}/logout`, {
withCredentials: true,
});
this.router.navigateByUrl('/signin');
}
```
8. The full `user.component.ts` should look like:
```typescript theme={null}
import { Component } from "@angular/core";
import { NgIf } from "@angular/common"; // Import NgIf
import { Router } from "@angular/router";
import axios from "axios";
import { environment } from "../../environments/environment";
@Component({
selector: "app-user",
standalone: true,
imports: [NgIf], // Include NgIf in the imports array
templateUrl: "./user.component.html",
styleUrls: ["./user.component.css"],
})
export class UserComponent {
constructor(private router: Router) {}
session = "";
async ngOnInit() {
try {
const { data } = await axios.get(
`${environment.SERVER_URL}/authenticate`,
{
withCredentials: true,
}
);
const { iat, ...authData } = data; // remove unimportant iat value
this.session = JSON.stringify(authData, null, 2); // format to be displayed nicely
} catch (err) {
// if user does not have a "session" token, redirect to /signin
this.router.navigateByUrl("/signin");
}
}
async signOut() {
await axios.get(`${environment.SERVER_URL}/logout`, {
withCredentials: true,
});
this.router.navigateByUrl("/signin");
}
}
```
If you get errors related to default imports, open your `tsconfig.app.json` file and add `"allowSyntheticDefaultImports": true` under `compilerOptions`:
```json theme={null}
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"outDir": "./out-tsc/app",
"types": []
}
```
## Testing the MetaMask Wallet Connector
Visit [`http://localhost:4200/signin`](http://localhost:4200/signin) to test the authentication.
1. Click on the `Authenticate via MetaMask` button
2. Connect the MetaMask wallet and sign the message
3. After successful authentication, you will be redirected to the `/user` page
* When a user authenticates, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page.
# How to Authenticate Users with MetaMask using Python and Django
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-meta-mask-using-python-and-django
This tutorial will teach you how Moralis authentication works and demonstrates how to add secure authentication to your Django application by walking you through creating a full-stack Web3 authentication stack using the popular Django web framework.
## Introduction
In this tutorial, we show you how to create a full-stack Django app that allows users to log in using their Web3 wallets, and Django will create a session associated with the individual user. Once logged in, the user can visit a page that displays all their user data.
You can find the repository with the final code [here](https://github.com/MoralisWeb3/demo-apps/tree/main/django_moralis_auth).
## Prerequisites
1. Create a [Moralis account](https://admin.moralis.com/login).
2. Install Python 3 (in case you don't already have it). In this tutorial, we used Python 3.10 on a Windows system.
3. Basic Django knowledge ([Django documentation](https://docs.djangoproject.com/en/dev/intro/tutorial01/)).
## Installing Required Dependencies
1. Create a virtual environment if needed: `python3 -m venv django_web3_auth_env`.
2. Install `django` and `requests` dependencies. Django version 4.1 was used for this tutorial:
* `django_web3_auth_env\Scripts>pip3.10.exe install django`.
* `django_web3_auth_env\Scripts>pip3.10.exe install requests`.\
(These commands, for example, `pip3.10.exe install django`, are meant to be executed in that specific **Scripts** folder from that virtual environment.)
## Creating a Django Project and App
1. Create the Django project:
* `django_web3_auth_env\Scripts\django-admin startproject moralis_auth` and `django-admin` will be found in the `Scripts` folder: `django_web3_auth_env\Scripts\django-admin.exe`.
2. Create the Django app:
* `django_web3_auth_env\Scripts\python.exe manage.py startapp web3_auth`.
* You can move that newly created app folder named `web3_auth` into the same folder where the `moralis_auth` project is in - the same folder where `manage.py` is located.
3. Run database migrations:
* `django_web3_auth_env\Scripts\python.exe manage.py migrate`. Here, you will have to use the complete path that points to the Python executable in the newly created virtual environment.
4. Create a **super user** (it can be used in the Django admin interface); it is optional:
* `django_web3_auth_env\Scripts\python.exe manage.py createsuperuser`. Here, you will have to use the complete path that points to the Python executable in the new created virtual environment.
## Edit `moralis_auth` Project Settings
1. Add the newly created app named `web3_auth` to the list of installed apps in `settings.py` at the end of the `INSTALLED_APPS` list:
```python settings.py theme={null}
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'web3_auth'
]
```
2. Include URLs from the newly created app in the new project (here, we also added the URLs from `django.contrib.auth.urls` to be able to use the log-out functionality):
```python urls.py theme={null}
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('web3_auth/', include('web3_auth.urls')),
path('auth/', include('django.contrib.auth.urls')),
]
```
## Creating the Main *web3\_auth* Application (`urls.py`, `views.py`, and Templates)
1. The contents for `urls.py` (you will have to create this file):
```python urls.py theme={null}
from django.urls import path
from . import views
urlpatterns = [
path('moralis_auth', views.moralis_auth, name='moralis_auth'),
path('request_message', views.request_message, name='request_message'),
path('my_profile', views.my_profile, name='my_profile'),
path('verify_message', views.verify_message, name='verify_message')
]
```
* `moralis_auth` will contain the data from where a user can authenticate.
* `request_message` will make a request to the Moralis Auth API for a message to be signed.
* `my_profile` will show current profile info for a user when authenticated.
* `verify_message` will be used to verify a message that was signed.
2. The contents for `views.py` (you will need to set your Web3 API key on line nine \[`API_KEY = 'WEB3_API_KEY_HERE'`]):
```python views.py theme={null}
import json
import requests
from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from datetime import datetime, timedelta, timezone
API_KEY = 'WEB3_API_KEY_HERE'
# this is a check to make sure the API key was set
# you have to set the API key only in line 9 above
# you don't have to change the next line
if API_KEY == 'WEB3_API_KEY_HERE':
print("API key is not set")
raise SystemExit
def moralis_auth(request):
return render(request, 'login.html', {})
def my_profile(request):
return render(request, 'profile.html', {})
def request_message(request):
data = json.loads(request.body)
print(data)
#setting request expiration time to 1 minute after the present->
present = datetime.now(timezone.utc)
present_plus_one_m = present + timedelta(minutes=1)
expirationTime = str(present_plus_one_m.isoformat())
expirationTime = str(expirationTime[:-6]) + 'Z'
REQUEST_URL = 'https://authapi.moralis.io/challenge/request/evm'
request_object = {
"domain": "defi.finance",
"chainId": 1,
"address": data['address'],
"statement": "Please confirm",
"uri": "https://defi.finance/",
"expirationTime": expirationTime,
"notBefore": "2020-01-01T00:00:00.000Z",
"timeout": 15
}
x = requests.post(
REQUEST_URL,
json=request_object,
headers={'X-API-KEY': API_KEY})
return JsonResponse(json.loads(x.text))
def verify_message(request):
data = json.loads(request.body)
print(data)
REQUEST_URL = 'https://authapi.moralis.io/challenge/verify/evm'
x = requests.post(
REQUEST_URL,
json=data,
headers={'X-API-KEY': API_KEY})
print(json.loads(x.text))
print(x.status_code)
if x.status_code == 201:
# user can authenticate
eth_address=json.loads(x.text).get('address')
print("eth address", eth_address)
try:
user = User.objects.get(username=eth_address)
except User.DoesNotExist:
user = User(username=eth_address)
user.is_staff = False
user.is_superuser = False
user.save()
if user is not None:
if user.is_active:
login(request, user)
request.session['auth_info'] = data
request.session['verified_data'] = json.loads(x.text)
return JsonResponse({'user': user.username})
else:
return JsonResponse({'error': 'account disabled'})
else:
return JsonResponse(json.loads(x.text))
```
Here we have a view for the main authentication: `moralis_auth`; one view to display the profile info: `my_profile`; and two views specific to authentication: `request_message` and `verify_message`. Furthermore, `verify_message` will request a message from the Moralis Auth API that will be signed with MetaMask, and `verify_message` will validate the received signature and create a user when the validation succeeds. After that, a session is created for that user, and we can add additional info in that session, such as the data that was used specifically for authentication.
3. Templates (you will have to create a folder named templates):
* `login.html`, this template contains all the JavaScript code required to sign a message with MetaMask:
```html login.html theme={null}
Moralis Auth Django Demo
{% if user.is_authenticated %}
{% else %}
{% endif %}
```
* `profile.html`, this template only shows current info associated with an authenticated user:
```html profile.html theme={null}
Moralis Auth Django Profile Page Demo
{% if user.is_authenticated %}
Eth address: {{ user.username }}
Session auth info
{% for key,value in request.session.auth_info.items %}
{{key}}
{{ value }}
{% endfor %}
Verified user info
{% for key,value in request.session.verified_data.items %}
```
## Starting the Application
* `django_web3_auth_env\Scripts\python.exe manage.py runserver 1000` (this will start a local server on port **1000**).
After the application starts, this is how it should look when you access `http://127.0.0.1:1000/web3_auth/moralis_auth`
This will show when clicking on the above "login" button
After the message is signed and the authentication is successful, you can see the complete profile page:
# How to Authenticate Users with MetaMask using React
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-meta-mask-using-react
Learn how Moralis authentication works and see how to add secure authentication to your React dapp. This tutorial covers how to create full-stack Web3 authentication using the popular React framework.
## Introduction
This tutorial demonstrates how to create a React app that allows users to log in using their Web3 wallets.
After Web3 wallet authentication, the server creates a session cookie with a signed [JWT](https://jwt.io/introduction) stored inside. It contains session info (such as an address, signed message) in the user's browser.
Once the user is logged in, they will be able to visit a page that displays all their user data.
## Prerequisites
1. Follow the Your First Dapp - React tutorial to set up your React dapp and server
## Install the Required Dependencies
To implement authentication using a Web3 wallet (e.g., MetaMask), we will use a Web3 library. For the tutorial, we will use [wagmi](https://wagmi.sh).
1. Install `wagmi` and `viem` in your React app:
```bash npm2yarn theme={null}
npm install wagmi viem
```
## Initial Setup
First we will add an environment variable that will be used when calling our API.
1. Create a file called `.env` in the root of your react project (where `package.json` is) and add:
```sh theme={null}
REACT_APP_SERVER_URL=http://localhost:4000
```
Next we will add the providers required for `wagmi`.
2. Open `src/App.js` and add our required imports:
```javascript theme={null}
import { createConfig, configureChains, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import { mainnet } from "wagmi/chains";
import Signin from "./signin";
import User from "./user";
```
3. We will add the client and providers, and update the routes for our `/signin` component (to be set up next):
```javascript theme={null}
const { publicClient, webSocketPublicClient } = configureChains(
[mainnet],
[publicProvider()]
);
const config = createConfig({
autoConnect: true,
publicClient,
webSocketPublicClient,
});
const router = createBrowserRouter([
{
path: "/signin",
element: ,
},
{
path: "/user",
element: ,
},
{
path: "/",
element:
Home Component
,
},
]);
function App() {
return (
);
}
export default App;
```
# Your full App.js file should look like this
```javascript theme={null}
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { createConfig, configureChains, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import { mainnet } from "wagmi/chains";
import Signin from "./signin";
import User from "./user";
const { publicClient, webSocketPublicClient } = configureChains(
[mainnet],
[publicProvider()]
);
const config = createConfig({
autoConnect: true,
publicClient,
webSocketPublicClient,
});
const router = createBrowserRouter([
{
path: "/signin",
element: ,
},
{
path: "/user",
element: ,
},
{
path: "/",
element:
Home Component
,
},
]);
function App() {
return (
);
}
export default App;
```
## Server Setup
Back in our server directory we will update our server's `index.js` for the code we need for authentication. In this demo, cookies will be used for the user data.
1. Install the required dependencies for our server:
```shell theme={null}
npm install cookie-parser jsonwebtoken dotenv
```
2. Create a file called `.env` in your server's root directory (where `package.json` is):
* **APP\_DOMAIN**: RFC 4501 DNS authority that is requesting the signing.
* **MORALIS\_API\_KEY**: You can get it [here](https://admin.moralis.com/account/profile).
* **REACT\_URL**: Your app address. By default React uses [`http://localhost:3000`](http://localhost:3000).
* **AUTH\_SECRET**: Used for signing JWT tokens of users. You can put any value here or generate it on [`https://generate-secret.now.sh/32`](https://generate-secret.now.sh/32).
```
APP_DOMAIN=amazing.finance
MORALIS_API_KEY=xxxx
REACT_URL=http://localhost:3000
AUTH_SECRET=1234
```
3. Open `index.js`. We will create a `/request-message` endpoint for making requests to `Moralis.Auth` to generate a unique message (React will use this endpoint on the `/signin` page):
```javascript theme={null}
// to use our .env variables
require("dotenv").config();
app.use(express.json());
// for our server's method of setting a user session
const cookieParser = require("cookie-parser");
const jwt = require("jsonwebtoken");
const config = {
domain: process.env.APP_DOMAIN,
statement: "Please sign this message to confirm your identity.",
uri: process.env.REACT_URL,
timeout: 60,
};
app.post("/request-message", async (req, res) => {
const { address, chain, network } = req.body;
try {
const message = await Moralis.Auth.requestMessage({
address,
chain,
...config,
});
res.status(200).json(message);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
```
4. We will create a `/verify` endpoint for verifying the signed message from the user. After the user successfully verifies, they will be redirected to the `/user` page where their info will be displayed:
```javascript theme={null}
app.post("/verify", async (req, res) => {
try {
const { message, signature } = req.body;
const { address, profileId } = (
await Moralis.Auth.verify({
message,
signature,
networkType: "evm",
})
).raw;
const user = { address, profileId, signature };
// create JWT token
const token = jwt.sign(user, process.env.AUTH_SECRET);
// set JWT cookie
res.cookie("jwt", token, {
httpOnly: true,
});
res.status(200).json(user);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
```
5. We will create an `/authenticate` endpoint for checking the JWT cookie we previously set to allow the user access to the `/user` page:
```javascript theme={null}
app.get("/authenticate", async (req, res) => {
const token = req.cookies.jwt;
if (!token) return res.sendStatus(403); // if the user did not send a jwt token, they are unauthorized
try {
const data = jwt.verify(token, process.env.AUTH_SECRET);
res.json(data);
} catch {
return res.sendStatus(403);
}
});
```
6. Lastly we will create a `/logout` endpoint for removing the cookie:
```javascript theme={null}
app.get("/logout", async (req, res) => {
try {
res.clearCookie("jwt");
return res.sendStatus(200);
} catch {
return res.sendStatus(403);
}
});
```
Your final `index.js` should look like this:
```javascript theme={null}
const Moralis = require("moralis").default;
const express = require("express");
const cors = require("cors");
const cookieParser = require("cookie-parser");
const jwt = require("jsonwebtoken");
// to use our .env variables
require("dotenv").config();
const app = express();
const port = 4000;
app.use(express.json());
app.use(cookieParser());
// allow access to React app domain
app.use(
cors({
origin: "http://localhost:3000",
credentials: true,
})
);
const config = {
domain: process.env.APP_DOMAIN,
statement: "Please sign this message to confirm your identity.",
uri: process.env.REACT_URL,
timeout: 60,
};
// request message to be signed by client
app.post("/request-message", async (req, res) => {
const { address, chain, network } = req.body;
try {
const message = await Moralis.Auth.requestMessage({
address,
chain,
...config,
});
res.status(200).json(message);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
app.post("/verify", async (req, res) => {
try {
const { message, signature } = req.body;
const { address, profileId } = (
await Moralis.Auth.verify({
message,
signature,
networkType: "evm",
})
).raw;
const user = { address, profileId, signature };
// create JWT token
const token = jwt.sign(user, process.env.AUTH_SECRET);
// set JWT cookie
res.cookie("jwt", token, {
httpOnly: true,
});
res.status(200).json(user);
} catch (error) {
res.status(400).json({ error: error.message });
console.error(error);
}
});
app.get("/authenticate", async (req, res) => {
const token = req.cookies.jwt;
if (!token) return res.sendStatus(403); // if the user did not send a jwt token, they are unauthorized
try {
const data = jwt.verify(token, process.env.AUTH_SECRET);
res.json(data);
} catch {
return res.sendStatus(403);
}
});
app.get("/logout", async (req, res) => {
try {
res.clearCookie("jwt");
return res.sendStatus(200);
} catch {
return res.sendStatus(403);
}
});
const startServer = async () => {
await Moralis.start({
apiKey: process.env.MORALIS_API_KEY,
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});
};
startServer();
```
## Bringing It All Together
Now we will finish setting up our React pages to integrate with our server.
1. In `src`, create a file called `signin.jsx` and add:
```javascript theme={null}
import { useNavigate } from "react-router-dom";
import { useAccount, useConnect, useSignMessage, useDisconnect } from "wagmi";
import { InjectedConnector } from "wagmi/connectors/injected";
import axios from "axios";
export default function SignIn() {
const navigate = useNavigate();
const { connectAsync } = useConnect();
const { disconnectAsync } = useDisconnect();
const { isConnected } = useAccount();
const { signMessageAsync } = useSignMessage();
const handleAuth = async () => {
//disconnects the web3 provider if it's already active
if (isConnected) {
await disconnectAsync();
}
// enabling the web3 provider metamask
const { account } = await connectAsync({
connector: new InjectedConnector(),
});
const userData = { address: account, chain: 1 };
// making a post request to our 'request-message' endpoint
const { data } = await axios.post(
`${process.env.REACT_APP_SERVER_URL}/request-message`,
userData,
{
headers: {
"content-type": "application/json",
},
}
);
const message = data.message;
// signing the received message via metamask
const signature = await signMessageAsync({ message });
await axios.post(
`${process.env.REACT_APP_SERVER_URL}/verify`,
{
message,
signature,
},
{ withCredentials: true } // set cookie from Express server
);
// redirect to /user
navigate("/user");
};
return (
Web3 Authentication
);
}
```
2. Inside `src`, create a new file called `user.jsx` and add:
```js theme={null}
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import axios from "axios";
export default function User() {
const navigate = useNavigate();
const [session, setSession] = useState({});
useEffect(() => {
axios(`${process.env.REACT_APP_SERVER_URL}/authenticate`, {
withCredentials: true,
})
.then(({ data }) => {
const { iat, ...authData } = data; // remove unimportant iat value
setSession(authData);
})
.catch((err) => {
navigate("/signin");
});
}, []);
async function signOut() {
await axios(`${process.env.REACT_APP_SERVER_URL}/logout`, {
withCredentials: true,
});
navigate("/signin");
}
return (
User session:
{JSON.stringify(session, null, 2)}
);
}
```
## Testing the MetaMask Wallet Connector
In your teminal run `npm run start` and visit [`http://localhost:3000/signin`](http://localhost:3000/signin) to test the authentication.
1. Click on the `Authenticate via MetaMask` button
2. Connect the MetaMask wallet and sign the message
3. After successful authentication, you will be redirected to the `/user` page
* When a user authenticates, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page.
# How to Authenticate Users with Particle Network
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-particle-network
## What is Particle Network?
Check the Particle Network [documentation website](https://docs.particle.network/) to get more information.
**Particle Network** is the Intent-Centric, Modular Access Layer of Web3. With Particle's [Smart Wallet-as-a-Service](https://blog.particle.network/announcing-our-smart-wallet-as-a-service-modular-stack-upgrading-waas-with-erc-4337/), developers can curate unparalleled user experience through modular and customizable EOA/AA embedded wallet components. By utilizing MPC-TSS for key management, Particle can streamline onboarding via familiar Web2 accounts—such as Google accounts, email addresses, and phone numbers.
## Prerequisites
### Next.js Dapp with MetaMask Sign-In
Before you begin this tutorial, make sure you have set up a Next.js decentralized application (Dapp) that includes MetaMask sign-in functionality. If you haven't integrated MetaMask sign-in yet, refer to the guide [How to Authenticate Users with MetaMask](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask).
### Install Dependencies
To prepare for this tutorial, you'll need to install the following dependencies for Particle Connect:
* **@particle-network/connect-react-ui**: This package provides React UI components for Particle Connect. You can install it using npm or yarn.
```bash theme={null}
npm install @particle-network/connect-react-ui
```
or
```bash theme={null}
yarn add @particle-network/connect-react-ui
```
* **@particle-network/connect**: This package is essential for integrating Particle Connect into your Dapp. Install it using npm or yarn.
```bash theme={null}
npm install @particle-network/connect
```
or
```bash theme={null}
yarn add @particle-network/connect
```
* **@particle-network/chains**: This optional dependency is leveraged for handling blockchain chains within Particle Connect. You can install it using npm or yarn.
```bash theme={null}
npm install @particle-network/chains
```
or
```bash theme={null}
yarn add @particle-network/chains
```
With these prerequisites organized, you'll be fully prepared to smoothly integrate Particle Connect into your Next.js Dapp.
## Configure Particle Connect
Open the `pages/signin.jsx` file and restructure your code as shown below. This code utilizes Particle Connect's components and hooks for handling the connection process and wallet interactions.
```javascript theme={null}
import { useRouter } from 'next/router';
import { useEffect } from 'react';
import { useAccount, ConnectButton, useConnectKit, ModalProvider } from '@particle-network/connect-react-ui';
import { useAuthRequestChallengeEvm } from '@moralisweb3/next';
import { signIn } from 'next-auth/react';
import { Ethereum } from '@particle-network/chains';
import { evmWallets } from '@particle-network/connect';
import '@particle-network/connect-react-ui/dist/index.css';
export default function SignIn() {
const { requestChallengeAsync } = useAuthRequestChallengeEvm();
const { push } = useRouter();
const account = useAccount();
const connect = useConnectKit();
useEffect(() => {
if (account) {
(async () => {
const { message } = await requestChallengeAsync({
address: account,
chainId: '0x1',
});
const signature = await connect.particle.evm.personalSign(`0x${Buffer.from(message).toString('hex')}`); // Conversion to hex, then signing with connected Particle account (whether that be through Particle Auth or otherwise)
const result = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: '/user',
});
if (result && result.url) {
push(result.url);
}
})();
}
}, [account]);
return (
Web3 Authentication
);
}
```
## Test Particle Connect
To test the authentication process with Particle Connect, follow these steps:
1. **Visit Sign-In Page**: Go to [`http://localhost:3000/signin`](http://localhost:3000/signin).
2. **Connect Wallet**: Click the "Connect Wallet" button to initiate the login process. You can choose to log in through Particle Auth or a supported Web3 (EVM) wallet.
3. **Select Sign-In Method**: Choose your preferred sign-in method from the options provided.
4. **Successful Authentication**: After successful authentication, you will be automatically redirected to the `/user` page.
5. **Test User Session**: Visit [`http://localhost:3000/user`](http://localhost:3000/user) to test the functionality of the user session:
* When a user is authenticated, their information will be displayed on the page.
* If a user is not authenticated, they will be redirected to the `/signin` page.
* Even after refreshing the page, the user's information will still be displayed. (***`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted [JWT] containing session information, stored in the user's browser.`***)
# How to Authenticate Users with Phantom Wallet
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-phantom-wallet
This tutorial covers how to create full-stack Web3 authentication for the Phantom wallet, using the popular NextJS framework.
## Introduction
This tutorial shows you how to create a NextJS application that lets users log in using their Phantom wallet.
After Web3 wallet authentication, the [**next-auth**](https://next-auth.js.org/) library creates a session cookie with an encrypted [**JWT**](https://jwt.io/introduction) (**JWE**) stored inside. It contains session info (such as an address, signed message, and expiration time) in the user's browser. It's a secure way to store users' info without a database, and it's impossible to read/modify the **JWT** without a [secret key](https://next-auth.js.org/configuration/options#secret).
Once the user is logged in, they will be able to visit a page that displays all their user data.
You can find the final dapp with implemented style on our [GitHub](https://github.com/JohnVersus/nextjs_solana_auth_api/tree/moralisweb3-next-client-auth).
## Prerequisites
1. Create a [Moralis account](https://www.moralis.io).
2. Install and set up [Visual Studio](https://code.visualstudio.com/).
3. Create your NextJS dapp (you can create it using [**create-next-app**](https://nextjs.org/docs/api-reference/create-next-app) or follow the **NextJS dapp** tutorial).
## Install the Required Dependencies
1. Install `@moralisweb3/next` (if not installed), `next-auth` and `@web3uikit/core` dependencies:
```bash npm2yarn theme={null}
npm install @moralisweb3/next next-auth @web3uikit/core
```
2. To process data like the signature of a Solana Web3 wallet (e.g., Phantom), we need the `bs58` package to encode and decode data from the wallet. Let's install the `bs58` package:
```bash npm2yarn theme={null}
npm install bs58
```
3. Add new environment variables in your `.env.local` file in the app root:
* **APP\_DOMAIN**: RFC 4501 DNS authority that is requesting the signing.
* **MORALIS\_API\_KEY**: You can get it [here](https://admin.moralis.com/account/profile).
* **NEXTAUTH\_URL**: Your app address. In the development stage, use [`http://localhost:3000`](http://localhost:3000).
* **NEXTAUTH\_SECRET**: Used for encrypting JWT tokens of users. You can put any value here or generate it on [`https://generate-secret.now.sh/32`](https://generate-secret.now.sh/32). Here's an `.env.local` example:
```text .env.local theme={null}
APP_DOMAIN=amazing.finance
MORALIS_API_KEY=xxxx
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=7197b3e8dbee5ea6274cab37245eec212
```
Keep your `NEXTAUTH_SECRET` value in secret to prevent security problems.\
\
Every time you modify the `.env.local` file, you need to restart your dapp.
## Wrapping App with `SessionProvider`
4. Create the `pages/_app.jsx` file. We need to wrap our pages with `SessionProvider` ([docs](https://next-auth.js.org/getting-started/client#sessionprovider)):
```javascript theme={null}
import "../styles/globals.css";
import { SessionProvider } from "next-auth/react";
function MyApp({ Component, pageProps }) {
return (
);
}
export default MyApp;
```
NextJS uses the `App` component to initialize pages. You can override it and control the page initialization. Check out the [NextJS docs](https://nextjs.org/docs/advanced-features/custom-app).
## Configure Next-Auth and MoralisNextAuth
5. Create a new file, `pages/api/auth/[...nextauth].ts`, with the following content:
```typescript theme={null}
import NextAuth from "next-auth";
import { MoralisNextAuthProvider } from "@moralisweb3/next";
export default NextAuth({
providers: [MoralisNextAuthProvider()],
// adding user info to the user session object
callbacks: {
async jwt({ token, user }) {
if (user) {
token.user = user;
}
return token;
},
async session({ session, token }) {
(session as { user: unknown }).user = token.user;
return session;
},
},
});
```
```javascript Javascript theme={null}
import NextAuth from "next-auth";
import { MoralisNextAuthProvider } from "@moralisweb3/next";
export default NextAuth({
providers: [MoralisNextAuthProvider()],
// adding user info to the user session object
callbacks: {
async jwt({ token, user }) {
if (user) {
token.user = user;
}
return token;
},
async session({ session, token }) {
session.user = token.user;
return session;
},
},
});
```
6. Add an authenticating config to the `pages/api/moralis/[...moralis].ts`:
```typescript [...moralis].ts theme={null}
import { MoralisNextApi } from "@moralisweb3/next";
const DATE = new Date();
const FUTUREDATE = new Date(DATE);
FUTUREDATE.setDate(FUTUREDATE.getDate() + 1);
const { MORALIS_API_KEY, APP_DOMAIN, NEXTAUTH_URL } = process.env;
if (!MORALIS_API_KEY || !APP_DOMAIN || !NEXTAUTH_URL) {
throw new Error(
"Missing env variables. Please add the required env variables."
);
}
export default MoralisNextApi({
apiKey: MORALIS_API_KEY,
authentication: {
timeout: 120,
domain: APP_DOMAIN,
uri: NEXTAUTH_URL,
expirationTime: FUTUREDATE.toISOString(),
statement: "Sign message to authenticate.",
},
});
```
```typescript [...moralis].js theme={null}
import { MoralisNextApi } from "@moralisweb3/next";
const DATE = new Date();
const FUTUREDATE = new Date(DATE);
FUTUREDATE.setDate(FUTUREDATE.getDate() + 1);
const { MORALIS_API_KEY, APP_DOMAIN, NEXTAUTH_URL } = process.env;
if (!MORALIS_API_KEY || !APP_DOMAIN || !NEXTAUTH_URL) {
throw new Error(
"Missing env variables. Please add the required env variables."
);
}
export default MoralisNextApi({
apiKey: MORALIS_API_KEY,
authentication: {
timeout: 120,
domain: APP_DOMAIN,
uri: NEXTAUTH_URL,
expirationTime: FUTUREDATE.toISOString(),
statement: "Sign message to authenticate.",
},
});
```
## Create Wallet Component
7. Create a new file under `app/components/loginBtn/phantomBtn.tsx`:
```typescript phantomBtn.tsx theme={null}
import React from "react";
import { Button } from "@web3uikit/core";
import { signIn } from "next-auth/react";
import base58 from "bs58";
import { useAuthRequestChallengeSolana } from "@moralisweb3/next";
export default function PhantomBtn() {
const { requestChallengeAsync, error } = useAuthRequestChallengeSolana();
const authenticate = async () => {
// @ts-ignore
const provider = window.phantom?.solana;
const resp = await provider.connect();
const address = resp.publicKey.toString();
const chain = "devnet";
const account = {
address: address,
chain: chain,
network: "solana",
};
// const message = "Sign to provide access to app";
const challenge = await requestChallengeAsync({
address,
network: "devnet",
});
const encodedMessage = new TextEncoder().encode(challenge?.message);
const signedMessage = await provider.signMessage(encodedMessage, "utf8");
const signature = base58.encode(signedMessage.signature);
try {
const authResponse = await signIn("moralis-auth", {
message: challenge?.message,
signature,
network: "Solana",
redirect: false,
});
if (authResponse?.error) {
throw new Error(authResponse.error);
}
} catch (e) {
return;
}
};
return (
```typescript phantomBtn.jsx theme={null}
import React from "react";
import { Button } from "@web3uikit/core";
import { signIn } from "next-auth/react";
import base58 from "bs58";
import { useAuthRequestChallengeSolana } from "@moralisweb3/next";
export default function PhantomBtn() {
const { requestChallengeAsync, error } = useAuthRequestChallengeSolana();
const authenticate = async () => {
// @ts-ignore
const provider = window.phantom?.solana;
const resp = await provider.connect();
const address = resp.publicKey.toString();
const chain = "devnet";
const account = {
address: address,
chain: chain,
network: "solana",
};
// const message = "Sign to provide access to app";
const challenge = await requestChallengeAsync({
address,
network: "devnet",
});
const encodedMessage = new TextEncoder().encode(challenge?.message);
const signedMessage = await provider.signMessage(encodedMessage, "utf8");
const signature = base58.encode(signedMessage.signature);
try {
const authResponse = await signIn("credentials", {
message: challenge?.message,
signature,
network: "Solana",
redirect: false,
});
if (authResponse?.error) {
throw new Error(authResponse.error);
}
} catch (e) {
return;
}
};
return (
## Create Page to Sign-In
8. Create a new page file, `pages/index.jsx`, with the following content:
* You can get the app CSS from [GitHub](https://github.com/JohnVersus/nextjs_solana_auth_api/tree/moralisweb3-next-client-auth/styles) to style the app.
```javascript theme={null}
import React, { useEffect, useTransition } from "react";
import styles from "../styles/Home.module.css";
import { useRouter } from "next/router";
import { Typography } from "@web3uikit/core";
import { useSession } from "next-auth/react";
import PhantomBtn from "../app/components/loginBtn/phantomBtn";
export default function Home() {
const router = useRouter();
const { data: session, status } = useSession();
const [isPending, startTransition] = useTransition();
useEffect(() => {
startTransition(() => {
session && status === "authenticated" && router.push("./user");
});
}, [session, status]);
useEffect(() => {
startTransition(() => {
session && console.log(session);
});
}, [session]);
return (
);
}
```
## Logout and User Profile Component
8. Create components to perform the logout operation and to show the user data.
```typescript logoutBtn.js theme={null}
// File path
// app/components/logoutBtn/logoutBtn.js
import React from "react";
import { Button } from "@web3uikit/core";
import { signOut } from "next-auth/react";
export default function LogoutBtn() {
return (
);
}
```
```typescript userData.js theme={null}
// File path
// app/components/logoutBtn/userData.js
import React from "react";
import styles from "../../../styles/User.module.css";
import { Typography } from "@web3uikit/core";
import { useSession } from "next-auth/react";
export default function UserData() {
const { data: session, status } = useSession();
if (session) {
return (
Profile Id:
{session?.user.profileId}
Account:
{/* account address */}
{session?.user.address}
Network:
{session?.user.network}
ExpTime:
{session?.user.expirationTime}
);
}
}
```
## Showing the User Profile
9. Let's create a `user.jsx` page to view user data when the user is logged in.
```javascript theme={null}
import React, { useEffect, useTransition } from "react";
import styles from "../styles/User.module.css";
import { getSession, signOut } from "next-auth/react";
import UserData from "../app/components/userData/userData";
import LogoutBtn from "../app/components/logoutBtn/logoutBtn";
export async function getServerSideProps(context) {
const session = await getSession(context);
if (!session) {
return { redirect: { destination: "/" } };
}
return {
props: { userSession: session },
};
}
export default function Home({ userSession }) {
if (userSession) {
return (
{!isPending && (
<>
>
)}
);
}
}
```
## Testing with Phantom Wallet
Visit `http://localhost:3000` to test the authentication.
1. Click on the `Select Wallet` button to select and connect to wallet
2. Connect to the Solana wallet extension
3. Sign the message
4. After successful authentication, you will be redirected to the `/user` page
And that completes the authentication process to Solana wallet using Phantom Wallet.
# How to Authenticate Users with RainbowKit
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-rainbow-kit
## Before Starting
You can start this tutorial if you already have a NextJS dapp with [MetaMask sign-in](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask) functionality.
## RainbowKit Installation
```bash npm2yarn theme={null}
npm install @rainbow-me/rainbowkit@latest wagmi viem
```
## RainbowKit Configuration
We are going to modify `pages/_app.jsx` and add the required code to set up RainbowKit Authentication.
You can get your project ID on the [WalletConnect Dashboard](https://cloud.walletconnect.com/).
```javascript theme={null}
import { getDefaultWallets, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { createConfig, configureChains, WagmiConfig } from "wagmi";
import { mainnet } from "wagmi/chains";
import { publicProvider } from "wagmi/providers/public";
import { SessionProvider } from "next-auth/react";
import "@rainbow-me/rainbowkit/styles.css";
const { chains, publicClient, webSocketPublicClient } = configureChains(
[mainnet],
[publicProvider()]
);
const { connectors } = getDefaultWallets({
appName: "My RainbowKit App",
projectId: "WALLET_CONNECT_PROJECT_ID", // Get your project ID from https://cloud.walletconnect.com/
chains,
});
const config = createConfig({
autoConnect: true,
publicClient,
webSocketPublicClient,
connectors,
});
// added RainbowKitProvider wrapper
function MyApp({ Component, pageProps }) {
return (
);
}
export default MyApp;
```
## Authentication with RainbowKit
The logic we're achieving works as this. A user connects his wallet using `ConnectButton` from `rainbowkit`. Once the wallet is connected, we get `address` and `chain` from the following **wagmi** hooks: `useAccount()` and `useNetwork()`. In case the user is not authenticated, we will start the authentication flow (request and **sign** message).
1. Open the `pages/signin.jsx` file and replace the old `Authenticate via MetaMask` button with `` from `@rainbow-me/rainbowkit`:
```javascript theme={null}
import { ConnectButton } from '@rainbow-me/rainbowkit';
...
return (
Web3 Authentication
);
...
```
2. Edit `handleAuth()` and move it under `useEffect()`:
```javascript theme={null}
...
useEffect(() => {
const handleAuth = async () => {
const { message } = await requestChallengeAsync({
address: address,
chainId: chain.id,
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
if (status === "unauthenticated" && isConnected) {
handleAuth();
}
}, [status, isConnected]);
...
```
3. Update missing imports and add new hooks. This is the final code of `pages/signin.jsx`:
```javascript theme={null}
import { useRouter } from "next/router";
import { useAuthRequestChallengeEvm } from "@moralisweb3/next";
import { ConnectButton } from "@rainbow-me/rainbowkit";
import { signIn, useSession } from "next-auth/react";
import { useAccount, useSignMessage, useNetwork } from "wagmi";
import { useEffect } from "react";
function SignIn() {
const { isConnected, address } = useAccount();
const { chain } = useNetwork();
const { status } = useSession();
const { signMessageAsync } = useSignMessage();
const { push } = useRouter();
const { requestChallengeAsync } = useAuthRequestChallengeEvm();
useEffect(() => {
const handleAuth = async () => {
const { message } = await requestChallengeAsync({
address: address,
chainId: chain.id,
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
if (status === "unauthenticated" && isConnected) {
handleAuth();
}
}, [status, isConnected]);
return (
Web3 Authentication
);
}
export default SignIn;
```
## Set Up RainbowKit with NextJS
The Webpack v5 bundler used by Next.js no longer provides Node polyfills, so you'll need to include these modules yourself to satisfy RainbowKit's peer dependencies.
In previous versions of RainbowKit that relied on ethers, the fs, net, and tls modules were automatically polyfilled. This is no longer the case with RainbowKit v1 + wagmi v1, which are built on viem.
Open `next.config.js` file in the root of your project and add the following code:
```javascript theme={null}
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},
};
module.exports = nextConfig;
```
Read more about RainbowKit configuration on the [official documentation](https://www.rainbowkit.com/docs/installation#additional-build-tooling-setup).
## Testing the RainbowKit Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin) to test authentication.
1. Click on `Connect Wallet`
2. Select and connect a wallet you want to use for authentication from the RainbowKit modal
3. Sign the message:
4. After successful authentication, you will be redirected to the `/user` page
5. Visit [`http://localhost:3000/user`](http://localhost:3000/user) to test the user session's functionality:
* When a user is authenticated, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page. ([***`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT [JWE] stored inside. It contains session info [such as an address and signed message] in the user's browser.`***](https://jwt.io/introduction))
# How to Authenticate Users with WalletConnect
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-wallet-connect
## Before the Start
You can start this tutorial if you already have a NextJS dapp with [MetaMask](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask) functionality.
## Configuring the WalletConnect Connector
1. Open the`pages/signin.jsx` file and add `WalletConnectConnector` as a connector to `connectAsync()`. You should have your [Project ID](https://cloud.walletconnect.com/sign-in) for the WalletConnect configuration and replace `xxx` with it in the code below.
```javascript theme={null}
import { WalletConnectConnector } from "wagmi/connectors/walletConnect";
import { signIn } from "next-auth/react";
import { useAccount, useConnect, useSignMessage, useDisconnect } from "wagmi";
import { useRouter } from "next/router";
import { useAuthRequestChallengeEvm } from "@moralisweb3/next";
function SignIn() {
const { connectAsync } = useConnect({
connector: new WalletConnectConnector({
options: { projectId: "xxx", showQrModal: true },
}),
});
const { disconnectAsync } = useDisconnect();
const { isConnected } = useAccount();
const { signMessageAsync } = useSignMessage();
const { requestChallengeAsync } = useAuthRequestChallengeEvm();
const { push } = useRouter();
const handleAuth = async () => {
if (isConnected) {
await disconnectAsync();
}
const { account, chain } = await connectAsync();
const { message } = await requestChallengeAsync({
address: account,
chainId: chain.id,
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
return (
Web3 Authentication
);
}
export default SignIn;
```
## Testing the WalletConnect Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin`) to test authentication.
1. Click on `Authenticate via WalletConnect`
2. Scan the QR code with your wallet
3. Connect your wallet
4. Sign the message:
5. Visit [`http://localhost:3000/user`](http://localhost:3000/user) to test the user session's functionality:
* When a user is authenticated, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page. ([*`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT [JWE] stored inside. It contains session info [such as an address and signed message] in the user's browser.`*](https://jwt.io/introduction))
# How to Authenticate Users with Web3Auth
Source: https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-web3-auth
## What is Web3Auth?
Visit [Web3Auth docs](https://web3auth.io/docs/index.html) to get more information.
Web3Auth is a pluggable auth infrastructure for Web3 wallets and applications. It streamlines the onboarding of mainstream and crypto-native users in under a minute by providing experiences they're most comfortable with. With support for all social logins, web and mobile-native platforms, wallets, and other key management methods, Web3Auth results in a standard cryptographic key provider specific to the user and application.
## Before Starting
You can start this tutorial if you already have a NextJS dapp with [MetaMask sign-in](/get-started/tutorials/auth-api/authenticate-users-with-meta-mask) functionality.Installing the Web3Auth Wagmi Connector
Install the `@web3auth/web3auth-wagmi-connector` dependency:
```bash npm2yarn theme={null}
npm install @web3auth/web3auth-wagmi-connector@1.0.0
```
## Configuring the Web3Auth Wagmi Connector
1. Open the `pages/signin.jsx` file and add `Web3AuthConnector` as a connector to the `useConnect()` hook:
```javascript theme={null}
import { Web3AuthConnector } from "@web3auth/web3auth-wagmi-connector";
import { signIn } from "next-auth/react";
import { useAccount, useConnect, useSignMessage, useDisconnect } from "wagmi";
import { useRouter } from "next/router";
import { useAuthRequestChallengeEvm } from "@moralisweb3/next";
function SignIn() {
const { connectAsync } = useConnect({
connector: new Web3AuthConnector({
chains: ["0x1"],
options: {
clientId: "YOUR_CLIENT_ID", // Get your own client id from https://dashboard.web3auth.io
},
}),
});
const { disconnectAsync } = useDisconnect();
const { isConnected } = useAccount();
const { signMessageAsync } = useSignMessage();
const { push } = useRouter();
const { requestChallengeAsync } = useAuthRequestChallengeEvm()
const handleAuth = async () => {
if (isConnected) {
await disconnectAsync();
}
const { account } = await connectAsync();
const { message } = await requestChallengeAsync({
address: account,
chainId: "0x1",
});
const signature = await signMessageAsync({ message });
// redirect user after success authentication to '/user' page
const { url } = await signIn("moralis-auth", {
message,
signature,
redirect: false,
callbackUrl: "/user",
});
/**
* instead of using signIn(..., redirect: "/user")
* we get the url from callback and push it to the router to avoid page refreshing
*/
push(url);
};
return (
Web3 Authentication
);
}
export default SignIn;
```
## Testing the Web3Auth Connector
Visit [`http://localhost:3000/signin`](http://localhost:3000/signin) to test authentication.
1. Click on `Authenticate via Web3Auth`
2. Select the preferred sign-in method
3. After successful authentication, you will be redirected to the `/user` page
4. Visit `http://localhost:3000/user` to test the user session's functionality:
* When a user is authenticated, we show the user's info on the page.
* When a user is not authenticated, we redirect to the `/signin` page.
* When a user is authenticated, we show the user's info on the page, even refreshing after the page. ([***`Explanation: After Web3 wallet authentication, the next-auth library creates a session cookie with an encrypted JWT [JWE] stored inside. It contains session info [such as an address and signed message] in the user's browser.`***](https://jwt.io/introduction))
# Embed a TradingView Candlestick Chart for Pump.fun Tokens
Source: https://docs.moralis.com/get-started/tutorials/charts-and-widgets/embed-pump-fun-trading-view-chart
Learn how to embed a real-time TradingView candlestick chart for Pump.fun tokens using the Moralis Price Chart Widget.
## Overview
Want to display real-time price charts for Pump.fun tokens on your website or app? With Moralis' Price Chart Widget, you can easily embed TradingView-style candlestick charts in just a few steps.
### What You Can Do
* Embed real-time price charts for any Pump.fun token
* Customize colors, layout, and time intervals
* Works for pre-bonded Pump.fun tokens too
* Supports HTML & React implementations
***
## Step 1: Configure Your Chart
1. Go to **[Moralis Price Chart Widget](https://moralis.com/widgets/price-chart)**.
2. Enter your **token address or pair address**.
3. Customize your **theme, background, candle colors, text colors, etc.**.
4. Choose a **default time interval** (e.g., `1D`, `1H`, `5M`).
5. Copy the **embed code** for HTML or React.
***
## Step 2: Embed the Chart in Your Project
If you're using a basic website, you can copy and paste the HTML embed code. You can also use the React embed code if you're using a React project.
### HTML Embed Code
```html theme={null}
```
## Step 3: Customize Your Chart
You can customize the chart's appearance by tweaking these options:
| Option | Description |
| ----------------- | ---------------------------------------- |
| backgroundColor | Background color of the chart |
| candleUpColor | Color for bullish candles |
| candleDownColor | Color for bearish candles |
| textColor | Text color for labels |
| gridColor | Gridline color |
| defaultInterval | Default time interval (1D, 1H, 5M, etc.) |
| hideLeftToolbar | Hide/show the left toolbar |
| hideTopToolbar | Hide/show the top toolbar |
| hideBottomToolbar | Hide/show the bottom toolbar |
You can embed charts for pre-bonded Pump.fun tokens the same way. Just enter the pre-bonded token address when configuring the widget.
***
Charts are powered by [TradingView](https://www.tradingview.com/), the leading provider of financial charting tools and trading platform.
# OHLC Chart Configurator
Source: https://docs.moralis.com/get-started/tutorials/charts-and-widgets/ohlc-chart-configurator
Learn how to build interactive cryptocurrency candlestick charts using Chart.js or TradingView Lightweight Charts with the Moralis OHLCV API.
## Overview
This tutorial covers two approaches to building crypto candlestick charts with the Moralis OHLCV API:
1. **Chart.js** — A popular, flexible charting library with a custom candlestick plugin
2. **TradingView Lightweight Charts** — A professional-grade charting library built for financial data
Both approaches use React and fetch OHLCV data from the Moralis API.
***
## Option 1: Building with Chart.js
### Prerequisites
* Node.js installed
* Basic understanding of React
* A Moralis API key ([get one free](https://admin.moralis.io))
### Step 1: Project Setup
Create a new React project and install dependencies:
```bash theme={null}
npx create-react-app chartjs-crypto
cd chartjs-crypto
npm install chart.js react-chartjs-2 axios react-spinners
```
Create a `.env` file in your project root:
```
REACT_APP_MORALIS_API_KEY=YOUR_API_KEY
```
### Step 2: Setup Chart.js Components
Create `src/components/CandlestickChart.js`:
```javascript theme={null}
import React from "react";
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend,
} from "chart.js";
import { Line } from "react-chartjs-2";
import "chart.js/auto";
ChartJS.register(
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend
);
const CandlestickChart = ({ candlestickData }) => {
const formatData = () => {
const labels = candlestickData.map((data) =>
new Date(data.time * 1000).toLocaleDateString()
);
return {
labels,
datasets: [
{
label: "High",
data: candlestickData.map((data) => data.high),
borderColor: "rgba(75, 192, 192, 1)",
borderWidth: 1,
fill: false,
},
{
label: "Low",
data: candlestickData.map((data) => data.low),
borderColor: "rgba(255, 99, 132, 1)",
borderWidth: 1,
fill: false,
},
{
label: "Open",
data: candlestickData.map((data) => data.open),
borderColor: "rgba(54, 162, 235, 1)",
borderWidth: 1,
fill: false,
},
{
label: "Close",
data: candlestickData.map((data) => data.close),
borderColor: "rgba(255, 206, 86, 1)",
borderWidth: 1,
fill: false,
},
],
};
};
const options = {
responsive: true,
plugins: {
legend: { position: "top" },
title: { display: true, text: "Cryptocurrency Price Chart" },
tooltip: { mode: "index", intersect: false },
},
scales: {
y: { type: "linear", display: true, position: "left" },
},
interaction: { mode: "index", intersect: false },
};
return (
);
};
export default App;
```
### Step 5: Add Styling
Create `src/styles.css`:
```css theme={null}
.app-container {
max-width: 1200px;
margin: 2rem auto;
padding: 2rem;
background: white;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.controls-container {
display: flex;
flex-direction: column;
gap: 1rem;
max-width: 400px;
margin: 0 auto 2rem auto;
}
select, input {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 1rem;
}
button {
background: #2196f3;
color: white;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
}
button:disabled {
background: #e0e0e0;
cursor: not-allowed;
}
.chart-container {
margin-top: 2rem;
padding: 1.5rem;
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.loading-spinner {
display: flex;
justify-content: center;
margin: 2rem 0;
}
```
### Using the Application
1. Select a blockchain network from the dropdown
2. Enter a token address (e.g., USDT, WETH)
3. Click "Fetch Pairs" to get available trading pairs
4. Select a trading pair to view its price chart
5. The chart will display OHLCV data for the last 30 days
# How to Find the Closest Block by Unix Timestamp
Source: https://docs.moralis.com/get-started/tutorials/data-api/blocks-and-transactions/find-the-closest-block-by-unix-timestamp
Learn how to find the block number closest to any given date or timestamp using the Moralis API.
## Introduction
In this tutorial, you'll learn how to find the block number that was mined closest to a specific date or Unix timestamp. This is useful for querying historical blockchain data at specific points in time, such as getting token balances or prices at a particular date. We'll use the following Moralis API endpoint:
* [Get Block by Date](/data-api/evm/blockchain/block-by-date) - Find the block number closest to a given date or timestamp
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-block-by-date && cd get-block-by-date
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
async function getBlockByDate() {
// Find the block closest to January 1, 2024
const date = '2024-01-01T00:00:00Z';
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/dateToBlock?chain=eth&date=${encodeURIComponent(date)}`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getBlockByDate();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to find the block:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"block": 18908895,
"date": "2024-01-01T00:00:11.000Z",
"timestamp": 1704067211,
"block_timestamp": "2024-01-01T00:00:11.000Z",
"hash": "0x..."
}
```
## Understanding the Response
| Field | Description |
| ----------------- | ---------------------------------------------- |
| `block` | The block number closest to the requested date |
| `date` | ISO timestamp of when the block was mined |
| `timestamp` | Unix timestamp of the block |
| `block_timestamp` | Same as `date`, in ISO format |
| `hash` | The block hash |
## Next Steps
* [Get Transaction by Hash](/get-started/tutorials/data-api/blocks-and-transactions/get-a-blockchain-transaction-by-hash) - Fetch transaction details
* [Get Wallet History](/get-started/tutorials/data-api/wallets-and-accounts/get-full-wallet-transaction-history-eoa-and-smart-accounts) - Get wallet transaction history
# How to Get a Blockchain Transaction by Hash
Source: https://docs.moralis.com/get-started/tutorials/data-api/blocks-and-transactions/get-a-blockchain-transaction-by-hash
Learn how to fetch detailed transaction data using a transaction hash with the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve detailed information about any blockchain transaction using its hash. This is essential for building transaction explorers, tracking payments, or verifying on-chain activity in your application. We'll use the following Moralis API endpoint:
* [Get Transaction by Hash](/data-api/evm/blockchain/transaction-by-hash) - Fetch detailed transaction data using a transaction hash
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-transaction && cd get-transaction
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const TX_HASH = '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060';
async function getTransaction() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/transaction/${TX_HASH}?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTransaction();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the transaction details:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"nonce": "0",
"transaction_index": "0",
"from_address": "0xa1e4380a3b1f749673e270229993ee55f35663b4",
"from_address_label": null,
"to_address": "0x5df9b87991262f6ba471f09758cde1c0fc1de734",
"to_address_label": null,
"value": "31337000000000000",
"gas": "21000",
"gas_price": "20000000000",
"input": "0x",
"receipt_cumulative_gas_used": "21000",
"receipt_gas_used": "21000",
"receipt_status": "1",
"block_timestamp": "2015-08-07T03:30:33.000Z",
"block_number": "46147",
"block_hash": "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd",
"transaction_fee": "0.00042"
}
```
## Understanding the Response
| Field | Description |
| ----------------- | -------------------------------------------- |
| `hash` | The transaction hash |
| `from_address` | The sender's wallet address |
| `to_address` | The recipient's wallet address |
| `value` | Amount transferred in wei |
| `gas` | Gas limit set for the transaction |
| `gas_price` | Gas price in wei |
| `receipt_status` | Transaction status (1 = success, 0 = failed) |
| `block_timestamp` | When the transaction was mined |
| `block_number` | Block number containing this transaction |
| `transaction_fee` | Total fee paid in native token |
## Next Steps
* [Get Wallet Transaction History](/get-started/tutorials/data-api/wallets-and-accounts/get-full-wallet-transaction-history-eoa-and-smart-accounts) - Fetch all transactions for a wallet
* [Find Block by Timestamp](/get-started/tutorials/data-api/blocks-and-transactions/find-the-closest-block-by-unix-timestamp) - Find blocks at specific times
# How to Get All NFTs Owned by a Wallet Address
Source: https://docs.moralis.com/get-started/tutorials/data-api/nfts/get-all-nfts-owned-by-a-wallet-address
Learn how to fetch all NFTs (ERC721 and ERC1155) owned by any wallet address using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve all NFTs owned by a wallet address using the Moralis API. This works for both ERC721 and ERC1155 tokens and includes metadata, images, and collection information. This is essential for building NFT galleries, portfolio trackers, or wallet applications. We'll use the following Moralis API endpoint:
* [Get Wallet NFTs](/data-api/evm/wallet/nft-balances) - Fetch all NFTs owned by a wallet address
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-nft-balances && cd get-nft-balances
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getNFTs() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WALLET_ADDRESS}/nft?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getNFTs();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the NFTs:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"status": "SYNCED",
"page": 1,
"page_size": 100,
"cursor": null,
"result": [
{
"token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"token_id": "1234",
"amount": "1",
"owner_of": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"token_hash": "abc123...",
"contract_type": "ERC721",
"name": "Bored Ape Yacht Club",
"symbol": "BAYC",
"token_uri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1234",
"metadata": {
"name": "Bored Ape #1234",
"image": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ",
"attributes": [
{ "trait_type": "Background", "value": "Aquamarine" },
{ "trait_type": "Fur", "value": "Blue" }
]
},
"last_token_uri_sync": "2024-01-15T10:30:00.000Z",
"last_metadata_sync": "2024-01-15T10:30:00.000Z",
"possible_spam": false,
"verified_collection": true,
"floor_price": 25.5,
"floor_price_usd": 45000
}
]
}
```
## Understanding the Response
| Field | Description |
| --------------------- | ----------------------------------------- |
| `token_address` | The NFT collection contract address |
| `token_id` | The unique token ID within the collection |
| `amount` | Quantity owned (relevant for ERC1155) |
| `contract_type` | Token standard (ERC721 or ERC1155) |
| `name` | Collection name |
| `symbol` | Collection symbol |
| `metadata` | NFT metadata (name, image, attributes) |
| `possible_spam` | Whether the NFT is flagged as spam |
| `verified_collection` | Whether the collection is verified |
| `floor_price` | Current floor price in native token |
| `floor_price_usd` | Floor price in USD |
## Next Steps
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) - Get detailed NFT metadata
* [Get NFT Floor Prices](/data-api/evm/nft/prices/collection-floor-price) - Fetch collection floor prices
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata) - explore detailed metadata
* [NFT Media Images (CDN)](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn) - learn how we store NFT images
# How to Get NFT Collections Owned by a Wallet
Source: https://docs.moralis.com/get-started/tutorials/data-api/nfts/get-nft-collections-owned-by-a-wallet
Learn how to fetch a summary of NFT collections owned by any wallet address using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve a summary of all NFT collections owned by a wallet address using the Moralis API. Instead of listing every individual NFT, this endpoint groups NFTs by collection and provides counts, making it perfect for portfolio overviews and collection summaries. We'll use the following Moralis API endpoint:
* [Get Wallet NFT Collections](/data-api/evm/wallet/nft-collections) - Fetch a summary of NFT collections owned by a wallet
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-nft-collections && cd get-nft-collections
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getNFTCollections() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WALLET_ADDRESS}/nft/collections?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getNFTCollections();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the collections:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"status": "SYNCED",
"page": 1,
"page_size": 100,
"cursor": null,
"result": [
{
"token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"contract_type": "ERC721",
"name": "Bored Ape Yacht Club",
"symbol": "BAYC",
"count": 3,
"collection_logo": "https://...",
"collection_banner_image": "https://...",
"possible_spam": false,
"verified_collection": true,
"floor_price": 25.5,
"floor_price_usd": 89250.75
},
{
"token_address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
"contract_type": "ERC721",
"name": "Mutant Ape Yacht Club",
"symbol": "MAYC",
"count": 2,
"collection_logo": "https://...",
"possible_spam": false,
"verified_collection": true,
"floor_price": 4.2,
"floor_price_usd": 14700.00
}
]
}
```
## Understanding the Response
| Field | Description |
| --------------------- | ----------------------------------------- |
| `token_address` | Collection contract address |
| `contract_type` | Token standard (ERC721 or ERC1155) |
| `name` | Collection name |
| `symbol` | Collection symbol |
| `count` | Number of NFTs owned from this collection |
| `collection_logo` | URL to collection logo |
| `possible_spam` | Whether flagged as spam |
| `verified_collection` | Whether collection is verified |
| `floor_price` | Current floor price in ETH |
| `floor_price_usd` | Floor price in USD |
## Next Steps
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) - Get detailed NFT metadata
* [Get NFT Floor Prices](/data-api/evm/nft/prices/collection-floor-price) - Fetch collection floor prices
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata) - explore detailed metadata
* [NFT Media Images (CDN)](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn) - learn how we store NFT images
# How to Get NFT Floor Prices
Source: https://docs.moralis.com/get-started/tutorials/data-api/nfts/get-nft-floor-prices
Learn how to fetch NFT collection floor prices using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve floor prices for any NFT collection using the Moralis API. Floor prices represent the lowest listed price for an NFT in a collection, which is a key metric for understanding collection value and market trends. We'll use the following Moralis API endpoint:
* [Get NFT Floor Price](/data-api/evm/nft/prices/collection-floor-price) - Fetch the current floor price for an NFT collection
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-nft-floor-price && cd get-nft-floor-price
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const NFT_ADDRESS = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; // BAYC
async function getFloorPrice() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/nft/${NFT_ADDRESS}/floor-price?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getFloorPrice();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the floor price:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"floor_price": 25.5,
"floor_price_usd": 89250.75,
"floor_price_currency": "ETH",
"marketplace": "opensea",
"marketplace_logo": "https://cdn.moralis.io/marketplaces/opensea.png",
"last_updated": "2024-01-15T10:30:00.000Z"
}
```
## Understanding the Response
| Field | Description |
| ---------------------- | ------------------------------------- |
| `floor_price` | Floor price in native token (ETH) |
| `floor_price_usd` | Floor price converted to USD |
| `floor_price_currency` | Currency of the floor price |
| `marketplace` | Marketplace where floor was found |
| `marketplace_logo` | Logo URL of the marketplace |
| `last_updated` | When the floor price was last updated |
## Next Steps
* [Get All Wallet NFTs](/get-started/tutorials/data-api/nfts/get-all-nfts-owned-by-a-wallet-address) - Fetch NFTs for a wallet
* [Get NFT Metadata](/get-started/tutorials/data-api/nfts/get-nft-metadata-by-contract-and-token-id) - Get detailed NFT info
* [Get NFT Owners](/get-started/tutorials/data-api/nfts/get-nft-owners-and-ownership-details) - Get ownership data
* [API Reference](/data-api/evm/nft/prices/collection-floor-price) - Full API documentation
# How to Get NFT Metadata by Contract and Token ID
Source: https://docs.moralis.com/get-started/tutorials/data-api/nfts/get-nft-metadata-by-contract-and-token-id
Learn how to fetch detailed metadata for a specific NFT using its contract address and token ID with the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve detailed metadata for a specific NFT using its contract address and token ID. This includes the name, description, image, attributes/traits, and ownership information. This is essential for building NFT detail pages, verification tools, or collection browsers. We'll use the following Moralis API endpoint:
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) - Fetch detailed metadata for a specific NFT
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-nft-metadata && cd get-nft-metadata
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const NFT_ADDRESS = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; // BAYC
const TOKEN_ID = '1234';
async function getNFTMetadata() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/nft/${NFT_ADDRESS}/${TOKEN_ID}?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getNFTMetadata();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the NFT metadata:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"token_id": "1234",
"amount": "1",
"owner_of": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"token_hash": "abc123def456...",
"block_number_minted": "12346789",
"contract_type": "ERC721",
"name": "Bored Ape Yacht Club",
"symbol": "BAYC",
"token_uri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1234",
"metadata": {
"name": "Bored Ape #1234",
"description": "A unique Bored Ape NFT",
"image": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ",
"attributes": [
{ "trait_type": "Background", "value": "Aquamarine" },
{ "trait_type": "Fur", "value": "Blue" },
{ "trait_type": "Eyes", "value": "Bored" },
{ "trait_type": "Mouth", "value": "Grin" },
{ "trait_type": "Clothes", "value": "Sailor Shirt" }
]
},
"last_token_uri_sync": "2024-01-15T10:30:00.000Z",
"last_metadata_sync": "2024-01-15T10:30:00.000Z",
"minter_address": "0x1234567890abcdef...",
"possible_spam": false,
"verified_collection": true,
"floor_price": 25.5,
"floor_price_usd": 45000
}
```
## Understanding the Response
| Field | Description |
| --------------------- | -------------------------------------- |
| `token_address` | The NFT collection contract address |
| `token_id` | The unique token ID |
| `owner_of` | Current owner's wallet address |
| `contract_type` | Token standard (ERC721 or ERC1155) |
| `name` | Collection name |
| `symbol` | Collection symbol |
| `metadata` | Raw metadata from token URI |
| `minter_address` | Address that originally minted the NFT |
| `possible_spam` | Whether flagged as spam |
| `verified_collection` | Whether collection is verified |
| `floor_price` | Current collection floor price |
| `floor_price_usd` | Floor price in USD |
## Next Steps
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) - Get detailed NFT metadata
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata) - explore detailed metadata
* [NFT Media Images (CDN)](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn) - learn how we store NFT images
# How to Get NFT Owners and Ownership Details
Source: https://docs.moralis.com/get-started/tutorials/data-api/nfts/get-nft-owners-and-ownership-details
Learn how to fetch ownership data for NFT collections and individual tokens using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve ownership data for NFT collections using the Moralis API. This includes getting all unique owners of a collection, finding who owns a specific token, and analyzing ownership distribution. This is essential for building collection analytics, whale tracking, or ownership verification tools. We'll use the following Moralis API endpoint:
* [Get NFT Owners](/data-api/evm/nft/ownership/owners-by-contract) - Fetch ownership data for NFT collections and individual tokens
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-nft-owners && cd get-nft-owners
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const NFT_ADDRESS = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; // BAYC
async function getCollectionOwners() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/nft/${NFT_ADDRESS}/owners?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getCollectionOwners();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the owners:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"status": "SYNCED",
"page": 1,
"page_size": 100,
"cursor": "abc123...",
"result": [
{
"token_address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"token_id": "1234",
"amount": "1",
"owner_of": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"token_hash": "...",
"block_number_minted": "12346789",
"contract_type": "ERC721",
"name": "Bored Ape Yacht Club",
"symbol": "BAYC",
"last_token_uri_sync": "2024-01-15T10:30:00.000Z",
"last_metadata_sync": "2024-01-15T10:30:00.000Z"
}
]
}
```
## Understanding the Response
| Field | Description |
| --------------------- | ---------------------------------- |
| `token_id` | The unique token ID |
| `owner_of` | Current owner's wallet address |
| `amount` | Quantity owned (1 for ERC721) |
| `block_number_minted` | Block when the NFT was minted |
| `contract_type` | Token standard (ERC721 or ERC1155) |
## Next Steps
* [Get NFT Metadata](/data-api/evm/nft/metadata/nft-metadata) - Get detailed NFT metadata
* [Get NFT Floor Prices](/data-api/evm/nft/prices/collection-floor-price) - Fetch collection floor prices
* [NFT Metadata](/data-api/data-features/data-enrichment/nft-metadata) - explore detailed metadata
* [NFT Media Images (CDN)](/data-api/data-features/data-enrichment/nft-metadata/image-previews-cdn) - learn how we store NFT images
# How to Build Crypto Price Charts Using OHLC Data
Source: https://docs.moralis.com/get-started/tutorials/data-api/prices-and-charts/build-crypto-price-charts-using-ohlc-data
Learn how to create interactive candlestick price charts using OHLC data from the Moralis API.
## Introduction
In this tutorial, you'll learn how to build interactive cryptocurrency price charts using OHLC (Open, High, Low, Close) data from the Moralis API. We'll use the Lightweight Charts library from TradingView to create professional-looking candlestick charts that can be embedded in any web application. We'll use the following Moralis API endpoint:
* [Get OHLCV Data](/data-api/evm/price/ohlc) - Fetch historical candlestick price data for token pairs
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
* Basic HTML/JavaScript knowledge
## Step 1: Set Up Your Project
Create a new directory and files:
```bash theme={null}
mkdir crypto-charts && cd crypto-charts
npm init -y
```
## Step 2: Create the HTML File
Create an `index.html` file:
```html theme={null}
Crypto Price Chart
ETH/USDC Price Chart
```
## Step 3: Create the JavaScript File
Create a `chart.js` file:
```javascript theme={null}
const API_KEY = 'YOUR_API_KEY';
const PAIR_ADDRESS = '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'; // WETH/USDC on Uniswap V3
async function initChart() {
const chartContainer = document.getElementById('chart');
const chart = LightweightCharts.createChart(chartContainer, {
layout: {
background: { color: '#1a1a2e' },
textColor: '#d1d4dc',
},
grid: {
vertLines: { color: '#2a2a4e' },
horzLines: { color: '#2a2a4e' },
},
});
const candleSeries = chart.addCandlestickSeries({
upColor: '#26a69a',
downColor: '#ef5350',
borderUpColor: '#26a69a',
borderDownColor: '#ef5350',
wickUpColor: '#26a69a',
wickDownColor: '#ef5350',
});
// Required: specify date range for OHLC data
const fromDate = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString();
const toDate = new Date().toISOString();
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/pairs/${PAIR_ADDRESS}/ohlcv?chain=eth&timeframe=1d&from_date=${fromDate}&to_date=${toDate}`,
{
headers: { 'X-API-Key': API_KEY },
}
);
const data = await response.json();
const candleData = data.result
.map((candle) => ({
time: Math.floor(new Date(candle.timestamp).getTime() / 1000),
open: candle.open,
high: candle.high,
low: candle.low,
close: candle.close,
}))
.sort((a, b) => a.time - b.time);
candleSeries.setData(candleData);
chart.timeScale().fitContent();
}
initChart();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 4: Run the Chart
Open `index.html` in your browser, or serve it with a simple HTTP server:
```bash theme={null}
npx serve .
```
## Example OHLC Response
```json theme={null}
{
"pair_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"result": [
{
"timestamp": "2024-01-15T00:00:00.000Z",
"open": 3450.25,
"high": 3475.50,
"low": 3445.00,
"close": 3468.75,
"volume": 15234567.89
}
]
}
```
## Understanding the Response
| Field | Description |
| ----------- | ------------------------------- |
| `timestamp` | The start time of the candle |
| `open` | Opening price for the period |
| `high` | Highest price during the period |
| `low` | Lowest price during the period |
| `close` | Closing price for the period |
| `volume` | Trading volume in USD |
## Next Steps
* [Get OHLC Data](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) - Learn about OHLC data
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Get current prices
* [Build a DEX Screener](/get-started/tutorials/data-api/tokens-and-markets/build-a-dex-screener-clone) - Build a trading dashboard
* [API Reference](/data-api/evm/price/ohlc) - Full API documentation
# How to Get Historical ERC20 Token Prices (OHLC Data)
Source: https://docs.moralis.com/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data
Learn how to fetch historical OHLC (candlestick) price data for any ERC20 token using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve historical OHLC (Open, High, Low, Close) price data for any ERC20 token using the Moralis API. This candlestick data is essential for building price charts, technical analysis tools, or trading interfaces. We'll use the following Moralis API endpoint:
* [Get OHLCV Data](/data-api/evm/price/ohlc) - Fetch historical candlestick price data for token pairs
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-ohlc-data && cd get-ohlc-data
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
// WETH/USDC pair on Uniswap V3
const PAIR_ADDRESS = '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640';
async function getOHLCData() {
// Required: specify date range for OHLC data
const fromDate = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(); // 7 days ago
const toDate = new Date().toISOString();
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/pairs/${PAIR_ADDRESS}/ohlcv?chain=eth&timeframe=1h&from_date=${fromDate}&to_date=${toDate}`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getOHLCData();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the OHLC data:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"pair_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"token0": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC"
},
"token1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH"
},
"result": [
{
"timestamp": "2024-01-15T10:00:00.000Z",
"open": 3450.25,
"high": 3475.50,
"low": 3445.00,
"close": 3468.75,
"volume": 15234567.89,
"trades": 1523
},
{
"timestamp": "2024-01-15T11:00:00.000Z",
"open": 3468.75,
"high": 3490.00,
"low": 3460.00,
"close": 3485.25,
"volume": 18456789.12,
"trades": 1847
}
]
}
```
## Understanding the Response
| Field | Description |
| -------------- | ----------------------------------- |
| `pair_address` | The liquidity pair contract address |
| `token0` | First token in the pair |
| `token1` | Second token in the pair |
| `timestamp` | The start time of the candle |
| `open` | Opening price for the period |
| `high` | Highest price during the period |
| `low` | Lowest price during the period |
| `close` | Closing price for the period |
| `volume` | Trading volume in USD |
| `trades` | Number of trades in the period |
## Next Steps
* [Build Price Charts](/get-started/tutorials/data-api/prices-and-charts/build-crypto-price-charts-using-ohlc-data) - Create interactive charts
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Get current prices
* [Get Token Pairs](/get-started/tutorials/data-api/tokens-and-markets/get-token-pairs-and-liquidity-data) - Find trading pairs
* [API Reference](/data-api/evm/price/ohlc) - Full API documentation
# How to Get the Price of an ERC20 Token
Source: https://docs.moralis.com/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token
Learn how to fetch the current price of any ERC20 token using the Moralis API.
## Introduction
In this tutorial, you'll learn how to get the current USD price of any ERC20 token using the Moralis API. This is essential for building price trackers, trading interfaces, or portfolio applications that need real-time token pricing. We'll use the following Moralis API endpoint:
* [Get Token Price](/data-api/evm/token/prices/token-prices-batch) - Fetch the current price of any ERC20 token
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-token-price && cd get-token-price
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const TOKEN_ADDRESS = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; // USDC
async function getTokenPrice() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/erc20/${TOKEN_ADDRESS}/price?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenPrice();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the token price:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"tokenName": "USD Coin",
"tokenSymbol": "USDC",
"tokenLogo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
"tokenDecimals": "6",
"nativePrice": {
"value": "296177284127975",
"decimals": 18,
"name": "Ether",
"symbol": "ETH",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"usdPrice": 0.9998,
"usdPriceFormatted": "0.9998",
"24hrPercentChange": "0.02",
"exchangeAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"exchangeName": "Uniswap v3"
}
```
## Understanding the Response
| Field | Description |
| ------------------- | --------------------------------------- |
| `tokenName` | The full name of the token |
| `tokenSymbol` | The token's ticker symbol |
| `tokenLogo` | URL to the token's logo image |
| `tokenDecimals` | Number of decimal places the token uses |
| `nativePrice` | Price in the chain's native token (ETH) |
| `usdPrice` | Current price in USD |
| `24hrPercentChange` | Price change percentage over 24 hours |
| `exchangeAddress` | DEX address where the price was sourced |
| `exchangeName` | Name of the DEX (e.g., Uniswap v3) |
## Next Steps
* [Get Historical Prices (OHLC)](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) - Fetch OHLC candlestick data
* [Build Price Charts](/get-started/tutorials/data-api/prices-and-charts/build-crypto-price-charts-using-ohlc-data) - Create interactive price charts
* [API Reference](/data-api/evm/token/prices/token-prices-batch) - Full API documentation
# How to Build a DexScreener Clone
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/build-a-dex-screener-clone
Learn how to build a DEX token screener dashboard using the Moralis API.
## Introduction
In this tutorial, you'll learn how to build a DEX token screener similar to DexScreener using the Moralis API. The screener will display top tokens by volume with real-time prices, market cap, and price changes. We'll use the following Moralis API endpoint:
* [Get Filtered Tokens](/data-api/evm/token/discovery/filtered-tokens) - Search and discover tokens by various metrics
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir dex-screener && cd dex-screener
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
async function getTopTokens() {
const response = await fetch(
'https://deep-index.moralis.io/api/v2.2/discovery/tokens',
{
method: 'POST',
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
chains: ['eth'],
filters: [
{ metric: 'marketCap', gt: 100000 },
{ metric: 'volumeUsd', timeFrame: 'oneDay', gt: 10000 },
{ metric: 'securityScore', gt: 70 }
],
sortBy: {
metric: 'volumeUsd',
timeFrame: 'oneDay',
type: 'DESC'
},
limit: 20
}),
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTopTokens();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to get the top tokens:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"result": [
{
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chain": "eth",
"name": "Tether USD",
"symbol": "USDT",
"logo": "https://cdn.moralis.io/eth/0xdac17f958d2ee523a2206206994597c13d831ec7.png",
"priceUsd": "1.00",
"marketCap": "83000000000",
"volumeUsd": {
"oneDay": "25000000000"
},
"pricePercentChange": {
"oneDay": "0.01"
},
"securityScore": 85,
"holders": 4500000,
"createdAt": "2017-11-28T00:00:00.000Z"
}
],
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
```
## Understanding the Response
| Field | Description |
| --------------------------- | ------------------------------- |
| `tokenAddress` | Contract address of the token |
| `chain` | Blockchain the token is on |
| `name` | Token name |
| `symbol` | Token ticker symbol |
| `logo` | URL to token logo image |
| `priceUsd` | Current price in USD |
| `marketCap` | Total market capitalization |
| `volumeUsd.oneDay` | 24-hour trading volume in USD |
| `pricePercentChange.oneDay` | 24-hour price change percentage |
| `securityScore` | Token security score (0-100) |
| `holders` | Number of token holders |
| `createdAt` | When the token was created |
## Next Steps
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Price data
* [Get OHLC Data](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) - Historical prices
* [Get Token Pairs](/get-started/tutorials/data-api/tokens-and-markets/get-token-pairs-and-liquidity-data) - Liquidity data
* [API Reference](/data-api/evm/token/discovery/filtered-tokens) - Full API documentation
# How to Get DEX Pair Addresses (Uniswap, PancakeSwap, SushiSwap)
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-dex-pair-addresses-uniswap-pancake-swap-sushi-swap
Learn how to find liquidity pair addresses for any token pair on popular DEXs using the Moralis API.
## Introduction
In this tutorial, you'll learn how to find DEX liquidity pair addresses for any two tokens using the Moralis API. This is essential for getting trading data, liquidity information, and price data for token pairs on decentralized exchanges like Uniswap, PancakeSwap, and SushiSwap. We'll use the following Moralis API endpoint:
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-pair-address && cd get-pair-address
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
// Token addresses
const WETH = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2';
const USDC = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48';
async function getPairAddress() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WETH}/${USDC}/pairAddress?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getPairAddress();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to find the pair address:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"token0": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
},
"token1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"logo": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
},
"pairAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"exchange": "uniswapv3",
"exchangeAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"exchangeLogo": "https://cdn.moralis.io/eth/0x1f98431c8ad98523631ae4a59f267346ea31f984.png"
}
```
## Understanding the Response
| Field | Description |
| ----------------- | ------------------------------------------------------- |
| `token0` | First token in the pair with metadata |
| `token1` | Second token in the pair with metadata |
| `pairAddress` | The liquidity pair contract address |
| `exchange` | Name of the DEX (uniswapv2, uniswapv3, sushiswap, etc.) |
| `exchangeAddress` | The DEX factory contract address |
| `exchangeLogo` | URL to the exchange logo |
## Next Steps
* [Get Token Pairs and Liquidity](/get-started/tutorials/data-api/tokens-and-markets/get-token-pairs-and-liquidity-data) - Get liquidity data for pairs
* [Get OHLC Data](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) - Fetch price history
* [Build a DEX Screener](/get-started/tutorials/data-api/tokens-and-markets/build-a-dex-screener-clone) - Create a trading dashboard
* [API Reference](/data-api/evm/token/overview) - Full API documentation
# How to Get ERC20 Token Balances for a Wallet
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-balances-for-a-wallet
Learn how to fetch all ERC20 token balances for any wallet address using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve all ERC20 token balances for a wallet address using the Moralis API. This is essential for building portfolio trackers, wallet dashboards, or any application that needs to display a user's token holdings. We'll use the following Moralis API endpoint:
* [Get Wallet Token Balances](/data-api/evm/wallet/token-balances) - Fetch all ERC20 tokens held by a wallet
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-token-balances && cd get-token-balances
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getTokenBalances() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/wallets/${WALLET_ADDRESS}/tokens?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenBalances();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the token balances:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"result": [
{
"token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"name": "USD Coin",
"logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
"thumbnail": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_thumb.png",
"decimals": 6,
"balance": "1000000000",
"possible_spam": false,
"verified_contract": true,
"balance_formatted": "1000",
"usd_price": 0.999,
"usd_price_24hr_percent_change": 0.01,
"usd_value": 999.0,
"portfolio_percentage": 25.5
}
]
}
```
## Understanding the Response
| Field | Description |
| ---------------------- | ---------------------------------------------- |
| `token_address` | The contract address of the ERC20 token |
| `symbol` | The token's ticker symbol (e.g., USDC) |
| `name` | The full name of the token |
| `decimals` | Number of decimal places the token uses |
| `balance` | Raw token balance (in smallest unit) |
| `balance_formatted` | Human-readable balance with decimals applied |
| `usd_price` | Current USD price of the token |
| `usd_value` | Total USD value of the token balance |
| `possible_spam` | Whether the token is flagged as potential spam |
| `verified_contract` | Whether the token contract is verified |
| `portfolio_percentage` | Percentage this token represents in the wallet |
## Next Steps
* [Get Token Metadata](/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-metadata-by-address-or-symbol) - Learn how to get detailed token information
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Fetch current token prices
* [API Reference](/data-api/evm/wallet/token-balances) - Full API documentation
# How to Get ERC20 Token Metadata by Address or Symbol
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-metadata-by-address-or-symbol
Learn how to fetch detailed token metadata including name, symbol, decimals, and logo using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve detailed metadata for any ERC20 token using the Moralis API. This includes the token name, symbol, decimals, logo, and more. This is useful for displaying token information in your application without needing to query the blockchain directly. We'll use the following Moralis API endpoint:
* [Get Token Metadata](/data-api/evm/token/metadata/token-metadata) - Fetch detailed metadata for ERC20 tokens
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-token-metadata && cd get-token-metadata
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const TOKEN_ADDRESS = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; // USDC
async function getTokenMetadata() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/erc20/metadata?chain=eth&addresses=${TOKEN_ADDRESS}`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenMetadata();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the token metadata:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
[
{
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"address_label": "USD Coin",
"name": "USD Coin",
"symbol": "USDC",
"decimals": "6",
"logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
"logo_hash": "a5d5d6eb25e2b5a8c26e7e47f7c6a2c8",
"thumbnail": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_thumb.png",
"total_supply": "26000000000000000",
"total_supply_formatted": "26000000000",
"block_number": "12345678",
"validated": true,
"created_at": "2018-09-10T00:00:00.000Z",
"possible_spam": false,
"verified_contract": true,
"categories": ["stablecoin"],
"links": {
"website": "https://www.circle.com/usdc",
"twitter": "https://twitter.com/circle"
}
}
]
```
## Understanding the Response
| Field | Description |
| ------------------------ | ---------------------------------------------- |
| `address` | The token's contract address |
| `name` | The full name of the token |
| `symbol` | The token's ticker symbol |
| `decimals` | Number of decimal places the token uses |
| `logo` | URL to the token's logo image |
| `thumbnail` | URL to a smaller version of the logo |
| `total_supply` | Total supply in the smallest unit |
| `total_supply_formatted` | Human-readable total supply |
| `possible_spam` | Whether the token is flagged as potential spam |
| `verified_contract` | Whether the contract source code is verified |
| `categories` | Token categories (e.g., stablecoin, meme) |
| `links` | Official links (website, Twitter, etc.) |
## Next Steps
* [Get Token Balances](/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-balances-for-a-wallet) - Fetch wallet token balances
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Get current token prices
* [API Reference](/data-api/evm/token/metadata/token-metadata) - Full API documentation
# How to Get ERC20 Transfer History by Wallet or Token
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-transfer-history-by-wallet-or-token
Learn how to fetch ERC20 token transfer history for any wallet or token contract using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve ERC20 token transfer history using the Moralis API. You can fetch transfers for a specific wallet address or for a specific token contract. This is essential for building transaction history pages, token analytics dashboards, or tracking token movements. We'll use the following Moralis API endpoint:
* [Get Wallet Token Transfers](/data-api/evm/wallet/token-transfers) - Fetch ERC20 transfer history for a wallet or token
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-token-transfers && cd get-token-transfers
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getWalletTokenTransfers() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WALLET_ADDRESS}/erc20/transfers?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getWalletTokenTransfers();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the transfer history:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page": 1,
"page_size": 100,
"cursor": null,
"result": [
{
"token_name": "USD Coin",
"token_symbol": "USDC",
"token_logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
"token_decimals": "6",
"from_address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"from_address_label": "Vitalik Buterin",
"to_address": "0x1234567890abcdef1234567890abcdef12345678",
"to_address_label": null,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"block_hash": "0x...",
"block_number": "18500000",
"block_timestamp": "2024-01-15T10:30:00.000Z",
"transaction_hash": "0x...",
"transaction_index": 45,
"log_index": 123,
"value": "1000000000",
"value_formatted": "1000",
"possible_spam": false,
"verified_contract": true
}
]
}
```
## Understanding the Response
| Field | Description |
| -------------------- | ---------------------------------------- |
| `token_name` | Name of the transferred token |
| `token_symbol` | Symbol of the token |
| `from_address` | Sender's wallet address |
| `from_address_label` | Known label for sender (if available) |
| `to_address` | Recipient's wallet address |
| `to_address_label` | Known label for recipient (if available) |
| `value` | Transfer amount in smallest unit |
| `value_formatted` | Human-readable transfer amount |
| `block_timestamp` | When the transfer occurred |
| `transaction_hash` | Transaction hash of the transfer |
| `possible_spam` | Whether the token is flagged as spam |
## Next Steps
* [Get Token Balances](/data-api/evm/wallet/token-balances) - Fetch current token balances
* [Get Wallet History](/data-api/evm/wallet/wallet-history) - Get complete wallet activity
* [API Reference](/data-api/evm/wallet/overview) - Full API documentation
# How to Get Pump.fun New, Bonding & Graduated Tokens
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-pump-fun-new-bonding-and-graduated-tokens
Learn how to fetch new, bonding, and graduated tokens from Pump.fun on Solana using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve Pump.fun token data using the Moralis Solana API. Pump.fun is a popular token launchpad on Solana where new tokens go through bonding curve phases before graduating to DEXs. You'll learn how to fetch newly created tokens, tokens in bonding phase, and graduated tokens. We'll use the following Moralis API endpoint:
* [Get Pump.fun New Tokens](/data-api/solana/token/search-and-discovery/pump-fun-new-tokens) - Fetch newly created tokens on Pump.fun
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir pump-fun-tokens && cd pump-fun-tokens
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
async function getNewPumpFunTokens() {
const response = await fetch(
'https://solana-gateway.moralis.io/token/mainnet/exchange/pumpfun/new',
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getNewPumpFunTokens();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"result": [
{
"tokenAddress": "ABC123...",
"name": "Example Token",
"symbol": "EXT",
"logo": "https://...",
"createdAt": "2024-01-15T10:30:00.000Z",
"marketCap": 15000,
"priceUsd": 0.000015,
"volume24h": 5000,
"holders": 150,
"bondingProgress": 5.5,
"isGraduated": false
}
]
}
```
## Understanding the Response
| Field | Description |
| ----------------- | --------------------------------------- |
| `tokenAddress` | The Solana token mint address |
| `name` | Token name |
| `symbol` | Token symbol |
| `createdAt` | When the token was created |
| `marketCap` | Current market cap in USD |
| `priceUsd` | Current price in USD |
| `volume24h` | 24-hour trading volume |
| `holders` | Number of unique holders |
| `bondingProgress` | Progress through bonding curve (0-100%) |
| `isGraduated` | Whether token has graduated to DEX |
## Understanding Pump.fun Token States
| State | Description |
| ------------- | ------------------------------------------------ |
| **New** | Recently created tokens (less than 24 hours old) |
| **Bonding** | Tokens in bonding curve with 20%+ progress |
| **Graduated** | Tokens that completed bonding and are on DEXs |
## Next Steps
* [Get Pump.fun Token Swaps and Prices](/get-started/tutorials/data-api/tokens-and-markets/get-pump-fun-tokens-swaps-and-prices) - Get trading data
* [API Reference - New Tokens](/data-api/solana/token/search-and-discovery/pump-fun-new-tokens) - Full API documentation
* [API Reference - Bonding Tokens](/data-api/solana/token/search-and-discovery/pump-fun-bonding-tokens) - Bonding endpoint docs
* [API Reference - Graduated Tokens](/data-api/solana/token/search-and-discovery/pump-fun-graduated-tokens) - Graduated endpoint docs
# How to Get Pump.fun Tokens, Swaps and Prices
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-pump-fun-tokens-swaps-and-prices
Learn how to fetch swap data and price information for Pump.fun tokens on Solana using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve swap (trade) data and price information for Pump.fun tokens using the Moralis Solana API. This includes getting recent swaps, price history, and OHLC data for any token launched on Pump.fun. We'll use the following Moralis API endpoint:
* [Get Token Swaps](/data-api/solana/token/swaps/token-swaps) - Fetch swap history and trading data for Solana tokens
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir pump-fun-swaps && cd pump-fun-swaps
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const TOKEN_ADDRESS = 'YOUR_PUMP_FUN_TOKEN_ADDRESS'; // Solana token mint address
async function getTokenSwaps() {
const response = await fetch(
`https://solana-gateway.moralis.io/token/mainnet/${TOKEN_ADDRESS}/swaps`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenSwaps();
```
Replace `YOUR_API_KEY` and `YOUR_PUMP_FUN_TOKEN_ADDRESS` with your actual values.
## Step 3: Run the Script
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"result": [
{
"transactionHash": "5abc123...",
"blockTime": "2024-01-15T10:30:00.000Z",
"tokenIn": {
"address": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"amount": "1.5",
"amountUsd": 150.00
},
"tokenOut": {
"address": "ABC123...",
"symbol": "PUMP",
"amount": "1000000",
"amountUsd": 150.00
},
"walletAddress": "7abc...",
"exchange": "pumpfun",
"swapType": "buy"
}
]
}
```
## Understanding the Response
| Field | Description |
| ----------------- | ---------------------------------------------- |
| `transactionHash` | Solana transaction signature |
| `blockTime` | When the swap occurred |
| `tokenIn` | Token being sold (with amount and USD value) |
| `tokenOut` | Token being bought (with amount and USD value) |
| `walletAddress` | Wallet that made the swap |
| `exchange` | DEX where swap occurred |
| `swapType` | Type of trade (buy or sell) |
## Next Steps
* [Get Pump.fun New/Bonding/Graduated Tokens](/get-started/tutorials/data-api/tokens-and-markets/get-pump-fun-new-bonding-and-graduated-tokens) - Discover tokens
* [API Reference - Token Swaps](/data-api/solana/token/swaps/token-swaps) - Full API documentation
* [API Reference - Token Price](/data-api/solana/price/token-price) - Price endpoint docs
# How to Get Token Pairs and Liquidity Data
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-token-pairs-and-liquidity-data
Learn how to fetch trading pairs and liquidity information for any ERC20 token using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve all trading pairs and liquidity data for any ERC20 token using the Moralis API. This includes pair addresses, liquidity amounts, volume data, and exchange information. This is essential for building token analytics, DEX aggregators, or trading interfaces. We'll use the following Moralis API endpoint:
* [Get Token Pairs](/data-api/evm/token/swaps/token-pairs) - Fetch all trading pairs and liquidity data for a token
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-token-pairs && cd get-token-pairs
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const TOKEN_ADDRESS = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; // USDC
async function getTokenPairs() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/erc20/${TOKEN_ADDRESS}/pairs?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenPairs();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the token pairs:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page": 1,
"page_size": 100,
"cursor": null,
"result": [
{
"pairAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"pairLabel": "WETH/USDC",
"exchange": "uniswapv3",
"exchangeAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"exchangeLogo": "https://cdn.moralis.io/eth/0x1f98431c8ad98523631ae4a59f267346ea31f984.png",
"token0": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
},
"token1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"logo": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
},
"usdPrice": 3500.50,
"usdPriceFormatted": "3500.50",
"liquidityUsd": 250000000,
"volume24h": 15000000,
"priceChange24h": 2.5
}
]
}
```
## Understanding the Response
| Field | Description |
| ------------------- | ------------------------------------------ |
| `pairAddress` | The liquidity pair contract address |
| `pairLabel` | Human-readable pair name (e.g., WETH/USDC) |
| `exchange` | DEX name (uniswapv2, uniswapv3, sushiswap) |
| `token0` / `token1` | Token metadata for both sides of the pair |
| `usdPrice` | Current price in USD |
| `liquidityUsd` | Total liquidity in USD |
| `volume24h` | 24-hour trading volume in USD |
| `priceChange24h` | 24-hour price change percentage |
## Next Steps
* [Get OHLC Data](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) - Get price history
* [Get Pair Stats](/data-api/evm/token/swaps/pair-stats) - detailed market data
* [Build a DEX Screener](/get-started/tutorials/data-api/tokens-and-markets/build-a-dex-screener-clone) - Build a trading dashboard
* [API Reference](/data-api/evm/token/overview) - Full API documentation
# How to Get Top ERC20 Tokens by Market Cap
Source: https://docs.moralis.com/get-started/tutorials/data-api/tokens-and-markets/get-top-erc-20-tokens-by-market-cap
Learn how to discover and filter top ERC20 tokens by market cap, volume, and other metrics using the Moralis API.
## Introduction
In this tutorial, you'll learn how to discover and filter ERC20 tokens using the Moralis API. You can sort tokens by market cap, trading volume, price change, and other metrics. This is essential for building token discovery platforms, market dashboards, or trading screeners. We'll use the following Moralis API endpoint:
* [Get Filtered Tokens](/data-api/evm/token/discovery/filtered-tokens) - Search and filter tokens by various metrics
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-top-tokens && cd get-top-tokens
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
async function getTopTokens() {
const response = await fetch(
'https://deep-index.moralis.io/api/v2.2/discovery/tokens',
{
method: 'POST',
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
chains: ['eth'],
sortBy: {
metric: 'marketCap',
type: 'DESC',
},
limit: 20,
}),
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTopTokens();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to get top tokens:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page": 1,
"page_size": 20,
"result": [
{
"token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"logo": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
"market_cap": 420000000000,
"fully_diluted_valuation": 420000000000,
"price_usd": 3500.50,
"price_24h_percent_change": 2.5,
"price_7d_percent_change": 5.2,
"volume_24h_usd": 15000000000,
"holders": 7500000,
"total_supply": "120000000",
"total_supply_formatted": "120000000",
"verified_contract": true,
"possible_spam": false,
"security_score": 85
}
]
}
```
## Understanding the Response
| Field | Description |
| -------------------------- | ------------------------------------ |
| `token_address` | Token contract address |
| `name` / `symbol` | Token name and symbol |
| `market_cap` | Current market capitalization in USD |
| `fully_diluted_valuation` | FDV based on max supply |
| `price_usd` | Current price in USD |
| `price_24h_percent_change` | 24-hour price change percentage |
| `price_7d_percent_change` | 7-day price change percentage |
| `volume_24h_usd` | 24-hour trading volume in USD |
| `holders` | Number of unique holders |
| `verified_contract` | Whether contract is verified |
| `possible_spam` | Whether flagged as spam |
| `security_score` | Token security score (0-100) |
## Next Steps
* [Get Token Price](/get-started/tutorials/data-api/prices-and-charts/get-the-price-of-an-erc-20-token) - Get current token prices
* [Get Token Pairs](/get-started/tutorials/data-api/tokens-and-markets/get-token-pairs-and-liquidity-data) - Find trading pairs
* [Build a DEX Screener](/get-started/tutorials/data-api/tokens-and-markets/build-a-dex-screener-clone) - Create a trading dashboard
* [API Reference](/data-api/evm/token/discovery/filtered-tokens) - Full API documentation
# How to Build a Token Approval & Revoke Dashboard (Revoke.cash-Style)
Source: https://docs.moralis.com/get-started/tutorials/data-api/wallets-and-accounts/build-a-token-approval-and-revoke-dashboard-revoke-cash-style
Learn how to build a dashboard to view and revoke token approvals using the Moralis API.
## Introduction
In this tutorial, you'll learn how to build a token approval dashboard similar to Revoke.cash using the Moralis API. Users can view all their ERC20 token approvals and identify potentially risky unlimited approvals. This is an important security tool for managing DeFi permissions. We'll use the following Moralis API endpoint:
* [Get Token Approvals](/data-api/evm/wallet/approvals) - Fetch all token approvals granted by a wallet
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir revoke-dashboard && cd revoke-dashboard
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
async function getTokenApprovals() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/wallets/${WALLET_ADDRESS}/approvals?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getTokenApprovals();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page": 1,
"page_size": 100,
"result": [
{
"block_number": "12526958",
"block_timestamp": "2024-01-15T10:30:00.000Z",
"transaction_hash": "0x...",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"value_formatted": "unlimited",
"token": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"symbol": "USDC",
"logo": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
"decimals": 6,
"current_balance": "1000000000",
"current_balance_formatted": "1000",
"usd_price": 0.9998,
"usd_at_risk": 999.80
},
"spender": {
"address": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
"address_label": "Uniswap V2: Router 2",
"entity": "Uniswap",
"entity_logo": "https://cdn.moralis.io/entities/uniswap.png"
}
}
]
}
```
## Understanding the Response
| Field | Description |
| ----------------------- | ------------------------------------------------------- |
| `value` | Approved amount in smallest unit |
| `value_formatted` | Human-readable approval (may be "unlimited") |
| `token` | Token details including current balance and USD at risk |
| `token.usd_at_risk` | USD value of tokens that could be taken |
| `spender` | Contract with permission to spend tokens |
| `spender.address_label` | Known label for the spender |
| `spender.entity` | Entity name (e.g., Uniswap, OpenSea) |
## Next Steps
* [Get Token Balances](/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-balances-for-a-wallet) - See your token balances
* [Get Wallet History](/get-started/tutorials/data-api/wallets-and-accounts/get-full-wallet-transaction-history-eoa-and-smart-accounts) - View transaction history
* [API Reference](/data-api/evm/wallet/approvals) - Full API documentation
# How to Get Full Wallet Transaction History (EOA & Smart Accounts)
Source: https://docs.moralis.com/get-started/tutorials/data-api/wallets-and-accounts/get-full-wallet-transaction-history-eoa-and-smart-accounts
Learn how to fetch the complete transaction history for any wallet address using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve the full transaction history for any wallet address using the Moralis API. This includes all transactions, token transfers, NFT transfers, and internal transactions in a single, unified timeline. This works for both externally owned accounts (EOAs) and smart contract wallets. We'll use the following Moralis API endpoint:
* [Get Wallet History](/data-api/evm/wallet/wallet-history) - Fetch the complete transaction history for any wallet
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-wallet-history && cd get-wallet-history
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getWalletHistory() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/wallets/${WALLET_ADDRESS}/history?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getWalletHistory();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the wallet history:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page": 1,
"page_size": 100,
"cursor": "abc123...",
"result": [
{
"hash": "0x...",
"nonce": "123",
"transaction_index": "45",
"from_address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"from_address_label": "Vitalik Buterin",
"to_address": "0x1234567890abcdef1234567890abcdef12345678",
"to_address_label": null,
"value": "1000000000000000000",
"gas": "21000",
"gas_price": "50000000000",
"receipt_gas_used": "21000",
"receipt_status": "1",
"block_timestamp": "2024-01-15T10:30:00.000Z",
"block_number": "18500000",
"block_hash": "0x...",
"category": "send",
"summary": "Sent 1 ETH",
"possible_spam": false,
"method_label": null,
"native_transfers": [],
"erc20_transfers": [],
"nft_transfers": []
}
]
}
```
## Understanding the Response
| Field | Description |
| -------------------- | ----------------------------------------------------- |
| `hash` | Transaction hash |
| `from_address` | Sender's wallet address |
| `from_address_label` | Known label for sender |
| `to_address` | Recipient's wallet address |
| `to_address_label` | Known label for recipient |
| `value` | Native token amount in wei |
| `receipt_status` | Transaction status (1 = success) |
| `block_timestamp` | When the transaction was mined |
| `category` | Type of transaction (send, receive, token send, etc.) |
| `summary` | Human-readable transaction summary |
| `erc20_transfers` | ERC20 token transfers in this transaction |
| `nft_transfers` | NFT transfers in this transaction |
| `native_transfers` | Native token transfers |
## Next Steps
* [Get Token Balances](/data-api/evm/wallet/token-balances) - Fetch current balances
* [NFT Balances](/data-api/evm/wallet/nft-balances) - Fetch NFTs by wallet
* [Get Multi-Chain Activity](/get-started/tutorials/data-api/wallets-and-accounts/get-multi-chain-activity-for-a-wallet-address) - See cross-chain activity
# How to Get Internal Transactions for a Wallet Address
Source: https://docs.moralis.com/get-started/tutorials/data-api/wallets-and-accounts/get-internal-transactions-for-a-wallet-address
Learn how to fetch internal transactions (contract calls and ETH transfers between contracts) for any wallet using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve internal transactions for any wallet address using the Moralis API. Internal transactions are calls made between smart contracts during a transaction's execution, including ETH transfers from contracts. These are not visible in standard transaction lists but are important for tracking the complete flow of funds. We'll use the following Moralis API endpoint:
* [Get Decoded Transactions](/data-api/evm/wallet/decoded-transactions) - Fetch transactions with internal calls and detailed execution data
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-internal-transactions && cd get-internal-transactions
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
async function getInternalTransactions() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WALLET_ADDRESS}/verbose?chain=eth&include=internal_transactions`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getInternalTransactions();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the internal transactions:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"page_size": 100,
"page": 1,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"result": [
{
"hash": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21d29f3e2c2f10c82e12c",
"nonce": "1848059",
"transaction_index": "73",
"from_address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"to_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"value": "100000000000000000",
"gas": "30000",
"gas_price": "22434567890",
"receipt_cumulative_gas_used": "4923073",
"receipt_gas_used": "21000",
"receipt_status": "1",
"block_timestamp": "2023-01-01T01:28:23.000Z",
"block_number": "16308190",
"block_hash": "0x3c6d5e2a1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b",
"internal_transactions": [
{
"transaction_hash": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21d29f3e2c2f10c82e12c",
"block_number": 16308190,
"block_hash": "0x3c6d5e2a1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b1b2b",
"type": "CALL",
"from": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"value": "100000000000000000",
"gas": "2300",
"gas_used": "0",
"input": "0x",
"output": "0x"
}
]
}
]
}
```
## Understanding the Response
| Field | Description |
| ----------------------------- | -------------------------------------------------------- |
| `hash` | Parent transaction hash |
| `from_address` | Address that initiated the transaction |
| `to_address` | Address the transaction was sent to |
| `value` | ETH value transferred (in wei) |
| `receipt_status` | Transaction status (1 = success, 0 = failed) |
| `block_timestamp` | When the transaction was mined |
| `internal_transactions` | Array of internal calls within this transaction |
| `internal_transactions.type` | Type of internal call (CALL, CREATE, DELEGATECALL, etc.) |
| `internal_transactions.from` | Address initiating the internal call |
| `internal_transactions.to` | Address receiving the internal call |
| `internal_transactions.value` | ETH value transferred internally (in wei) |
## Next Steps
* [Get Wallet History](/data-api/evm/wallet/wallet-history) - Get complete transaction history
* [Get Transaction by Hash](/data-api/evm/blockchain/transaction-by-hash-decoded) - Get specific transaction details
# How to Get Multi-Chain Activity for a Wallet Address
Source: https://docs.moralis.com/get-started/tutorials/data-api/wallets-and-accounts/get-multi-chain-activity-for-a-wallet-address
Learn how to detect which chains a wallet has been active on using the Moralis API.
## Introduction
In this tutorial, you'll learn how to detect which blockchain networks a wallet address has activity on using the Moralis API. This is useful for building multi-chain portfolio views, determining which chains to query for a user's assets, or understanding a wallet's cross-chain behavior. We'll use the following Moralis API endpoint:
* [Get Chain Activity](/data-api/evm/wallet/chain-activity) - Detect which chains a wallet has been active on
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-chain-activity && cd get-chain-activity
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
async function getChainActivity() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/wallets/${WALLET_ADDRESS}/chains?chains=eth,polygon,bsc,arbitrum,base`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getChainActivity();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to get the chain activity:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"active_chains": [
{
"chain": "eth",
"chain_id": "0x1",
"first_transaction": {
"block_number": "46147",
"block_timestamp": "2015-08-07T03:30:33.000Z",
"transaction_hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
},
"last_transaction": {
"block_number": "19234567",
"block_timestamp": "2024-02-15T10:30:00.000Z",
"transaction_hash": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21d29f3e2c2f10c82e12c"
}
},
{
"chain": "polygon",
"chain_id": "0x89",
"first_transaction": {
"block_number": "15678900",
"block_timestamp": "2021-06-15T08:00:00.000Z",
"transaction_hash": "0x2bc7a8f12345678901234567890abcdef12345678901234567890abcdef1234"
},
"last_transaction": {
"block_number": "52345678",
"block_timestamp": "2024-02-14T15:45:00.000Z",
"transaction_hash": "0x3cd8b9e23456789012345678901abcdef23456789012345678901abcdef2345"
}
}
]
}
```
## Understanding the Response
| Field | Description |
| ------------------- | ------------------------------------------------------------- |
| `address` | The wallet address queried |
| `active_chains` | Array of chains where the wallet has activity |
| `chain` | Chain identifier (eth, polygon, arbitrum, etc.) |
| `chain_id` | Hexadecimal chain ID |
| `first_transaction` | Details of the wallet's first transaction on this chain |
| `last_transaction` | Details of the wallet's most recent transaction on this chain |
| `block_number` | Block number of the transaction |
| `block_timestamp` | When the transaction was mined |
| `transaction_hash` | Hash of the transaction |
## Next Steps
* [Get Wallet History](/data-api/evm/wallet/wallet-history) - Get full transaction history
* [Get Token Balances](/data-api/evm/wallet/token-balances) - Fetch token balances
# How to Get Native Token Balances for EOAs and Smart Accounts
Source: https://docs.moralis.com/get-started/tutorials/data-api/wallets-and-accounts/get-native-token-balances-for-eoas-and-smart-accounts
Learn how to fetch native token balances (ETH, MATIC, BNB) for any wallet address using the Moralis API.
## Introduction
In this tutorial, you'll learn how to retrieve native token balances (like ETH, MATIC, or BNB) for any wallet address using the Moralis API. This works for both externally owned accounts (EOAs) and smart contract wallets like Safe or Argent. We'll use the following Moralis API endpoint:
* [Get Native Balance](/data-api/evm/wallet/native-balance) - Fetch the native token balance for any wallet
## Prerequisites
* Node.js v18+ installed
* A Moralis API key ([get one free](https://admin.moralis.io))
## Step 1: Set Up Your Project
Create a new directory for your project and initialize it:
```bash theme={null}
mkdir get-native-balance && cd get-native-balance
npm init -y
```
## Step 2: Create the Script
Create a file called `index.js` and add the following code:
```javascript theme={null}
// index.js
const API_KEY = 'YOUR_API_KEY';
const WALLET_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'; // Vitalik's wallet
async function getNativeBalance() {
const response = await fetch(
`https://deep-index.moralis.io/api/v2.2/${WALLET_ADDRESS}/balance?chain=eth`,
{
headers: {
'X-API-Key': API_KEY,
},
}
);
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
getNativeBalance();
```
Replace `YOUR_API_KEY` with your actual Moralis API key.
## Step 3: Run the Script
Execute the script to fetch the native balance:
```bash theme={null}
node index.js
```
## Example Response
```json theme={null}
{
"balance": "2847583920000000000000"
}
```
## Understanding the Response
| Field | Description |
| --------- | ----------------------------------------------- |
| `balance` | The native token balance in wei (smallest unit) |
To convert to a human-readable format, divide by 10^18:
```javascript theme={null}
const balanceInEth = Number(data.balance) / 1e18;
console.log(`Balance: ${balanceInEth} ETH`);
```
## Next Steps
* [Get Token Balances](/data-api/evm/wallet/token-balances) - Fetch ERC20 token balances
* [Get Multi-Chain Activity](/data-api/evm/wallet/chain-activity) - See activity across chains
# Export Bulk Blockchain Data
Source: https://docs.moralis.com/get-started/tutorials/datashare/export-bulk-blockchain-data
Learn how to export bulk blockchain data using Moralis Datashare.
## Video Tutorial
# Migrating from OKLink to Moralis
Source: https://docs.moralis.com/get-started/tutorials/migration-guides/migrating-from-ok-link-to-moralis
OKLink is suspending their Explorer API on May 20th, 2025. Any project using OKLink Explorer API needs a new provider before then. Migrate to Moralis APIs in 4 simple steps!
# Migrating from OKLink to Moralis
**URGENT MIGRATION NEEDED** - OKLink is suspending all their Explorer APIs on May 20th, 2025. Applications and platforms using OKLink Explorer API need to migrate as soon as possible to avoid service disruptions. Moralis APIs offer equivalent functionality, making migration straightforward.
With OKLink suspending their API offering, Moralis provides a comprehensive alternative with equivalent functionality and additional capabilities. This guide will help you seamlessly transition your projects from OKLink to Moralis.
## API Endpoint Equivalence
OKLink endpoints can be easily mapped to Moralis equivalents. Below you'll find the mapping organized by API category.
## Quick Reference Guide
Make use of the table below to quickly find the Moralis equivalent for each OKLink endpoint by clicking on the Moralis Equivalent column.
### Solana API
| Feature | OKLink Endpoint | Moralis Equivalent |
| -------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------- |
| Get Account Asset Balances | `https://www.oklink.com/docs/en/#sol-data-account-data-get-addresses-asset-balance` | [Details](#get-account-asset-balances) |
| Get SOL Account Balance | `https://www.oklink.com/docs/en/#sol-data-account-data-get-sol-account-balance` | [Details](#get-sol-account-balance) |
| Get Token Balance | `https://www.oklink.com/docs/en/#sol-data-account-data-get-token-balance` | [Details](#get-token-balance) |
| Get Transaction List | `https://www.oklink.com/docs/en/#sol-data-account-data-get-transaction-list` | [Details](#get-transaction-list) |
### NFT API
| Feature | OKLink Endpoint | Moralis Equivalent |
| ------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------ |
| Get Collection Overview | `https://www.oklink.com/docs/en/#nft-data-get-collection-overview` | [Details](#get-collection-overview) |
| Get NFT List Within Collection | `https://www.oklink.com/docs/en/#nft-data-get-nft-list-within-collection` | [Details](#get-nft-list-within-collection) |
| Get Holder List for Collection | `https://www.oklink.com/docs/en/#nft-data-get-holder-list-for-collection` | [Details](#get-holder-list-for-collection) |
| Get Collection Floor Price | `https://www.oklink.com/docs/en/#nft-data-get-collection-floor-price` | [Details](#get-collection-floor-price) |
| Get Detailed Data for NFT | `https://www.oklink.com/docs/en/#nft-data-get-detailed-data-for-nft` | [Details](#get-detailed-data-for-nft) |
| Get NFT Holder Address | `https://www.oklink.com/docs/en/#nft-data-get-nft-holder-address` | [Details](#get-nft-holder-address) |
| Get NFT Transaction History | `https://www.oklink.com/docs/en/#nft-data-get-nft-transaction-history` | [Details](#get-nft-transaction-history) |
| Get NFT List Held by Address | `https://www.oklink.com/docs/en/#nft-data-get-nft-list-held-by-address` | [Details](#get-nft-list-held-by-address) |
### Token API
| Feature | OKLink Endpoint | Moralis Equivalent |
| --------------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------- |
| Get Token List | `https://www.oklink.com/docs/en/#token-price-data-get-token-list` | [Details](#get-token-list) |
| Get Historical Token Price | `https://www.oklink.com/docs/en/#token-price-data-get-historical-token-price` | [Details](#get-historical-token-price) |
| Get Latest Token Price in Batches | `https://www.oklink.com/docs/en/#token-price-data-get-latest-token-price-in-batches` | [Details](#get-latest-token-price-in-batches) |
| Get Token Market Data | `https://www.oklink.com/docs/en/#token-price-data-get-latest-token-price-in-batches` | [Details](#get-token-market-data) |
| Check Liquidity Pool Addresses | `https://www.oklink.com/docs/en/#token-price-data-check-liquidity-pool-addresses-by-token` | [Details](#check-liquidity-pool-addresses) |
| Get Individual Transaction Data | `https://www.oklink.com/docs/en/#token-price-data-get-individual-transaction-data` | [Details](#get-individual-transaction-data) |
### Other Services
| Feature | OKLink Endpoint | Moralis Equivalent |
| -------------------- | -------------------------------------------------------------- | -------------------------------- |
| Webhook Subscription | `https://www.oklink.com/docs/en/#webhook-subscription-service` | [Details](#webhook-subscription) |
| EVM RPC Data | `https://www.oklink.com/docs/en/#evm-rpc-data` | [Details](#evm-rpc-data) |
## Solana API
### Get Account Asset Balances
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#sol-data-account-data-get-addresses-asset-balance`
| Chain | Moralis Equivalent | Documentation |
| ------ | ---------------------- | ------------------------------------------------------- |
| Solana | Get Sol Portfolio | [Documentation](/data-api/solana/wallet/portfolio) |
| Solana | Get Wallet NFTs | [Documentation](/data-api/solana/wallet/nft-balances) |
| Solana | Get Native SOL Balance | [Documentation](/data-api/solana/wallet/native-balance) |
**Notes**: Moralis provides comprehensive asset balance data including SOL tokens, SPL tokens, and NFTs in a single API call or through dedicated endpoints for each asset type.
### Get SOL Account Balance
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#sol-data-account-data-get-sol-account-balance`
| Chain | Moralis Equivalent | Documentation |
| ------ | ---------------------- | ------------------------------------------------------- |
| Solana | Get Native SOL Balance | [Documentation](/data-api/solana/wallet/native-balance) |
**Notes**: This endpoint provides the native SOL balance for a given wallet address.
### Get Token Balance
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#sol-data-account-data-get-token-balance`
| Chain | Moralis Equivalent | Documentation |
| ------ | ------------------ | ------------------------------------------------------- |
| Solana | Get SPL Token Info | [Documentation](/data-api/solana/wallet/token-balances) |
**Notes**: This endpoint returns detailed information about SPL tokens, including balances, metadata, and more.
### Get Transaction List
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#sol-data-account-data-get-transaction-list`
| Chain | Moralis Equivalent | Documentation |
| ------ | ---------------------------- | ----------------------------------------------------- |
| Solana | Get Wallet Swap Transactions | [Documentation](/data-api/solana/wallet/wallet-swaps) |
**Notes**: This endpoint provides swap transaction history for a wallet on Solana.
## NFT API
### Get Collection Overview
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-collection-overview`
| Chain | Moralis Equivalent | Documentation |
| ----- | --------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Collection Metadata | [Documentation](/data-api/evm/nft/metadata/collection-metadata) |
**Notes**: This endpoint returns comprehensive metadata about an NFT collection, including name, symbol, token standard, and more.
### Get NFT List Within Collection
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-nft-list-within-collection`
| Chain | Moralis Equivalent | Documentation |
| ----- | -------------------- | ----------------------------------------------------------------- |
| EVM | Get NFTs by Contract | [Documentation](/data-api/evm/nft/collections/nfts-by-collection) |
**Notes**: This endpoint retrieves all NFTs within a specific contract with pagination support for large collections.
### Get Holder List for Collection
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-holder-list-for-collection`
| Chain | Moralis Equivalent | Documentation |
| ----- | -------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Owners by Contract | [Documentation](/data-api/evm/nft/ownership/owners-by-contract) |
**Notes**: This endpoint retrieves the complete list of owners for a specific NFT collection.
### Get Collection Floor Price
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-collection-floor-price`
| Chain | Moralis Equivalent | Documentation |
| ----- | ------------------------------- | ---------------------------------------------------------------- |
| EVM | Get NFT Floor Price by Contract | [Documentation](/data-api/evm/nft/prices/collection-floor-price) |
**Notes**: This endpoint provides floor price data from major marketplaces for a specific NFT collection.
### Get Detailed Data for NFT
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-detailed-data-for-nft`
| Chain | Moralis Equivalent | Documentation |
| ------ | -------------------- | -------------------------------------------------------- |
| EVM | Get NFT Metadata | [Documentation](/data-api/evm/nft/metadata/nft-metadata) |
| Solana | Get SOL NFT Metadata | [Documentation](/data-api/solana/nft/nft-metadata) |
**Notes**: These endpoints provide comprehensive metadata for individual NFTs, including attributes, images, and other on-chain data.
### Get NFT Holder Address
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-nft-holder-address`
| Chain | Moralis Equivalent | Documentation |
| ----- | -------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Owners by Token ID | [Documentation](/data-api/evm/nft/ownership/owners-by-token-id) |
**Notes**: This endpoint retrieves owner information for a specific NFT token ID within a collection.
### Get NFT Transaction History
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-nft-transaction-history`
| Chain | Moralis Equivalent | Documentation |
| ----- | -------------------------- | ----------------------------------------------------------------- |
| EVM | Get NFT Contract Transfers | [Documentation](/data-api/evm/nft/transfers/collection-transfers) |
| EVM | Get NFT Trades | [Documentation](/data-api/evm/nft/trades/collection-trades) |
**Notes**: These endpoints provide comprehensive transfer and trade history for NFTs, including marketplace sales and P2P transfers.
### Get NFT List Held by Address
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#nft-data-get-nft-list-held-by-address`
| Chain | Moralis Equivalent | Documentation |
| ------ | ------------------ | ------------------------------------------------------------- |
| EVM | Get Wallet NFTs | [Documentation](/data-api/evm/nft/collections/nfts-by-wallet) |
| Solana | Get SOL NFTs | [Documentation](/data-api/solana/wallet/nft-balances) |
**Notes**: These endpoints retrieve all NFTs held by a specific wallet address with rich metadata.
## Token API
### Get Token List
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-get-token-list`
| Chain | Moralis Equivalent | Documentation |
| ----- | ------------------- | -------------------------------------------------------------- |
| EVM | Get Filtered Tokens | [Documentation](/data-api/evm/token/discovery/filtered-tokens) |
**Notes**: This endpoint allows retrieving tokens with various filtering options.
### Get Historical Token Price
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-get-historical-token-price`
| Chain | Moralis Equivalent | Documentation |
| ------ | ------------------------- | ----------------------------------------------------------------- |
| EVM | Get Multiple Token Prices | [Documentation](/data-api/evm/token/prices/token-prices-batch) |
| EVM | Get OHLCV by Pair Address | [Documentation](/data-api/evm/token/prices/ohlc) |
| Solana | Get Multiple Token Prices | [Documentation](/data-api/solana/token/prices/token-prices-batch) |
| Solana | Get OHLCV by Pair Address | [Documentation](/data-api/solana/token/prices/ohlc) |
**Notes**: These endpoints provide price history data for tokens across different timeframes.
### Get Latest Token Price in Batches
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-get-latest-token-price-in-batches`
| Chain | Moralis Equivalent | Documentation |
| ------ | ------------------------- | ----------------------------------------------------------------- |
| EVM | Get Multiple Token Prices | [Documentation](/data-api/evm/token/prices/token-prices-batch) |
| EVM | Get OHLCV by Pair Address | [Documentation](/data-api/evm/token/prices/ohlc) |
| Solana | Get Multiple Token Prices | [Documentation](/data-api/solana/token/prices/token-prices-batch) |
| Solana | Get OHLCV by Pair Address | [Documentation](/data-api/solana/token/prices/ohlc) |
**Notes**: These endpoints support batch requests for fetching current prices of multiple tokens in a single API call.
### Get Token Market Data
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-get-latest-token-price-in-batches`
| Chain | Moralis Equivalent | Documentation |
| ------ | ------------------- | ---------------------------------------------------------------------- |
| EVM | Get Token Metadata | [Documentation](/data-api/evm/token/metadata/token-metadata) |
| EVM | Get Token Analytics | [Documentation](/data-api/evm/token/metadata/token-score) |
| Solana | Get Token Metadata | [Documentation](/data-api/solana/token/token-metadata) |
| Solana | Get Token Analytics | [Documentation](/data-api/solana/token/market-metrics/token-analytics) |
**Notes**: These endpoints provide comprehensive token metadata including marketcap, supply information, and other analytics.
### Check Liquidity Pool Addresses
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-check-liquidity-pool-addresses-by-token`
| Chain | Moralis Equivalent | Documentation |
| ------ | -------------------------- | --------------------------------------------------------- |
| EVM | Get Token Pairs | [Documentation](/data-api/evm/token/swaps/token-pairs) |
| Solana | Get Token Pairs by Address | [Documentation](/data-api/solana/token/pairs/token-pairs) |
**Notes**: These endpoints provide information about liquidity pairs for specific tokens across various DEXes.
### Get Individual Transaction Data
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#token-price-data-get-individual-transaction-data`
| Chain | Moralis Equivalent | Documentation |
| ----- | ----------------------- | --------------------------------------------------------------------- |
| EVM | Get Transaction | [Documentation](/data-api/evm/blockchain/transaction-by-hash) |
| EVM | Get Decoded Transaction | [Documentation](/data-api/evm/blockchain/transaction-by-hash-decoded) |
**Notes**: These endpoints retrieve detailed transaction data, including decoded information for enhanced readability.
## Other Services
### Webhook Subscription
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#webhook-subscription-service`
| Service | Moralis Equivalent | Documentation |
| -------- | ------------------ | ---------------------------------- |
| Webhooks | Streams API | [Documentation](/streams/overview) |
**Notes**: Moralis Streams API provides powerful real-time blockchain data capabilities, including filters, webhooks, and managed infrastructure.
### EVM RPC Data
**OKLink Endpoint**: `https://www.oklink.com/docs/en/#evm-rpc-data`
| Service | Moralis Equivalent | Documentation |
| ------- | ------------------ | ------------------------------------ |
| RPC | Moralis RPC Nodes | [Documentation](/rpc-nodes/overview) |
**Notes**: Moralis provides reliable and high-performance RPC nodes across multiple blockchain networks.
## Beyond OKLink: Exclusive Moralis Capabilities
Moralis offers many additional endpoints and features not available in OKLink. Here are some of our most popular exclusive endpoints:
### Advanced Wallet Analysis
| Feature | Endpoint | Documentation |
| -------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------- |
| **Wallet History** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/history` | [Documentation](/data-api/evm/wallet/wallet-history) |
| **Wallet Approvals** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/approvals` | [Documentation](/data-api/evm/wallet/approvals) |
| **Wallet Net Worth** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/net-worth` | [Documentation](/data-api/evm/wallet/net-worth) |
### Token Analytics
| Feature | Endpoint | Documentation |
| ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| **Token Holder Stats** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/stats` | [Documentation](/data-api/evm/token/holders/token-holder-stats) |
| **Historical Token Holders** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/historical` | [Documentation](/data-api/evm/token/holders/historical-token-holders) |
### Token Search & Discovery
| Feature | Endpoint | Documentation |
| ------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| **Search Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/search` | [Documentation](/data-api/universal/token/search/token-search) |
| **Trending Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/trending` | [Documentation](/data-api/universal/token/trending-tokens) |
### DEX and Pair Analytics
| Feature | Endpoint | Documentation |
| ------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------- |
| **Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/pairs/:address/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
| **Aggregated Token Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/:token_address/pairs/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
## Getting Started with Moralis
1. **Sign up for a Moralis account**: [https://admin.moralis.com/register](https://admin.moralis.com/register)
2. **Get your API key**: Navigate to the Web3 APIs section in your dashboard
3. **Update your API calls**: Replace OKLink endpoints with the corresponding Moralis endpoints
4. **Explore the documentation**: [https://docs.moralis.com/](https://docs.moralis.com/)
## Why Choose Moralis?
**MIGRATION SUPPORT AVAILABLE** - Moralis has a dedicated team to help you migrate smoothly from OKLink. [Contact our team](https://developers.moralis.com/) for personalized support and to learn about special developer discounts for teams transitioning from OKLink.
### Trusted by Industry Leaders
Moralis APIs power some of the biggest names in the crypto space:
* MetaMask
* Kraken
* Blockchain.com
* And many other top wallets and applications
### Migration Support
Our dedicated migration team is ready to help OKLink users transition smoothly:
* Technical guidance to map your existing implementation
* Support with API key setup and configuration
* Best practices for optimizing API usage
### Developer Discounts
Contact our team today to learn about special pricing options available for teams migrating from OKLink.
Moralis is committed to providing a seamless transition for OKLink users with comprehensive support throughout your migration journey.
# Migrating from Reservoir to Moralis
Source: https://docs.moralis.com/get-started/tutorials/migration-guides/migrating-from-reservoir-to-moralis
Reservoir is sunsetting its API on October 15th, 2025. Any project using Reservoir API needs a new provider before then. Migrate to Moralis APIs in 4 simple steps!
# Migrating from Reservoir to Moralis
**URGENT MIGRATION NEEDED** - Reservoir is sunsetting their NFT APIs on October 15th, 2025. Applications and platforms using Reservoir API need to migrate as soon as possible to avoid service disruptions. Moralis APIs offer equivalent functionality, making migration straightforward.
With Reservoir deprecating their API offering, Moralis provides a comprehensive alternative with equivalent functionality. This guide will help you seamlessly transition your projects from Reservoir to Moralis.
## Quick Reference Guide
Make use of the table below to quickly find the Moralis equivalent for each Reservoir endpoint.
### NFT Data API
| Feature | Reservoir Endpoint | Moralis Equivalent |
| ------------------- | --------------------------------------------------------- | ------------------------------- |
| Get Multiple NFTs | `nft.reservoir.tools/reference/gettokensv7` | [Details](#get-multiple-nfts) |
| NFT Prices | `nft.reservoir.tools/reference/gettokensfloorv1` | [Details](#nft-prices) |
| Get Token IDs | `nft.reservoir.tools/reference/gettokensidsv1` | [Details](#get-token-ids) |
| Refresh Metadata | `nft.reservoir.tools/reference/posttokensrefreshv2` | [Details](#refresh-metadata) |
| Collection Activity | `nft.reservoir.tools/reference/getcollectionsactivityv6` | [Details](#collection-activity) |
| User Activity | `nft.reservoir.tools/reference/getusersactivityv6` | [Details](#user-activity) |
| Token Activity | `nft.reservoir.tools/reference/gettokenstokenactivityv5` | [Details](#token-activity) |
| Sales | `nft.reservoir.tools/reference/getsalesv6` | [Details](#sales) |
| NFT Transfers | `nft.reservoir.tools/reference/gettransfersbulkv2` | [Details](#nft-transfers) |
| User Tokens | `nft.reservoir.tools/reference/getusersusertokensv10` | [Details](#user-tokens) |
| User Collections | `nft.reservoir.tools/reference/getusersusercollectionsv4` | [Details](#user-collections) |
| Owners | `nft.reservoir.tools/reference/getownersv2` | [Details](#owners) |
| Stats | `nft.reservoir.tools/reference/getstatsv1` | [Details](#stats) |
## Endpoint Details
### Get Multiple NFTs
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ------------------ | -------------------------------------------------------- |
| EVM | Get Multiple NFTs | `https://deep-index.moralis.io/api/v2.2/nft/getMultiple` |
### NFT Prices
| Chain | Moralis Equivalent | Moralis URL |
| ----- | -------------------- | ----------------------------------------------------- |
| EVM | Get NFTs by Contract | `https://deep-index.moralis.io/api/v2.2/nft/:address` |
### Get Token IDs
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ------------------ | -------------------------------------------------------- |
| EVM | Get Multiple NFTs | `https://deep-index.moralis.io/api/v2.2/nft/getMultiple` |
### Refresh Metadata
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ------------------- | ------------------------------------------------------------------------------- |
| EVM | Resync NFT Metadata | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/metadata/resync` |
**Note**: Refresh entire collection metadata is available as a premium feature.
### Collection Activity
| Chain | Moralis Equivalent | Moralis URL |
| ----- | -------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Contract Transfers | `https://deep-index.moralis.io/api/v2.2/nft/:address/transfers` |
| EVM | Get NFT Trades | `https://deep-index.moralis.io/api/v2.2/nft/:address/trades` |
### User Activity
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ------------------------ | --------------------------------------------------------------------- |
| EVM | Get NFT Trades by Wallet | `https://deep-index.moralis.io/api/v2.2/wallets/:address/nfts/trades` |
| EVM | Get Wallet NFT Transfers | `https://deep-index.moralis.io/api/v2.2/:address/nft/transfers` |
| EVM | Get Wallet History | `https://deep-index.moralis.io/api/v2.2/wallets/:address/history` |
### Token Activity
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ----------------------- | ------------------------------------------------------------------------- |
| EVM | Get NFT Transfers | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/transfers` |
| EVM | Get NFT Trades by Token | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/trades` |
### Sales
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ----------------------- | ---------------------------------------------------------------------- |
| EVM | Get NFT Trades by Token | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/trades` |
| EVM | Get NFT Trades | `https://deep-index.moralis.io/api/v2.2/nft/:address/trades` |
### NFT Transfers
| Chain | Moralis Equivalent | Moralis URL |
| ----- | -------------------------- | ------------------------------------------------------------------------- |
| EVM | Get NFT Contract Transfers | `https://deep-index.moralis.io/api/v2.2/nft/:address/transfers` |
| EVM | Get NFT Transfers | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/transfers` |
| EVM | Get Wallet NFT Transfers | `https://deep-index.moralis.io/api/v2.2/:address/nft/transfers` |
### User Tokens
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ------------------ | -------------------------------------------------------------- |
| EVM | Get Wallet NFTs | `https://deep-index.moralis.io/api/v2.2/wallets/:address/nfts` |
### User Collections
| Chain | Moralis Equivalent | Moralis URL |
| ----- | -------------------------- | ------------------------------------------------------------------------- |
| EVM | Get Wallet NFT Collections | `https://deep-index.moralis.io/api/v2.2/wallets/:address/nft-collections` |
### Owners
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ----------------------- | ---------------------------------------------------------------------- |
| EVM | Get NFT Owners | `https://deep-index.moralis.io/api/v2.2/nft/:address/owners` |
| EVM | Get NFT Token ID Owners | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/owners` |
### Stats
| Chain | Moralis Equivalent | Moralis URL |
| ----- | ---------------------------- | --------------------------------------------------------------------- |
| EVM | Get NFT Contract Sale Prices | `https://deep-index.moralis.io/api/v2.2/nft/:address/sales` |
| EVM | Get NFT Sale Prices | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/sales` |
## Real-time Data
### Webhooks
| Feature | Moralis Equivalent | Moralis URL | Documentation |
| ---------------- | ------------------ | ----------------------------- | ---------------------------------- |
| Real-time Events | Streams API | N/A - Setup through dashboard | [Documentation](/streams/overview) |
**Notes**: Moralis Streams API provides powerful real-time blockchain data capabilities, including filters, webhooks, and managed infrastructure.
## Beyond Reservoir: Exclusive Moralis Capabilities
Moralis offers many additional endpoints and features not available in Reservoir. Here are some of our most popular exclusive endpoints:
### Advanced Wallet Analysis
| Feature | Endpoint | Documentation |
| -------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------- |
| **Wallet History** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/history` | [Documentation](/data-api/evm/wallet/wallet-history) |
| **Wallet Approvals** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/approvals` | [Documentation](/data-api/evm/wallet/approvals) |
| **Wallet Net Worth** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/net-worth` | [Documentation](/data-api/evm/wallet/net-worth) |
### Token Analytics
| Feature | Endpoint | Documentation |
| ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| **Token Holder Stats** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/stats` | [Documentation](/data-api/evm/token/holders/token-holder-stats) |
| **Historical Token Holders** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/historical` | [Documentation](/data-api/evm/token/holders/historical-token-holders) |
### Token Search & Discovery
| Feature | Endpoint | Documentation |
| ------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| **Search Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/search` | [Documentation](/data-api/universal/token/search/token-search) |
| **Trending Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/trending` | [Documentation](/data-api/universal/token/trending-tokens) |
### DEX and Pair Analytics
| Feature | Endpoint | Documentation |
| ------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------- |
| **Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/pairs/:address/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
| **Aggregated Token Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/:token_address/pairs/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
### NFT Advanced Capabilities
* **Enriched Metadata**: Access fully enriched and normalized metadata on NFT collections and individual tokens through a single API call
* **Real-time NFT Transfer Data**: Get all the latest NFT transfer data for specific NFTs, wallets, or track real-time transfers
* **Advanced Spam Detection**: Protect your platform from undesirable NFTs with collection spam indicators
* **On-chain Pricing Data**: Incorporate on-chain pricing data including last sale prices and floor prices
* **Optimized Image Previews**: Benefit from dynamically sized image previews and conversions to user-friendly formats
## Getting Started with Moralis
1. **Sign up for a Moralis account**: [https://admin.moralis.com/register](https://admin.moralis.com/register)
2. **Get your API key**: Navigate to the Web3 APIs section in your dashboard
3. **Update your API calls**: Replace Reservoir endpoints with the corresponding Moralis endpoints
4. **Explore the documentation**: [https://docs.moralis.com/](https://docs.moralis.com/)
**MIGRATION SUPPORT AVAILABLE** - Moralis has a dedicated team to help you migrate smoothly from Reservoir. [Contact our team](https://developers.moralis.com/) for personalized support.
# Migrating from SimpleHash to Moralis
Source: https://docs.moralis.com/get-started/tutorials/migration-guides/migrating-from-simple-hash-to-moralis
SimpleHash is shutting down on March 27, 2025. Any project using SimpleHash API needs a new provider before then. Migrate to Moralis APIs in 4 simple steps!
# Migrating from SimpleHash to Moralis
**URGENT MIGRATION NEEDED** - SimpleHash is shutting down ALL THEIR APIs. Wallet providers and applications using SimpleHash API need to migrate as soon as possible to avoid service disruptions. Moralis APIs are almost an exact match, making migration straightforward.
With SimpleHash deprecating their API offering, Moralis provides a comprehensive alternative with equivalent functionality and additional capabilities. This guide will help you seamlessly transition your projects from SimpleHash to Moralis.
## API Endpoint Equivalence
SimpleHash endpoints can be easily mapped to Moralis equivalents. Below you'll find the mapping organized by API category.
## Quick Reference Guide
Make use of the table below to quickly find the Moralis equivalent for each SimpleHash endpoint by clicking on the Moralis Equivalent column.
### Token API
| Feature | SimpleHash Endpoint | Moralis Equivalent |
| ---------------------------------- | ------------------------------------------------------------- | -------------------------------------------- |
| Token & Prices | `api.simplehash.com/api/v0/fungibles/assets` | [Details](#token--prices) |
| Token Balances by Wallet(s) | `api.simplehash.com/api/v0/fungibles/balances` | [Details](#token-balances-by-wallets) |
| Token Top Holders | `api.simplehash.com/api/v0/fungibles/top_wallets` | [Details](#token-top-holders) |
| Swaps & Transfers by Wallet(s) | `api.simplehash.com/api/v0/fungibles/transfers/wallets` | [Details](#swaps--transfers-by-wallets) |
| Swaps & Transfers by Token | `api.simplehash.com/api/v0/fungibles/transfers/wallets` | [Details](#swaps--transfers-by-token) |
| Historical Token Prices | `api.simplehash.com/api/v0/fungibles/prices_v2/{fungible_id}` | [Details](#historical-token-prices) |
| Historical Token OHLC | `api.simplehash.com/api/v0/fungibles/ohlc/{fungible_id}` | [Details](#historical-token-ohlc) |
| Native Token Balances by Wallet(s) | `api.simplehash.com/api/v0/native_tokens/balances` | [Details](#native-token-balances-by-wallets) |
### NFT API
| Feature | SimpleHash Endpoint | Moralis Equivalent |
| ---------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------- |
| NFT by Token ID | `api.simplehash.com/api/v0/nfts/{chain}/{contract_address}/{token_id}` | [Details](#nft-by-token-id) |
| NFTs by Contract | `api.simplehash.com/api/v0/nfts/{chain}/{contract_address}` | [Details](#nfts-by-contract) |
| NFTs by Wallet(s) | `api.simplehash.com/api/v0/nfts/owners_v2` | [Details](#nfts-by-wallets) |
| Sales & Transfers by Wallet(s) | `api.simplehash.com/api/v0/nfts/transfers/wallets` | [Details](#sales--transfers-by-wallets) |
| Sales & Transfers by NFT | `api.simplehash.com/api/v0/nfts/transfers/{chain}/{contract_address}/{token_id}` | [Details](#sales--transfers-by-nft) |
| Sales & Transfers by Contract | `api.simplehash.com/api/v0/nfts/transfers/{chain}/{contract_address}` | [Details](#sales--transfers-by-contract) |
| Owners by NFT | `api.simplehash.com/api/v0/nfts/owners/{chain}/{contract_address}/{token_id}` | [Details](#owners-by-nft) |
| Owners by Contract | `api.simplehash.com/api/v0/nfts/owners/{chain}/{contract_address}/` | [Details](#owners-by-contract) |
| Ownership Summary by Wallet(s) | `api.simplehash.com/api/v0/nfts/contracts` | [Details](#ownership-summary-by-wallets) |
| Collections by Wallet(s) | `api.simplehash.com/api/v0/nfts/collections_by_wallets_v2` | [Details](#collections-by-wallets) |
| Collections by Contract | `api.simplehash.com/api/v0/nfts/collections/{chain}/{contract_address}` | [Details](#collections-by-contract) |
| Collection Historical Floor Prices | `api.simplehash.com/api/v0/nfts/floor_prices_v2/collection/{collection_id}/{granularity}` | [Details](#collection-historical-floor-prices) |
| Top Collections | `api.simplehash.com/api/v0/nfts/collections/top_v2` | [Details](#top-collections) |
| Trending Collections | `api.simplehash.com/api/v0/nfts/collections/trending` | [Details](#trending-collections) |
| Traits by Collection | `api.simplehash.com/api/v0/nfts/traits/collection/{collection_id}` | [Details](#traits-by-collection) |
| Wallet Valuation | `api.simplehash.com/api/v0/nfts/owners/value` | [Details](#wallet-valuation) |
| Refresh NFT Metadata | `api.simplehash.com/api/v0/nfts/refresh/{chain}/{contract_address}/{token_id}` | [Details](#refresh-nft-metadata) |
| Refresh Contract Metadata | `api.simplehash.com/reference/refresh-contract-metadata` | [Details](#refresh-contract-metadata) |
## Token API
### Token & Prices
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/assets`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------- |
| EVM | Get Token Price | `https://deep-index.moralis.io/api/v2.2/erc20/:address/price` | [Documentation](/data-api/evm/token/prices/token-price) |
| EVM | Get Multiple Token Prices | `https://deep-index.moralis.io/api/v2.2/erc20/prices` | [Documentation](/data-api/evm/token/prices/token-prices-batch) |
| Solana | Get Token Price | `https://solana-gateway.moralis.io/token/:network/:address/price` | [Documentation](/data-api/solana/token/prices/token-price) |
**Notes**: Moralis also supports historical price lookups by block number and returns additional metadata like links.
### Token Balances by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/balances?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | -------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------- |
| EVM | Get Token Balances | `https://deep-index.moralis.io/api/v2.2/wallets/:address/tokens` | [Documentation](/data-api/evm/wallet/token-balances) |
| Solana | Get Wallet Portfolio | `https://solana-gateway.moralis.io/account/:network/:address/portfolio` | [Documentation](/data-api/solana/wallet/portfolio) |
| Solana | Get Token Balances | `https://solana-gateway.moralis.io/account/:network/:address/tokens` | [Documentation](/data-api/solana/wallet/token-balances) |
### Token Top Holders
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/top_wallets`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------- |
| EVM | Get Token Holders | `https://deep-index.moralis.io/api/v2.2/erc20/:token_address/owners` | [Documentation](/data-api/evm/token/holders/token-holders) |
| Solana | Coming Soon (March 2025) | - | - |
**Notes**: Moralis provides additional endpoints including ERC20 Token Holder Stats and ERC20 Token Holders Timeseries.
#### Swaps & Transfers by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/transfers/wallets?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------- |
| EVM | Get Swaps by Wallet | `https://deep-index.moralis.io/api/v2.2/wallets/:address/swaps` | [Documentation](/data-api/evm/wallet/wallet-swaps) |
| Solana | Get Swaps by Wallet | `https://solana-gateway.moralis.io/account/:network/:walletAddress/swaps` | [Documentation](/data-api/solana/wallet/wallet-swaps) |
**Notes**: Moralis offers additional related endpoints including ERC20 token transfers by wallet and the comprehensive wallet history API.
### Swaps & Transfers by Token
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/transfers/wallets?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | -------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------- |
| EVM | Get Swaps by Token Address | `https://deep-index.moralis.io/api/v2.2/erc20/:address/swaps` | [Documentation](/data-api/evm/token/swaps/token-swaps) |
| Solana | Get Swaps by Token Address | `https://solana-gateway.moralis.io/token/:network/:tokenAddress/swaps` | [Documentation](/data-api/solana/token/swaps/token-swaps) |
**Notes**: Moralis provides additional related endpoints including ERC20 token transfers by contract, swaps by pair address, and Solana swaps by pair address.
### Historical Token Prices
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/prices_v2/{fungible_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------- |
| EVM | Get Token Price | `https://deep-index.moralis.io/api/v2.2/erc20/:address/price` | [Documentation](/data-api/evm/token/prices/token-price) |
| EVM | Get Multiple Token Prices | `https://deep-index.moralis.io/api/v2.2/erc20/prices` | [Documentation](/data-api/evm/token/prices/token-prices-batch) |
### Historical Token OHLC
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/fungibles/ohlc/{fungible_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------- |
| EVM | Get OHLCV by Pair Address | `https://deep-index.moralis.io/api/v2.2/pairs/:address/ohlcv` | [Documentation](/data-api/evm/token/prices/ohlc) |
| Solana | Get OHLCV by Pair Address | `https://solana-gateway.moralis.io/token/:network/pairs/:pairAddress/ohlcv` | [Documentation](/data-api/solana/token/prices/ohlc) |
### Native Token Balances by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/native_tokens/balances?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------- |
| EVM | Get Native Balance by Wallet | `https://deep-index.moralis.io/api/v2.2/:address/balance` | [Documentation](/data-api/evm/wallet/native-balance) |
| EVM | Get Native Balance for Multiple Wallets | `https://deep-index.moralis.io/api/v2.2/wallets/balances` | [Documentation](/data-api/evm/wallet/native-balances-batch) |
| EVM | Get Native & ERC20 Token Balances by Wallet | `https://deep-index.moralis.io/api/v2.2/wallets/:address/tokens` | [Documentation](/data-api/evm/wallet/token-balances) |
| Solana | Get Native Token Balance by Wallet | `https://solana-gateway.moralis.io/account/:network/:address/balance` | [Documentation](/data-api/solana/wallet/native-balance) |
## NFT API
### NFT by Token ID
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/{chain}/{contract_address}/{token_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------ | ------------------------------------------------------------------ | -------------------------------------------------------- |
| EVM | Get NFT Metadata | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id` | [Documentation](/data-api/evm/nft/metadata/nft-metadata) |
| Solana | Get NFT Metadata | `https://solana-gateway.moralis.io/nft/:network/:address/metadata` | [Documentation](/data-api/solana/nft/nft-metadata) |
### NFTs by Contract
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/{chain}/{contract_address}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | -------------------- | ----------------------------------------------------- | ----------------------------------------------------------------- |
| EVM | Get NFTs by Contract | `https://deep-index.moralis.io/api/v2.2/nft/:address` | [Documentation](/data-api/evm/nft/collections/nfts-by-collection) |
### NFTs by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/owners_v2?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ------ | ------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------- |
| EVM | Get NFTs by Wallet | `https://deep-index.moralis.io/api/v2.2/:address/nft` | [Documentation](/data-api/evm/nft/collections/nfts-by-wallet) |
| Solana | Get NFTs by Wallet | `https://solana-gateway.moralis.io/account/:network/:address/nft` | [Documentation](/data-api/solana/wallet/nft-balances) |
### Sales & Transfers by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/transfers/wallets?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------------ | --------------------------------------------------------------------- | ---------------------------------------------------------- |
| EVM | Get NFT Trades by Wallet | `https://deep-index.moralis.io/api/v2.2/wallets/:address/nfts/trades` | [Documentation](/data-api/evm/wallet/nft-trades-by-wallet) |
**Notes**: Moralis offers additional related endpoints including NFT transfers by wallet and comprehensive wallet history.
### Sales & Transfers by NFT
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/transfers/{chain}/{contract_address}/{token_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ----------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------ |
| EVM | Get NFT Trades by Token | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/trades` | [Documentation](/data-api/evm/nft/trades/trades-by-token-id) |
### Sales & Transfers by Contract
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/transfers/{chain}/{contract_address}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | -------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- |
| EVM | Get NFT Trades by Contract | `https://deep-index.moralis.io/api/v2.2/nft/:address/trades` | [Documentation](/data-api/evm/nft/trades/collection-trades) |
### Owners by NFT
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/owners/{chain}/{contract_address}/{token_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | -------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Owners by Token ID | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/owners` | [Documentation](/data-api/evm/nft/ownership/owners-by-token-id) |
### Owners by Contract
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/owners/{chain}/{contract_address}/`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | -------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------- |
| EVM | Get NFT Owners by Contract | `https://deep-index.moralis.io/api/v2.2/nft/:address/owners` | [Documentation](/data-api/evm/nft/ownership/owners-by-contract) |
### Ownership Summary by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/contracts?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ----------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
| EVM | Get NFT Collections by Wallet | `https://deep-index.moralis.io/api/v2.2/:address/nft/collections` | [Documentation](/data-api/evm/nft/collections/nft-collections-by-wallet) |
**Notes**: Moralis supports filtering by token address(es).
### Collections by Wallet(s)
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/collections_by_wallets_v2?chains={chains}&wallet_addresses={wallet_addresses}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ----------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
| EVM | Get NFT Collections by Wallet | `https://deep-index.moralis.io/api/v2.2/:address/nft/collections` | [Documentation](/data-api/evm/nft/collections/nft-collections-by-wallet) |
### Collections by Contract
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/collections/{chain}/{contract_address}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | --------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- |
| EVM | Get NFT Collection Metadata | `https://deep-index.moralis.io/api/v2.2/nft/:address/metadata` | [Documentation](/data-api/evm/nft/metadata/collection-metadata) |
### Collection Historical Floor Prices
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/floor_prices_v2/collection/{collection_id}/{granularity}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------------------------------ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| EVM | Get NFT Historical Floor Price by Contract | `https://deep-index.moralis.io/api/v2.2/nft/:address/floor-price/historical` | [Documentation](/data-api/evm/nft/prices/historical-floor-price) |
**Notes**: Floor prices are supported on Ethereum & Base. Moralis also offers additional endpoints for NFT Floor Price by Contract, NFT Floor Price by Token ID, Sale Prices by Contract, and Sale Prices by Token ID.
### Trait Floor Prices by NFT
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------ | -------------------------------------------------------------------- | -------------------------------------------------------- |
| EVM | Get NFTs by Traits | `https://deep-index.moralis.io/api/v2.2/nft/:address/nfts-by-traits` | [Documentation](/data-api/evm/nft/traits/nfts-by-traits) |
### Top Collections
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/collections/top_v2`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------- |
| EVM | Get Top NFT Collections by Market Cap | `https://deep-index.moralis.io/api/v2.2/market-data/nfts/top-collections` | [Documentation](/data-api/evm/nft/discovery/nfts-by-market-cap) |
**Notes**: Currently only supports Ethereum.
### Trending Collections
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/collections/trending`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ----------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------- |
| EVM | Get Top NFT Collections by Trading Volume | `https://deep-index.moralis.io/api/v2.2/market-data/nfts/hottest-collections` | [Documentation](/data-api/evm/nft/discovery/nfts-by-volume) |
**Notes**: Currently only supports Ethereum.
### Traits by Collection
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/traits/collection/{collection_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ---------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| EVM | Get NFT Traits by Collection | `https://deep-index.moralis.io/api/v2.2/nft/:address/traits` | [Documentation](/data-api/evm/nft/traits/traits-by-collection) |
**Notes**: Moralis also offers an endpoint to get NFTs by traits.
### Wallet Valuation
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/owners/value`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------- | ------------------------------------------------------------------- | ----------------------------------------------- |
| EVM | Get Wallet Networth | `https://deep-index.moralis.io/api/v2.2/wallets/:address/net-worth` | [Documentation](/data-api/evm/wallet/net-worth) |
**Notes**: Currently calculates based on fungibles.
### Refresh NFT Metadata
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/nfts/refresh/{chain}/{contract_address}/{token_id}`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| EVM | Resync NFT Metadata | `https://deep-index.moralis.io/api/v2.2/nft/:address/:token_id/metadata/resync` | [Documentation](/data-api/evm/nft/utilities/resync-nft-metadata) |
### Refresh Contract Metadata
**SimpleHash Endpoint**: `https://docs.simplehash.com/reference/refresh-contract-metadata`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ----------------------------- | ----------------------------- | ----------------------------- |
| EVM | Available as Premium Endpoint | Available as Premium Endpoint | Available as Premium Endpoint |
## Name Resolution
### ENS Lookup
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/ens/lookup`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------ | ------------------------------------------------------------ | ------------------------------------------------ |
| EVM | Resolve ENS Domain | `https://deep-index.moralis.io/api/v2.2/resolve/ens/:domain` | [Documentation](/data-api/evm/wallet/ens-lookup) |
**Notes**: Moralis offers additional endpoints for resolving Unstoppable Domains and other resolution services.
### Reverse ENS Lookup
**SimpleHash Endpoint**: `https://api.simplehash.com/api/v0/ens/reverse_lookup`
| Chain | Moralis Equivalent | Moralis URL | Documentation |
| ----- | ------------------ | ----------------------------------------------------------------- | ----------------------------------------------------- |
| EVM | Resolve Address | `https://deep-index.moralis.io/api/v2.2/resolve/:address/reverse` | [Documentation](/data-api/evm/wallet/resolve-address) |
**Notes**: Moralis provides additional endpoints for getting Unstoppable Domain by Address and Address by Unstoppable Domain.
## Real-time Data
### Webhooks
| Feature | Moralis Equivalent | Moralis URL | Documentation |
| ---------------- | ------------------ | ----------------------------- | ---------------------------------- |
| Real-time Events | Streams API | N/A - Setup through dashboard | [Documentation](/streams/overview) |
**Notes**: Moralis Streams API provides powerful real-time blockchain data capabilities, including filters, webhooks, and managed infrastructure. Unlike SimpleHash, Moralis offers comprehensive support for real-time blockchain events tracking.
## Beyond SimpleHash: Exclusive Moralis Capabilities
Moralis offers many additional endpoints and features not available in SimpleHash. Here are some of our most popular exclusive endpoints:
### Advanced Wallet Analysis
| Feature | Endpoint | Documentation |
| -------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------- |
| **Wallet History** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/history` | [Documentation](/data-api/evm/wallet/wallet-history) |
| **Wallet Approvals** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/approvals` | [Documentation](/data-api/evm/wallet/approvals) |
| **Wallet Net Worth** | `GET https://deep-index.moralis.io/api/v2.2/wallets/:address/net-worth` | [Documentation](/data-api/evm/wallet/net-worth) |
### Token Analytics
| Feature | Endpoint | Documentation |
| ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| **Token Holder Stats** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/stats` | [Documentation](/data-api/evm/token/holders/token-holder-stats) |
| **Historical Token Holders** | `GET https://deep-index.moralis.io/api/v2.2/erc20/:token_address/holders/historical` | [Documentation](/data-api/evm/token/holders/historical-token-holders) |
### Token Search & Discovery
| Feature | Endpoint | Documentation |
| ------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| **Search Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/search` | [Documentation](/data-api/universal/token/search/token-search) |
| **Trending Tokens** | `GET https://deep-index.moralis.io/api/v2.2/tokens/trending` | [Documentation](/data-api/universal/token/trending-tokens) |
### DEX and Pair Analytics
| Feature | Endpoint | Documentation |
| ------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------- |
| **Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/pairs/:address/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
| **Aggregated Token Pair Stats** | `GET https://deep-index.moralis.io/api/v2.2/:token_address/pairs/stats` | [Documentation](/data-api/evm/token/swaps/pair-stats) |
### NFT Advanced Capabilities
* **Enriched Metadata**: Access fully enriched and normalized metadata on NFT collections and individual tokens through a single API call
* **Real-time NFT Transfer Data**: Get all the latest NFT transfer data for specific NFTs, wallets, or track real-time transfers
* **Advanced Spam Detection**: Protect your platform from undesirable NFTs with collection spam indicators
* **On-chain Pricing Data**: Incorporate on-chain pricing data including last sale prices and floor prices
* **Optimized Image Previews**: Benefit from dynamically sized image previews and conversions to user-friendly formats
## Getting Started with Moralis
1. **Sign up for a Moralis account**: [https://admin.moralis.com/register](https://admin.moralis.com/register)
2. **Get your API key**: Navigate to the Web3 APIs section in your dashboard
3. **Update your API calls**: Replace SimpleHash endpoints with the corresponding Moralis endpoints
4. **Explore the documentation**: [https://docs.moralis.com/](https://docs.moralis.com/)
## Why Choose Moralis?
**MIGRATION SUPPORT AVAILABLE** - Moralis has a dedicated team to help you migrate smoothly from SimpleHash. [Contact our team](https://developers.moralis.com/) for personalized support and to learn about special developer discounts for teams transitioning from SimpleHash.
### Trusted by Industry Leaders
Moralis APIs power some of the biggest names in the crypto space:
* MetaMask
* Kraken
* Blockchain.com
* And many other top wallets and applications
### Migration Support
Our dedicated migration team is ready to help SimpleHash users transition smoothly:
* Technical guidance to map your existing implementation
* Support with API key setup and configuration
* Best practices for optimizing API usage
### Developer Discounts
Contact our team today to learn about special pricing options available for teams migrating from SimpleHash.
Moralis is committed to providing a seamless transition for SimpleHash users with comprehensive support throughout your migration journey.
# Tutorials and Guides
Source: https://docs.moralis.com/get-started/tutorials/overview
Step-by-step tutorials for common blockchain data use cases and migration guides from other providers.
## Overview
This section contains practical **tutorials** and **guides** to help you build with Moralis APIs.
Each tutorial walks through a specific use case with code examples you can adapt for your own projects.
***
## What You'll Find
### Data API Tutorials
Step-by-step guides covering common blockchain data queries:
* **Tokens and Markets** - Query token balances, swaps, metadata, and market data
* **Prices and Charts** - Fetch historical prices and OHLC data for charting
* **Blocks and Transactions** - Look up blocks by timestamp and query transactions
* **NFTs** - Get NFT ownership, floor prices, metadata, and traits
### Datashare Tutorials
Guides for exporting bulk blockchain data with Moralis Datashare:
* **S3 Bucket Setup** - Configure an AWS S3 bucket to receive Datashare exports
* **Export Bulk Blockchain Data** - Video walkthrough of exporting blockchain data at scale
### Migration Guides
Guides for migrating from other blockchain data providers:
* **From Reservoir** - Migrate NFT data queries to Moralis
* **From OK Link** - Migrate blockchain data queries to Moralis
* **From SimpleHash** - Migrate NFT API calls to Moralis
***
## Tutorial Categories
### Tokens and Markets
| Tutorial | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [Get ERC-20 Token Balance](/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-balances-for-a-wallet) | Query token holdings for a wallet |
| [Get Token Metadata](/get-started/tutorials/data-api/tokens-and-markets/get-erc-20-token-metadata-by-address-or-symbol) | Retrieve token details and decimals |
| [Get Top Tokens by Market Cap](/get-started/tutorials/data-api/tokens-and-markets/get-top-erc-20-tokens-by-market-cap) | Discover trending tokens |
### Prices and Charts
| Tutorial | Description |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [Get Historical Token Prices](/get-started/tutorials/data-api/prices-and-charts/get-historical-erc-20-token-prices-ohlc-data) | Query price history for tokens |
| [Get OHLC Data](/get-started/tutorials/data-api/prices-and-charts/build-crypto-price-charts-using-ohlc-data) | Fetch candlestick data for charts |
### NFTs
| Tutorial | Description |
| -------------------------------------------------------------------------------------------------- | ------------------------------------ |
| [Get NFT Owners](/get-started/tutorials/data-api/nfts/get-nft-owners-and-ownership-details) | List all owners of an NFT collection |
| [Get NFT Floor Price](/get-started/tutorials/data-api/nfts/get-nft-floor-prices) | Query collection floor prices |
| [Get NFT Metadata](/get-started/tutorials/data-api/nfts/get-nft-metadata-by-contract-and-token-id) | Retrieve NFT attributes and media |
### Datashare Tutorials
| Tutorial | Description |
| -------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [Set Up an S3 Bucket for Datashare](/datashare/s3-bucket-setup) | Configure an AWS S3 bucket to receive Datashare exports |
| [Export Bulk Blockchain Data](https://www.youtube.com/watch?v=8QvGFGz2-Vo) | Video tutorial on exporting bulk blockchain data using Datashare |
***
## Get Started
Choose a tutorial based on what you want to build:
* **Building a wallet?** Start with [Token Balances](/data-api/evm/wallet/token-balances)
* **Building charts?** Start with [OHLC Data](/data-api/evm/token/prices/ohlc)
* **Building NFT features?** Start with [NFT Metadata](/data-api/evm/nft/metadata/nft-metadata)
# Monitoring NFT Transfers from Specific Wallet Addresses
Source: https://docs.moralis.com/get-started/tutorials/streams/nft-monitoring/monitoring-nft-transfers-from-specific-wallet-addresses
Let's create a stream that monitors all the NFT contract transfers from a specific sender address.
This stream uses the listen to all addresses feature that is available only on Business and Enterprise plans.
There will be a few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI, and you will not receive webhook requests from those non-standard NFT contracts.
You will use the ABI specific to NFT transfers, the one that has indexed for tokenId.
## Programmatically
```javascript theme={null}
const NFT_transfer_ABI = [{
"anonymous": false,
"inputs": [
{ "indexed": true, "name": "from", "type": "address" },
{ "indexed": true, "name": "to", "type": "address" },
{ "indexed": true, "name": "tokenId", "type": "uint256" },
],
"name": "transfer",
"type": "event",
}]; // valid abi of the event
const options = {
chains: [EvmChain.ETHEREUM], // list of blockchains to monitor
description: "monitor all NFT transfers", // your description
tag: "NFT_transfers", // give it a tag
abi: NFT_transfer_ABI,
includeContractLogs: true,
allAddresses: true,
topic0: ["Transfer(address,address,uint256)"], // topic of the event
advancedOptions: [
{
topic0: "Transfer(address,address,uint256)",
filter: { "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] }, // only receive NFT transfer events from this address
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Select `Listen to all addresses` and `Contract interactions (logs)`
5. Add below value to advanced options
```json theme={null}
[{
"topic0": "Transfer(address,address,uint256)",
"filter": { "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] }
}]
```
6. Click on create stream button
# How to Track NFT Transfers in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/nft-monitoring/track-nft-transfers-in-real-time
Let's create a stream that monitors all the NFT contract transfers.
This stream uses the listen to all addresses feature that is available only on Business and Enterprise plans.
There will be a few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI, and you will not receive webhook requests from those non-standard NFT contracts.
## Programmatically
```javascript theme={null}
const NFT_transfer_ABI = [{
"anonymous": false,
"inputs": [
{ "indexed": true, "name": "from", "type": "address" },
{ "indexed": true, "name": "to", "type": "address" },
{ "indexed": true, "name": "tokenId", "type": "uint256" },
],
"name": "transfer",
"type": "event",
}]; // valid abi of the event
const options = {
chains: [EvmChain.ETHEREUM], // list of blockchains to monitor
description: "monitor all NFT transfers", // your description
tag: "NFT_transfers", // give it a tag
abi: NFT_transfer_ABI,
includeContractLogs: true,
allAddresses: true,
topic0: ["Transfer(address,address,uint256)"], // topic of the event
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Select `Listen to all addresses` and `Contract interactions (logs)`
5. Click on create stream button
# How to Track Specific NFTs or NFT Collections in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/nft-monitoring/track-specific-nfts-or-nft-collections-in-real-time
Let's create a stream that monitors specific CryptoPunk NFTs based on an array of Token IDs.
## Programmatically
**JavaScript**
```javascript theme={null}
const punkTransferAbi = [
{
anonymous: false,
inputs: [
{ indexed: true, name: "from", type: "address" },
{ indexed: true, name: "to", type: "address" },
{ indexed: false, name: "punkIndex", type: "uint256" },
],
name: "PunkTransfer",
type: "event",
},
]; // valid abi of the event
const options = {
chains: [EvmChain.ETHEREUM], // list of blockchains to monitor
description: "1000 to 1002 cryptopunks", // your description
tag: "cryptoPunks", // give it a tag
abi: punkTransferAbi,
includeContractLogs: true,
topic0: ["PunkTransfer(address,address,uint256)"], // topic of the event
advancedOptions: [
{
topic0: "PunkTransfer(address,address,uint256)",
filter: { in: ["punkIndex", ["1000", "1001", "1002"]] }, // only receive transfer events if the token id is 1000/1001/1002
includeNativeTxs: true,
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
const { id } = stream.toJSON(); // { id: 'YOUR_STREAM_ID', ...stream }
// Attach the contract address to the stream
await Moralis.Streams.addAddress({
id,
address: "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", // crypto punks address
});
```
**Python**
```python theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
punk_transfer_abi = [{
"anonymous": False,
"inputs": [
{ "indexed": True, "name": "from", "type": "address" },
{ "indexed": True, "name": "to", "type": "address" },
{ "indexed": False, "name": "punkIndex", "type": "uint256" },
],
"name": "PunkTransfer",
"type": "event",
}]
body = {
"webhookUrl": "https://YOUR_WEBHOOK_URL",
"description": "1000 to 1002 cryptopunks",
"tag": "cryptoPunks",
"topic0": ["PunkTransfer(address,address,uint256)"],
"includeContractLogs": True,
"abi": punk_transfer_abi,
"advancedOptions": [
{
"topic0": "PunkTransfer(address,address,uint256)",
"filter": { "in": ["punkIndex", ["1000", "1001", "1002"]] },
"includeNativeTxs": True,
},
],
"chainIds": ["0x1"],
}
result = streams.evm.create_stream(
api_key=api_key,
body=body,
)
print(result)
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Add below value to advanced options
```json theme={null}
[
{
"topic0": "PunkTransfer(address,address,uint256)",
"filter": { "in": ["punkIndex", ["1000", "1001", "1002"]] }
}
]
```
5. Click on create stream button
# How to Track Smart Contract Events in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/smart-contracts-and-events/track-smart-contract-events-in-real-time
Let's create a stream that monitors all the events specific to a contract factory.
This stream uses the listen to all addresses feature that is available only on Business and Enterprise plans.
You will need an ABI that is used only on your contracts in order to not receive the events from other contracts that use the same ABI.
## Programmatically: How to Listen to Events from a Contract Factory
```javascript theme={null}
const Contract_Factory_ABI = [{
"anonymous": false,
"inputs": [
{ "indexed": true, "name": "from", "type": "address" },
{ "indexed": true, "name": "to", "type": "address" },
{ "indexed": true, "name": "contract", "type": "address" },
],
"name": "factoryEvent",
"type": "event",
}]; // valid abi of the event
const options = {
chains: [EvmChain.ETHEREUM], // list of blockchains to monitor
description: "monitor a contract factory", // your description
tag: "contract_Factory", // give it a tag
abi: Contract_Factory_ABI,
includeContractLogs: true,
allAddresses: true,
topic0: ["factoryEvent(address,address,address)"], // topic of the event
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
```
## WebUI: How to Listen to Events from a Contract Factory
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Select `Listen to all addresses` and `Contract interactions (logs)`
5. Click on create stream button
# How to Monitor High-Value ERC20 Transfers in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/token-monitoring/monitor-high-value-erc-20-transfers-in-real-time
Learn how to listen to all ERC20 token transfers over certain amount sent by specific address using Moralis Streams API.
Let's create a stream that monitors all the ERC20 contract transfers where sender is a specific address and the number of coins transferred is over 1000.
This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. There could be few ERC20 contracts that don't follow the standards, and they may use a different ABI for transfers. You will use the ABI specific to ERC20 transfers, the one that doesn't have indexed for third parameter.
## Programmatically
```javascript theme={null}
const ERC20_transfer_ABI = [{
"anonymous": false,
"inputs": [
{ "indexed": true, "name": "from", "type": "address" },
{ "indexed": true, "name": "to", "type": "address" },
{ "indexed": false, "name": "value", "type": "uint256" },
],
"name": "transfer",
"type": "event",
}]; // valid abi of the event
const filter_ERC20 = {
"and": [
{ "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] },
{ "gt": ["value", "1000000000"] }, // Example of USDT (6 Decimals)
],
}; // only receive ERC20 contract transfers where sender is a specific address and the number of coins transferred is over 1000
const options = {
chains: [EvmChain.ETHEREUM], // list of blockchains to monitor
description: "monitor all ERC20 transfers", // your description
tag: "ERC20_transfers", // give it a tag
abi: ERC20_transfer_ABI,
includeContractLogs: true,
allAddresses: true,
topic0: ["Transfer(address,address,uint256)"], // topic of the event
advancedOptions: [
{
topic0: "Transfer(address,address,uint256)",
filter: filter_ERC20
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Select `Listen to all addresses` and `Contract interactions (logs)`
5. Add below value to advanced options
```json theme={null}
[
{
"topic0": "Transfer(address,address,uint256)",
"filter": {
"and": [
{ "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] },
{ "gt": ["value", "1000000000"] }
]
}
}
]
```
6. Click on create stream button.
# How to Track ERC20 Token Mints and Burns in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/token-monitoring/track-erc-20-token-mints-and-burns-in-real-time
Learn how to monitor ERC20 token burns or mints using Moralis Streams API.
Lets check all USDC transfers but filter transaction where the recipient or the sender is the zero address and if the amount is greater or equal to 10000 USDC.
## Programmatically
```javascript theme={null}
const transferUsdcAbi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
];
const filter = {
or: [
{
and: [
{ eq: ["sender", "0x00000...00000"] },
{ gte: ["amount", "10000000000"] },
],
},
{
and: [
{ eq: ["receiver", "0x00000...00000"] },
{ gte: ["amount", "10000000000"] },
],
},
],
}; // we will only receive events when the transfer recipent or the sender is the zero address meaning we are filtering mints and burn
const options = {
chains: [EvmChain.ETHEREUM], // Monitor USDC on ethereum
description: "Token burns and mints", // your description
tag: "mintsAndBurns", // give it a tag
abi: transferUsdcAbi,
includeContractLogs: true,
topic0: ["Transfer(address,address,uint256)"],
advancedOptions: [
{
topic0: "Transfer(address,address,uint256)",
filter,
includeNativeTxs: true,
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,
};
const stream = await Moralis.Streams.add(options);
const { id } = stream.toJSON(); // { id: 'YOUR_STREAM_ID', ...stream }
// Attach the contract address to the stream
await Moralis.Streams.addAddress({
id,
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC address
});
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and Add the Abi and select the topic
4. Add below value to advanced options
```json theme={null}
[
{
"topic0": "Transfer(address,address,uint256)",
"filter": {
"or": [
{
"and": [
{ "eq": ["sender", "0x00000...00000"] },
{ "gte": ["amount", "10000000000"] }
]
},
{
"and": [
{ "eq": ["receiver", "0x00000...00000"] },
{ "gte": ["amount", "10000000000"] }
]
}
]
}
}
]
```
5. Click on create stream button.
# How to Track New Tokens and Trading Pairs in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/token-monitoring/track-new-tokens-and-trading-pairs-in-real-time
Learn how to monitor for new tokens by tracking DEX pair creation events using Moralis Streams API.
Monitoring for new tokens in the DeFi space is essential for discovering opportunities and building token discovery platforms. While you could monitor for token minting events, a more reliable approach is to track DEX pair creation events, as these indicate tokens that are actually being launched with liquidity.
Pair creation events are more reliable indicators of new tokens than minting events because they indicate a token is being launched with actual trading liquidity.
## Approach 1: Monitoring DEX Pair Creation
Uniswap V2 is one popular DEX protocols.
```javascript theme={null}
// Note: This is a sample ABI for Uniswap V2 Factory. Always verify the latest
const uniswapV2FactoryAbi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "token0",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "token1",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "pair",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "",
type: "uint256",
},
],
name: "PairCreated",
type: "event",
}
];
const options = {
chains: [EvmChain.ETHEREUM], // Monitor on Ethereum
description: "Track new Uniswap V2 pairs",
tag: "uniswap_v2_pairs",
abi: uniswapV2FactoryAbi,
includeContractLogs: true,
topic0: ["PairCreated(address,address,address,uint256)"],
advancedOptions: [
{
topic0: "PairCreated(address,address,address,uint256)",
includeNativeTxs: true,
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL",
};
const stream = await Moralis.Streams.add(options);
const { id } = stream.toJSON();
// Attach the Uniswap V2 Factory address to the stream
// Verify factory addresses and ABIs from official sources, as they may change over time.
await Moralis.Streams.addAddress({
id,
address: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", // Uniswap V2 Factory
});
```
## Approach 2: Monitoring Multiple DEXes
To get comprehensive coverage, monitor multiple DEXes simultaneously:
```javascript theme={null}
const multiDexOptions = {
chains: ["0x1", "0x38", "0x89"], // Ethereum, BSC, Polygon
description: "Track pairs across multiple DEXes",
tag: "multidex_pairs",
abi: uniswapV2FactoryAbi, // Compatible with most V2-style DEXes
includeContractLogs: true,
topic0: ["PairCreated(address,address,address,uint256)"],
advancedOptions: [
{
topic0: "PairCreated(address,address,address,uint256)",
includeNativeTxs: true,
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL",
};
const stream = await Moralis.Streams.add(multiDexOptions);
const { id } = stream.toJSON();
// Attach multiple factory addresses.
// Verify the official DEX documentations to get the latest addresses.
const factories = [
"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", // Uniswap V2
"0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac", // SushiSwap
"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", // PancakeSwap V2
"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", // QuickSwap
];
await Moralis.Streams.addAddress({
id,
address: factories,
});
```
## Use Cases
This approach is perfect for:
* **Token Discovery Platforms**: Automatically discover and list new tokens
* **DeFi Analytics**: Track new token launches for market analysis
* **Trading Bots**: React to new token launches with liquidity
* **Portfolio Trackers**: Add new tokens to user portfolios automatically
* **Security Monitoring**: Monitor for potential scam tokens
# Track Specific ERC20 Token Transfers From a List of Wallets
Source: https://docs.moralis.com/get-started/tutorials/streams/token-monitoring/track-specific-erc-20-token-transfers-from-a-list-of-wallets
Learn how to Track Specific ERC20 Token Transfers From a List of Wallets using Moralis Streams API.
Lets check a list of wallets and filter only a specific ERC20 Token Transfers. We will use the built-in `moralis_streams_contract_address` filter, to filter only the specific token transfers.
## Programmatically
```javascript theme={null}
const ERC20TransferABI = [
{
anonymous: false,
inputs: [
{
indexed: true,
name: "from",
type: "address",
},
{
indexed: true,
name: "to",
type: "address",
},
{
indexed: false,
name: "value",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
];
// This filter will only listen to BUST token transfers
const filter = {
eq: [
"moralis_streams_contract_address",
"0x55d398326f99059ff775485246999027b3197955",
], // BUST contract https://bscscan.com/token/0x55d398326f99059ff775485246999027b3197955
};
const options = {
chains: ["0x38"],
description: "Listen to a list of wallets for BUSD transfers",
tag: "busd-transfers",
webhookUrl: "https://webhook.site/e04c2edc-afb9-45b8-aff5-20724b2b1561",
includeContractLogs: true,
topic0: ["Transfer(address,address,uint256)"],
abi: ERC20TransferABI,
advancedOptions: [
{
topic0: "Transfer(address,address,uint256)",
filter,
},
],
};
const stream = await Moralis.Streams.add(options);
const { id } = stream.toJSON(); // { id: 'YOUR_STREAM_ID', ...stream }
// Attach the list of addresses to the stream
await Moralis.Streams.addAddress({
id,
address: ["0x1234...5678", "0x8765...4321", "0x543...0f43"],
});
```
# Get Native Balances
Source: https://docs.moralis.com/get-started/tutorials/streams/wallet-monitoring/get-native-balances
Learn how to get native balances of addresses that appear in your Stream webhooks.
There is an option `getNativeBalances` when creating or editing a Stream. It is a list of native balance calls for specific addresses.
You can get native balances (ETH/BNB/MATIC and many more) of addresses that appear in your webhook. They work similarly to [Triggers](/streams/streams-concepts/triggers).
The `getNativeBalances` trigger is currently available with a business plan or higher.
## Native Balance Trigger
```json theme={null}
"getNativeBalances": [
{
"selectors": ["$fromAddress", "$toAddress"],
"type": "tx"
}
]
```
* `selectors` is a list of [valid Selectors](/streams/streams-concepts/triggers#selectors). For each selector you will get the native balance in the webhook.
* `type` specifies which part of the webhook you want to select the addresses from. See [Valid Types](/streams/streams-concepts/triggers#type). The value `internalTx` is also allowed.
## Response
The webhook introduces a new field `nativeBalances` that has the balances uniquely ordered by the triggers:
```json theme={null}
{
"confirmed": true,
"chainId": "0x1",
"abi": [],
"streamId": "v900a834-a542-43f9-98f6-0f76caf65394",
"tag": "someString",
"retries": 0,
"block": {
"number": "16140655",
"hash": "0xfc0b1ae5d04b3c5a780f1f72658edc9e26a6340df4b1118a713652b6d043039a",
"timestamp": "1670510543"
},
"logs": [],
"txs": [
{
"hash": "0xd304ef0dd0df001d8f37de569af63585dbf7637247b17dc12224828960b4d830",
"gas": "120000",
"gasPrice": "17605149814",
"nonce": "43904",
"input": "0xa9059cbb00000000000000000000000072f54455fbdbff1b8975ab2df599ff9f9afb5310000000000000000000000000000000000000000000000000000000000606a9e0",
"transactionIndex": "16",
"fromAddress": "0x0b5c4a7fcda49e0a8661419bb55b86161a86db2a",
"toAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"value": "0",
"type": "2",
"v": "0",
"r": "52200684288032529078283440758240219132630446778024109656659293182067276426999",
"s": "25805856329951682196861199677610079726197925451457581628939426805653323455347",
"receiptCumulativeGasUsed": "1214527",
"receiptGasUsed": "63209",
"receiptContractAddress": null,
"receiptRoot": null,
"receiptStatus": "1"
}
],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftTokenApprovals": [],
"nftApprovals": {
"ERC721": [],
"ERC1155": []
},
"nftTransfers": [],
"nativeBalances": [
{
"address": "0x0b5c4a7fcda49e0a8661419bb55b86161a86db2a",
"balance": "3921415148849464186"
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"balance": "2135786324"
}
]
}
```
# Listen to all Addresses
Source: https://docs.moralis.com/get-started/tutorials/streams/wallet-monitoring/listen-to-all-addresses
Learn how to listen to all addresses, NFT contract transfers, events from new contracts specific to a contract factory, and NFT contract transfers where the sender is a specific address.
Learn how to listen to all addresses, NFT contract transfers, events from new contracts specific to a contract factory, and NFT contract transfers where the sender is a specific address.
* Listen to all NFT contract transfers [tutorial](/get-started/tutorials/streams/nft-monitoring/track-nft-transfers-in-real-time)
* Listen to all events from new contracts specific to a contract factory [tutorial](/get-started/tutorials/streams/smart-contracts-and-events/track-smart-contract-events-in-real-time)
* Listen to all NFT contract transfers where sender is a specific address [tutorial](/get-started/tutorials/streams/nft-monitoring/monitoring-nft-transfers-from-specific-wallet-addresses)
* Listen to all ERC20 contract transfers where sender is a specific address and number of coins transferred is over 1000 [tutorial](/get-started/tutorials/streams/token-monitoring/track-specific-erc-20-token-transfers-from-a-list-of-wallets)
Say you have the following topic `Transfer(address,address,uint256)`. You can get every transfer happening on chain by setting the topic to `Transfer(address,address,uint256)` and setting `allAddresses` to `true`. That means you will get all transactions that match this topic.
This feature is not available in all plans.
You will also have to provide the ABI, and the events will match only that particular ABI and topic. There are cases when different ABIs have the same topic (for example the `indexed` field can be different for two ABIs and the topic will be the same).
## Example
The following stream will listen to ALL NFT Transfers, without the need to provide the smart contract address:
```json theme={null}
{
"tag": "anyEthNFTTransfer",
"topic0": ["Transfer(address,address,uint256)"],
"allAddresses": true,
"includeContractLogs": true,
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
],
"chainIds": ["0x1"]
}
```
# Monitor High-Value ENS Domain Registrations
Source: https://docs.moralis.com/get-started/tutorials/streams/wallet-monitoring/monitor-high-value-ens-domain-registrations
Learn how to monitor ENS domain registrations that cost higher than 1 ETH using the Moralis Streams API.
Learn how to monitor ENS domain registrations that cost higher than 1 ETH using the Moralis Streams API.
## Programmatically
**JavaScript:**
```javascript theme={null}
const ensNameRegisteredAbi = [{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string",
},
{
"indexed": true,
"internalType": "bytes32",
"name": "label",
"type": "bytes32",
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address",
},
{
"indexed": false,
"internalType": "uint256",
"name": "cost",
"type": "uint256",
},
{
"indexed": false,
"internalType": "uint256",
"name": "expires",
"type": "uint256",
},
],
"name": "NameRegistered",
"type": "event",
}]; // valid abi of the event
const filter = {
"and": [
{ "eq": ["owner", "0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5"] },
{ "gt": ["cost", "1000000000000000000"] },
],
}; // only receive registration events if the owner is the address and the cost is higher than 1 ETH
const options = {
chains: [EvmChain.ETHEREUM], // Ethereum Name Service so we only monitor Ethereum
description: "ENS Name Registrations", // your description
tag: "ensRegistrationByBob", // give it a tag
abi: ensNameRegisteredAbi,
topic0: ["NameRegistered(string,bytes32,address,uint256,uint256)"],
includeContractLogs: true,
advancedOptions: [
{
topic0: "NameRegistered(string,bytes32,address,uint256,uint256)",
filter,
includeNativeTxs: true,
},
],
webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events
};
const stream = await Moralis.Streams.add(options);
const { id } = stream.toJSON(); // { id: 'YOUR_STREAM_ID', ...stream }
// Attach the contract address to the stream
await Moralis.Streams.addAddress({
id,
address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", // ENS Registry address
});
```
**Python:**
```python theme={null}
"""
Requirements: moralis python sdk
Install with: pip install moralis
"""
from moralis import streams
webhook_url = "WEB_HOOK_URL_HERE"
api_key = "API_KEY_HERE"
abi = [{
"anonymous": False,
"inputs": [
{
"indexed": False,
"internalType": "string",
"name": "name",
"type": "string",
},
{
"indexed": True,
"internalType": "bytes32",
"name": "label",
"type": "bytes32",
},
{
"indexed": True,
"internalType": "address",
"name": "owner",
"type": "address",
},
{
"indexed": False,
"internalType": "uint256",
"name": "cost",
"type": "uint256",
},
{
"indexed": False,
"internalType": "uint256",
"name": "expires",
"type": "uint256",
},
],
"name": "NameRegistered",
"type": "event",
}]
advanced_options = [
{
"topic0": "NameRegistered(string,bytes32,address,uint256,uint256)",
"filter": {
"and": [
{ "eq": ["owner", "0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5"] },
{ "gt": ["cost", "1000000000000000000"] }
]
}
}
]
body = {
"webhookUrl": webhook_url,
"description": "ENS Name Registrations",
"tag": "ensRegistrationByBob",
"topic0": ["NameRegistered(string,bytes32,address,uint256,uint256)"],
"allAddresses": False,
"includeNativeTxs": True,
"includeContractLogs": True,
"includeInternalTxs": False,
"abi": abi,
"advancedOptions": advanced_options,
"chainIds": ["0x1"],
}
result = streams.evm.create_stream(
api_key=api_key,
body=body,
)
print(result)
# Attach the contract address to the stream
params = {
"id": result["id"],
}
body = {
"address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
}
result = streams.evm.add_address_to_stream(
api_key=api_key,
params=params,
body=body,
)
print(result)
```
## Via WebUI
1. Create a new Stream
2. Fill out the form
3. Switch on Event Emittance and add the ABI, then select the topic
4. Add the following value to advanced options:
```json theme={null}
[
{
"topic0": "NameRegistered(string,bytes32,address,uint256,uint256)",
"filter": {
"and": [
{ "eq": ["owner", "0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5"] },
{ "gt": ["cost", "1000000000000000000"] }
]
}
}
]
```
5. Click on the create stream button.
# Monitor Multiple Addresses
Source: https://docs.moralis.com/get-started/tutorials/streams/wallet-monitoring/monitor-multiple-addresses
Learn best practices for handling multiple addresses in your streams.
You do not have to create a separate stream for each address. Instead, you can attach multiple addresses to the same stream. The best practice is to create as few streams as possible and instead attach addresses to existing streams whenever it makes sense. You can attach any number of addresses to a stream.
If you need more streams, update to a paid plan or contact support ([hello@moralis.io](mailto:hello@moralis.io)) if you are already a paying client.
If you want to add multiple addresses to another stream, you can always attach them to an existing stream.
### Attaching multiple addresses to a stream
```javascript theme={null}
// Add addresses
await Moralis.Streams.addAddress({
id: streamId,
address: [
"0xCFDF6Aaae9f6B927E3736FBD327853B622c5060E",
"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
], // Can also be a single string
});
```
### Delete an address from a stream
```javascript theme={null}
// Delete an address
await Moralis.Streams.deleteAddress({
id,
address,
});
```
### Get all addresses from a stream
```javascript theme={null}
// Get all addresses
await Moralis.Streams.getAddresses({
id,
limit,
});
```
# How to Monitor Wallet Activity in Real Time
Source: https://docs.moralis.com/get-started/tutorials/streams/wallet-monitoring/monitor-wallet-activity-in-real-time
Learn how to monitor wallet transactions in real time using the Moralis Streams API, including setting up webhook listeners for on-chain activity.
The [Streams API](https://moralis.io/streams/) enables you to stream real-time blockchain data to your application through webhooks. This tutorial focuses on monitoring wallet transactions as they happen on-chain.
Common use cases include:
* Web3 alerts (e.g. whale alerts monitoring)
* Real-time transaction and crypto wallet notifications
* Monitoring wallet balances
## Prerequisites
* A [Moralis account](https://admin.moralis.io) with an API key
* Node.js or Python installed
* A webhook URL (you can use [https://webhook.site](https://webhook.site) for testing)
## Step 1: Install the Moralis SDK
Install the Moralis SDK for your preferred language:
```bash npm theme={null}
npm install moralis @moralisweb3/common-evm-utils
```
```bash yarn theme={null}
yarn add moralis @moralisweb3/common-evm-utils
```
```bash pip theme={null}
pip install moralis
```
## Step 2: Create a Stream to Monitor Wallet Transactions
Once you have your API key and webhook URL, set up a stream to monitor on-chain wallet transactions. In this example, we will monitor the address `0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4`.
**JavaScript:**
```javascript index.js theme={null}
const Moralis = require("moralis").default;
const { EvmChain } = require("@moralisweb3/common-evm-utils");
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const stream = {
chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],
description: "monitor Bobs wallet",
tag: "bob",
webhookUrl: "https://YOUR_WEBHOOK_URL",
includeNativeTxs: true,
};
const newStream = await Moralis.Streams.add(stream);
const { id } = newStream.toJSON();
// Now we attach bobs address to the stream
const address = "0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4";
await Moralis.Streams.addAddress({ address, id });
};
runApp();
```
**TypeScript:**
```typescript index.ts theme={null}
import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const stream = {
chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],
description: "monitor Bobs wallet",
tag: "bob",
webhookUrl: "https://YOUR_WEBHOOK_URL",
includeNativeTxs: true,
};
const newStream = await Moralis.Streams.add(stream);
const { id } = newStream.toJSON();
// Now we attach bobs address to the stream
const address = "0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4";
await Moralis.Streams.addAddress({ address, id });
};
runApp();
```
**Python:**
```python index.py theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
create_stream_body = {
"description": "monitor Bobs wallet",
"tag": "bob",
"webhook_url": "https://YOUR_WEBHOOK_URL",
"include_native_txs": True,
"chain_ids": [
"0x1",
"0x89"
]
}
result = streams.evm_streams.create_stream(
api_key=api_key,
body=create_stream_body,
)
add_address_body = {
"address": "0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4"
}
params = {
"id": result.id
}
# Now we attach bobs address to the stream
streams.evm_streams.add_address_to_stream(
api_key=api_key,
body=add_address_body,
params=params,
)
```
Once the code has been added, run the script to create the stream. This will be reflected on your Moralis Dashboard as well. From here, you will receive new real-time responses on your attached webhook for any new transactions occurring on either Ethereum or Polygon.
## Step 3: Listen to Smart Contract Events
In addition to monitoring wallet transactions in real-time, you can use Streams to listen to smart contract events whenever they are emitted on the blockchain.
For example, to listen to all ERC20 transfers for [USDT](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7):
**JavaScript:**
```javascript index.js theme={null}
const Moralis = require("moralis").default;
const { EvmChain } = require("@moralisweb3/common-evm-utils");
const ERC20_transfer_ABI = [
{
anonymous: false,
inputs: [
{ indexed: true, name: "from", type: "address" },
{ indexed: true, name: "to", type: "address" },
{ indexed: false, name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
];
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const stream = {
chains: [EvmChain.ETHEREUM],
description: "monitor USDT transfers",
tag: "USDT",
webhookUrl: "https://YOUR_WEBHOOK_URL",
abi: ERC20_transfer_ABI,
includeContractLogs: true,
topic0: ["Transfer(address,address,uint256)"],
};
const newStream = await Moralis.Streams.add(stream);
const { id } = newStream.toJSON();
// Now we attach USDT address to the stream
const address = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
await Moralis.Streams.addAddress({ address, id });
};
runApp();
```
**Python:**
```python index.py theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
ERC20_transfer_ABI = [{
"anonymous": False,
"inputs": [
{ "indexed": True, "name": "from", "type": "address" },
{ "indexed": True, "name": "to", "type": "address" },
{ "indexed": False, "name": "value", "type": "uint256" },
],
"name": "Transfer",
"type": "event",
}]
create_stream_body = {
"description": "monitor USDT transfers",
"tag": "USDT",
"webhook_url": "https://YOUR_WEBHOOK_URL",
"include_contract_logs": True,
"chain_ids": [
"0x1"
],
"abi": ERC20_transfer_ABI,
"topic0": ["Transfer(address,address,uint256)"]
}
result = streams.evm_streams.create_stream(
api_key=api_key,
body=create_stream_body,
)
add_address_body = {
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
}
params = {
"id": result.id
}
# Now we attach USDT address to the stream
streams.evm_streams.add_address_to_stream(
api_key=api_key,
body=add_address_body,
params=params,
)
```
## Step 4: Add Filters for Specific Use Cases
For listening to smart contracts, you can add the [Filters feature](/streams/streams-concepts/filters) to filter out results that only fulfill certain criteria. This is useful for specific use cases such as whale monitoring.
For example, to monitor all USDT transactions on Ethereum over \$1M:
**JavaScript:**
```javascript index.js theme={null}
const filter_ERC20 = {
"and": [
{ "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] },
{ "gt": ["value", "1000000000"] }, // Example of USDT (6 Decimals)
],
};
const runApp = async () => {
const stream = {
// same parameters as prior
advancedOptions: [
{
topic0: "Transfer(address,address,uint256)",
filter: filter_ERC20
},
]
};
const newStream = await Moralis.Streams.add(stream);
const { id } = newStream.toJSON();
// Now we attach USDT address to the stream
const address = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
await Moralis.Streams.addAddress({ address, id });
};
runApp();
```
**Python:**
```python index.py theme={null}
filter_ERC20 = {
"and": [
{ "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] },
{ "gt": ["value", "1000000000"] }, # Example of USDT (6 Decimals)
],
}
create_stream_body = {
# same parameters as prior
"advanced_options": [
{
"topic0": "Transfer(address,address,uint256)",
"filter": filter_ERC20
}
]
}
result = streams.evm_streams.create_stream(
api_key=api_key,
body=create_stream_body,
)
add_address_body = {
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
}
params = {
"id": result.id
}
# Now we attach USDT address to the stream
streams.evm_streams.add_address_to_stream(
api_key=api_key,
body=add_address_body,
params=params,
)
```
Once modified, you will only receive USDT transfers on Ethereum over \$1M in real-time on your webhooks.
# Overview
Source: https://docs.moralis.com/index
One platform for real-time blockchain data - APIs, streams, datasets and enterprise indexing powering wallets, compliance, AI, and next-gen finance.
## Moralis Data Platform
Moralis is an onchain data platform that provides a complete, production-grade data layer for Web3
It enables teams to fetch, monitor, index, and export blockchain data across 30+ supported chains - without running RPCs, DIY indexers, or custom infrastructure.
The platform is built for scale, low latency, and reliability, and is used by both startups and enterprises to power wallets, analytics, automation, and data pipelines.
Fetch Crypto Data
Monitor Crypto Data
Export Crypto Data
Index Crypto Data
### Data API
The [Data API](/data-api/index) provides a **single**, **consistent interface** for accessing decoded and enriched onchain data across EVM and Solana chains.
It delivers **low-latency**, **high-throughput APIs** for wallets, tokens, NFTs, prices, DeFi, and raw blockchain data, allowing teams to build multi-chain applications from a single backend.
**Best for:** powering user-facing applications, dashboards, and backend services that need fast, reliable onchain reads.
### Streams
[Streams](/streams/index) enables **real-time access to onchain events** through webhooks, allowing applications to react instantly without polling the blockchain.
Teams can subscribe to wallet activity, transfers, contract events, or custom triggers and receive events as they happen onchain.
**Best for:** notifications, automation, monitoring, and event-driven workflows.
### Datashare
[Datashare](/datashare/index) provides access to **large-scale historical and ongoing onchain datasets**, delivered directly into cloud storage or data warehouses.
It is designed for analytics, machine learning, compliance, and reporting workflows, exporting **normalized**, **decoded**, **cross-chain data** in formats optimized for data pipelines.
**Best for:** analytics, BI, AI/ML training, compliance, and batch data processing.
### Data Indexer
The [Data Indexer](/data-indexer/index) is a managed, enterprise-grade indexing solution for building **custom onchain data pipelines**.
It combines historical backfills with real-time indexing, supports **custom schemas**, and delivers indexed data directly into your infrastructure - giving teams full control without the operational burden of running indexers in-house.
**Best for:** custom data models, internal analytics systems, and enterprise workloads requiring tailored onchain data.
## How the platform fits together
* **Data API →** Read onchain data on demand with low latency
* **Streams →** React to onchain events in real time
* **Datashare →** Export and analyze onchain data at scale
* **Data Indexer →** Build custom, controlled onchain data pipelines
Together, these products form Moralis’ **onchain data layer**, enabling teams to build, scale, and operate Web3 products on a single platform
## Product comparison
| Product | Primary purpose | Access pattern | Data type | Best suited for |
| ----------------------------------- | --------------------------- | ---------------------------- | --------------------------------- | -------------------------------------- |
| [Data API](/data-api/index) | Read onchain data | On-demand (request/response) | Decoded, enriched blockchain data | Apps, dashboards, backend services |
| [Streams](/streams/index) | React to onchain events | Real-time webhooks | Live wallet & contract events | Notifications, automation, monitoring |
| [Datashare](/datashare/index) | Analyze data at scale | Batch & scheduled exports | Large-scale historical datasets | Analytics, BI, AI/ML, compliance |
| [Data Indexer](/data-indexer/index) | Build custom data pipelines | Continuous indexing | Custom-structured onchain data | Enterprise systems, internal analytics |
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/arbitrum/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/arbitrum/overview
Explore Arbitrum JSON-RPC methods
## Introduction
Arbitrum is a Layer 2 scaling solution for Ethereum that leverages optimistic rollups to improve transaction speed and reduce fees. By bundling multiple transactions together and posting them on the Ethereum main chain, Arbitrum significantly enhances the throughput while retaining the security of Ethereum. Arbitrum is ideal for decentralized finance (DeFi) applications and developers seeking fast and affordable Ethereum-compatible solutions.
## Supported Networks
The Arbitrum RPC API is available for the following networks:
1. **Arbitrum Mainnet**
2. **Arbitrum Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :------------------- | :--------------- | :----------------- |
| **Arbitrum Mainnet** | 0xa4b1 (42161) | `arbitrum` |
| **Arbitrum Sepolia** | 0x66eee (421614) | `arbitrum-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/arbitrum/eth-blockNumber)
* [eth\_call](/rpc-nodes/arbitrum/eth-call)
* [eth\_chainId](/rpc-nodes/arbitrum/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/arbitrum/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/arbitrum/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/arbitrum/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/arbitrum/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/arbitrum/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/arbitrum/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/arbitrum/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/arbitrum/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/arbitrum/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/arbitrum/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/arbitrum/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/arbitrum/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/arbitrum/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/arbitrum/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/arbitrum/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/arbitrum/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/arbitrum/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/arbitrum/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/arbitrum/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/arbitrum/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/arbitrum/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/arbitrum/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/arbitrum/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/arbitrum/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/avalanche/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/avalanche/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/avalanche/overview
Explore Avalanche JSON-RPC methods
## Introduction
Avalanche is an open-source platform for launching decentralized applications (dApps) and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Known for its high throughput, low latency, and security, Avalanche achieves near-instant finality and offers compatibility with the Ethereum Virtual Machine (EVM). It is widely used for decentralized finance (DeFi), NFTs, and gaming applications.
## Supported Networks
The Avalanche RPC API is available for the following network:
1. **Avalanche Mainnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :-------------------- | :------------- | :----------------- |
| **Avalanche Mainnet** | 0xa86a (43114) | `avalanche` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/avalanche/eth-blockNumber)
* [eth\_call](/rpc-nodes/avalanche/eth-call)
* [eth\_chainId](/rpc-nodes/avalanche/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/avalanche/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/avalanche/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/avalanche/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/avalanche/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/avalanche/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/avalanche/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/avalanche/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/avalanche/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/avalanche/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/avalanche/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/avalanche/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/avalanche/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/avalanche/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/avalanche/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/avalanche/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/avalanche/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/avalanche/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/avalanche/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/avalanche/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/avalanche/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/avalanche/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/avalanche/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/avalanche/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/avalanche/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/base/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/base/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/base/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/base/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/base/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/base/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/base/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/base/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/base/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/base/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/base/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/base/overview
Explore Base JSON-RPC methods
## Introduction
Base is an Ethereum Layer 2 (L2) network that offers high-speed, low-cost transactions with the security of Ethereum. It leverages the Optimism rollup technology to process transactions off-chain, reducing fees and improving throughput. Base is designed to bring the power of Ethereum to more developers and users, enabling a more scalable decentralized finance (DeFi) ecosystem, NFTs, and other dApps.
## Supported Networks
The Base RPC API is available for the following networks:
1. **Base Mainnet**
2. **Base Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :--------------- | :-------------- | :----------------- |
| **Base Mainnet** | 0x2105 (8453) | `base` |
| **Base Sepolia** | 0x14a34 (84532) | `base-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/base/eth-blockNumber)
* [eth\_call](/rpc-nodes/base/eth-call)
* [eth\_chainId](/rpc-nodes/base/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/base/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/base/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/base/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/base/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/base/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/base/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/base/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/base/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/base/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/base/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/base/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/base/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/base/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/base/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/base/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/base/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/base/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/base/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/base/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/base/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/base/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/base/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/base/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/base/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/blast/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/blast/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/blast/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/blast/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/blast/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/blast/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/blast/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/blast/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/blast/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/blast/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/blast/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/blast/overview
Explore Blast JSON-RPC methods
## Introduction
Blast is a high-performance blockchain network designed for scalable decentralized applications (dApps) and digital assets. With its robust infrastructure, Blast aims to offer fast finality, low transaction fees, and high throughput, making it ideal for developers building decentralized finance (DeFi) applications, gaming platforms, and NFTs. Its architecture ensures seamless compatibility with Ethereum, offering developers an easy path to migrate or build on Blast.
## Supported Networks
The Blast RPC API is available for the following networks:
1. **Blast Mainnet**
2. **Blast Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :---------------- | :-------------------- | :----------------- |
| **Blast Mainnet** | 0x13e31 (81457) | `blast` |
| **Blast Sepolia** | 0xa0c71fd (168587773) | `blast-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/blast/eth-blockNumber)
* [eth\_call](/rpc-nodes/blast/eth-call)
* [eth\_chainId](/rpc-nodes/blast/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/blast/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/blast/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/blast/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/blast/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/blast/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/blast/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/blast/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/blast/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/blast/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/blast/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/blast/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/blast/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/blast/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/blast/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/blast/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/blast/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/blast/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/blast/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/blast/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/blast/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/blast/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/blast/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/blast/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/blast/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/bsc/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/bsc/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/bsc/overview
Explore BNB Smart Chain JSON-RPC methods
## Introduction
Binance Smart Chain (BSC) is a blockchain network built for running smart contract–based applications. BSC is compatible with the Ethereum Virtual Machine (EVM), which allows Ethereum dApps and tools to be easily ported over. The network is known for its fast transactions and low fees, making it ideal for decentralized finance (DeFi), decentralized exchanges (DEXs), and other blockchain applications.
## Supported Networks
The Binance Smart Chain RPC API is available for the following networks:
1. **Binance Smart Chain Mainnet**
2. **Binance Smart Chain Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :-------------------------- | :----------- | :----------------- |
| **BNB Smart Chain Mainnet** | 0x38 (56) | `bsc` |
| **BNB Smart Chain Testnet** | 0x61 (97) | `bsc-tesnet` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/bsc/eth-blockNumber)
* [eth\_call](/rpc-nodes/bsc/eth-call)
* [eth\_chainId](/rpc-nodes/bsc/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/bsc/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/bsc/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/bsc/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/bsc/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/bsc/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/bsc/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/bsc/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/bsc/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/bsc/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/bsc/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/bsc/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/bsc/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/bsc/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/bsc/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/bsc/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/bsc/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/bsc/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/bsc/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/bsc/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/bsc/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/bsc/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/bsc/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/bsc/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/bsc/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/ethereum/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/eth/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/ethereum/overview
Explore Ethereum JSON-RPC methods
## Introduction
Ethereum is the pioneering smart contract platform that enables developers to build decentralized applications (dApps) on a permissionless blockchain. It supports smart contracts, decentralized finance (DeFi), and a broad array of token standards, including ERC-20 and ERC-721. Ethereum’s consensus mechanism transitioned from Proof of Work (PoW) to Proof of Stake (PoS) with the Ethereum 2.0 upgrade, making it more energy-efficient. As the largest smart contract platform by market capitalization and developer activity, Ethereum remains a leader in the blockchain space.
## Supported Networks
The Ethereum RPC API is available for the following networks:
1. **Ethereum Mainnet**
2. **Ethereum Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :------------------- | :------------------ | :----------------- |
| **Ethereum Mainnet** | 0x1 (1) | `eth` |
| **Ethereum Sepolia** | 0xaa36a7 (11155111) | `sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/ethereum/eth-blockNumber)
* [eth\_call](/rpc-nodes/ethereum/eth-call)
* [eth\_chainId](/rpc-nodes/ethereum/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/ethereum/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/ethereum/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/ethereum/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/ethereum/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/ethereum/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/ethereum/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/ethereum/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/ethereum/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/ethereum/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/ethereum/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/ethereum/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/ethereum/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/ethereum/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/ethereum/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/ethereum/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/ethereum/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/ethereum/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/ethereum/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/ethereum/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/ethereum/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/ethereum/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/ethereum/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/ethereum/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/ethereum/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/flow/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/flow/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/flow/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/flow/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/flow/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/flow/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/flow/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/flow/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/flow/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/flow/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/flow/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/flow/overview
Explore Flow JSON-RPC methods
## Introduction
Flow is a fast, decentralized, and developer-friendly blockchain designed to support the next generation of digital assets and applications. It is built to scale without sharding, providing a great developer experience and making it easier to build dApps, NFTs, and games with real-world usability. Flow enables the seamless creation of decentralized applications that prioritize security, scalability, and ease of use.
## Supported Networks
The Flow RPC API is available for the following networks:
1. **Flow Mainnet**
2. **Flow Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :--------------- | :----------- | :----------------- |
| **Flow Mainnet** | 0x2eb (747) | `flow` |
| **Flow Testnet** | 0x221 (545) | `flow-testnet` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/flow/eth-blockNumber)
* [eth\_call](/rpc-nodes/flow/eth-call)
* [eth\_chainId](/rpc-nodes/flow/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/flow/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/flow/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/flow/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/flow/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/flow/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/flow/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/flow/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/flow/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/flow/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/flow/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/flow/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/flow/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/flow/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/flow/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/flow/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/flow/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/flow/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/flow/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/flow/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/flow/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/flow/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/flow/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/flow/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/flow/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/gnosis/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/gnosis/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/gnosis/overview
Explore Gnosis JSON-RPC methods
## Introduction
Gnosis Chain is an Ethereum Layer 1 network focused on open finance and decentralized governance. It operates in conjunction with Ethereum, leveraging Ethereum’s security while providing faster and cheaper transactions. Gnosis Chain is EVM-compatible, making it easy for Ethereum developers to deploy their decentralized applications (dApps) with minimal changes. It’s widely used for governance, decentralized finance (DeFi), and DAO tooling.
## Supported Networks
The Gnosis RPC API is available for the following networks:
1. **Gnosis Mainnet**
2. **Gnosis Chiado Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :----------------- | :------------- | :----------------- |
| **Gnosis Mainnet** | 0x64 (100) | `gnosis` |
| **Gnosis Chiado** | 0x27d8 (10200) | `gnosis-testnet` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/gnosis/eth-blockNumber)
* [eth\_call](/rpc-nodes/gnosis/eth-call)
* [eth\_chainId](/rpc-nodes/gnosis/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/gnosis/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/gnosis/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/gnosis/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/gnosis/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/gnosis/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/gnosis/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/gnosis/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/gnosis/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/gnosis/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/gnosis/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/gnosis/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/gnosis/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/gnosis/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/gnosis/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/gnosis/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/gnosis/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/gnosis/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/gnosis/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/gnosis/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/gnosis/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/gnosis/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/gnosis/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/gnosis/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/gnosis/eth-send-raw-transaction)
# Get Your API Key
Source: https://docs.moralis.com/rpc-nodes/introduction/quickstart/get-your-api-key
Set up your Moralis RPC node and get your unique Node URL to start interacting with the blockchain.
Moralis simplifies the process of accessing blockchain data from nodes across various blockchains. This guide walks you through the steps to set up your Moralis RPC node.
## Step 1: Create a Moralis Account
Sign up for a free account at the [Moralis Dashboard](https://admin.moralis.com/).
## Step 2: Create a New Node
After signing up, generate your unique **Node URL**:
1. Log in to the [Moralis Dashboard](https://admin.moralis.com/).
2. From the sidebar, click on the **Nodes** tab.
3. Click **Create a New Node**.
4. Select the blockchain network you want to connect to (e.g., Ethereum, BNB Chain, Polygon) and choose **mainnet** or **testnet**.
5. Click **Create Node** to generate your node.
## Step 3: Copy Your Node URL
Once your node is created, you will be provided with two URLs — one for **Site 1** and another for **Site 2**. Both URLs include your **Node API Key**.
Copy one of these URLs. This is your unique **Node URL**, which you will use to interact with the blockchain in your application.
Keep your Node URL safe — it contains your API key, which is essential for connecting to the blockchain. Do not expose it in client-side code or public repositories.
## Next Steps
You are now ready to start making RPC calls using your node.
* [Make Your First Request](/rpc-nodes/introduction/quickstart/make-your-first-request) — Learn how to make your first JSON-RPC call.
* [Supported Chains](/rpc-nodes/supported-chains) — See which blockchains are available.
* [Pricing](/rpc-nodes/pricing) — Understand compute unit costs and rate limits.
# Make Your First Request
Source: https://docs.moralis.com/rpc-nodes/introduction/quickstart/make-your-first-request
Learn how to make your first JSON-RPC call using your Moralis Node URL to interact with the blockchain.
In this guide, you will make your first JSON-RPC call using your Moralis Node URL. We'll use `ethers.js` to query the Ethereum blockchain, but you can use any JSON-RPC compatible library.
## Prerequisites
* **Node.js** installed on your machine.
* A **Moralis Node URL**. If you haven't created one yet, see [Get Your API Key](/rpc-nodes/introduction/quickstart/get-your-api-key).
## Step 1: Install Dependencies
Create a new project and install the required packages:
```bash theme={null}
mkdir my-rpc-project
cd my-rpc-project
npm init -y
npm install ethers dotenv
```
## Step 2: Set Up Environment Variables
Create a `.env` file in your project root and add your Moralis Node URL:
```bash theme={null}
MORALIS_NODE_URL=YOUR_URL_FROM_DASHBOARD
```
## Step 3: Write the Code
Create a file called `index.js`:
```javascript theme={null}
require("dotenv").config();
const { ethers } = require("ethers");
async function main() {
const provider = new ethers.JsonRpcProvider(process.env.MORALIS_NODE_URL);
// Get the latest block number
const blockNumber = await provider.getBlockNumber();
console.log("Latest block:", blockNumber);
// Get the balance of an address
const balance = await provider.getBalance(
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
);
console.log("Balance:", ethers.formatEther(balance), "ETH");
}
main();
```
```bash theme={null}
curl -X POST YOUR_MORALIS_NODE_URL \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
```
```python theme={null}
import os
import json
import requests
from dotenv import load_dotenv
load_dotenv()
node_url = os.getenv("MORALIS_NODE_URL")
payload = {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1,
}
response = requests.post(node_url, json=payload)
result = response.json()
print("Latest block:", int(result["result"], 16))
```
## Step 4: Run the Script
```bash theme={null}
node index.js
```
You should see output like:
```
Latest block: 19234567
Balance: 1.234 ETH
```
## Using Extended RPC Methods
Moralis provides extended RPC methods that offer richer data beyond standard JSON-RPC. These methods map to Moralis API endpoints:
| Method | Description |
| ---------------------------- | ----------------------------------------- |
| `eth_getTransactions` | Get native transactions by wallet address |
| `eth_getDecodedTransactions` | Get decoded wallet history |
| `eth_getTokenBalances` | Get ERC20 token balances by wallet |
| `eth_getTokenPrice` | Get ERC20 token price |
| `eth_getTokenMetadata` | Get ERC20 token metadata |
| `eth_getNFTBalances` | Get NFTs by wallet address |
| `eth_getNFTCollections` | Get NFT collections by wallet |
Extended RPC methods have higher compute unit costs than standard methods. See [Pricing](/rpc-nodes/pricing) for details.
## Next Steps
* [Pricing](/rpc-nodes/pricing) — Understand compute unit costs for each RPC method.
* [Batch Requests](/rpc-nodes/introduction/resources/rpc-batch-requests) — Combine multiple requests into a single API call.
* [Rate Limits](/rpc-nodes/introduction/resources/rpc-rate-limits) — Learn about throughput limits per plan.
# Archive Requests
Source: https://docs.moralis.com/rpc-nodes/introduction/resources/archive-requests
Understand the difference between full nodes and archive nodes for historical data access
## What Are Archive Requests?
Archive requests are RPC calls that query historical blockchain state beyond what a standard full node retains. They allow you to access data from any point in the blockchain's history.
## Full Nodes vs Archive Nodes
| Feature | Full Node | Archive Node |
| ---------------- | ---------------------- | ------------ |
| Recent State | Yes | Yes |
| Historical State | Limited (\~128 blocks) | Complete |
| Storage Required | \~1 TB | \~15+ TB |
| Query Any Block | No | Yes |
## When You Need Archive Access
You need an archive node when:
* Querying balances at historical block numbers
* Reading contract storage from past blocks
* Analyzing historical state for analytics
* Debugging past transactions with state context
## Archive-Dependent Methods
These methods require archive access when querying historical blocks:
| Method | Archive Required When |
| ------------------ | ------------------------------- |
| `eth_getBalance` | Block parameter is not `latest` |
| `eth_getCode` | Block parameter is not `latest` |
| `eth_getStorageAt` | Block parameter is not `latest` |
| `eth_call` | Block parameter is not `latest` |
### Example
```json theme={null}
// This requires archive access (historical block)
{
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "0xF4240"]
}
// This works on full nodes (latest block)
{
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"]
}
```
## Archive Support on Moralis
Moralis RPC Nodes include archive access on all plans. You can query any historical block without additional configuration.
## Best Practices
* Use `latest` when you don't need historical data
* Cache historical queries when possible (they're immutable)
* Be aware archive queries may have slightly higher latency
# JSON-RPC Overview
Source: https://docs.moralis.com/rpc-nodes/introduction/resources/json-rpc-overview
Learn about JSON-RPC, the protocol used for blockchain communication
## What is JSON-RPC?
JSON-RPC is a lightweight, remote procedure call (RPC) protocol that uses JSON to encode messages. It enables applications to invoke methods on remote systems as if they were local.
## Key Characteristics
* **Protocol-Agnostic** - Works over HTTP, WebSocket, and other transports
* **Stateless** - Each request is independent
* **Lightweight** - JSON formatting minimizes overhead while remaining human-readable
## Request Structure
A JSON-RPC request contains:
| Field | Description |
| --------- | ----------------------------------- |
| `jsonrpc` | Protocol version (always "2.0") |
| `method` | Name of the method to call |
| `params` | Method parameters (array or object) |
| `id` | Unique request identifier |
### Example Request
```json theme={null}
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"],
"id": 1
}
```
## Response Structure
| Field | Description |
| --------- | ----------------------------- |
| `jsonrpc` | Protocol version |
| `result` | Method result (if successful) |
| `error` | Error object (if failed) |
| `id` | Matching request identifier |
### Example Response
```json theme={null}
{
"jsonrpc": "2.0",
"result": "0x1234567890abcdef",
"id": 1
}
```
## Common Methods
| Method | Description |
| -------------------------- | --------------------------------- |
| `eth_blockNumber` | Get the latest block number |
| `eth_getBalance` | Get account balance |
| `eth_getTransactionByHash` | Get transaction details |
| `eth_sendRawTransaction` | Submit a signed transaction |
| `eth_call` | Execute a read-only contract call |
| `eth_getLogs` | Get event logs |
## Use Cases
* **Wallets** - Query balances and submit transactions
* **dApps** - Interact with smart contracts
* **Indexers** - Fetch and process blockchain data
* **Trading Bots** - Monitor state and execute trades
# RPC Batch Requests
Source: https://docs.moralis.com/rpc-nodes/introduction/resources/rpc-batch-requests
Combine multiple RPC requests into a single API call for better performance
## What is Batching?
Batching combines multiple RPC requests into a single HTTP call, reducing network overhead and improving performance when you need to make several related queries.
## Benefits
* **Reduced Latency** - Single round-trip instead of multiple
* **Fewer Connections** - One HTTP request instead of many
* **Simpler Code** - Handle related operations together
## Request Format
Send an array of JSON-RPC request objects:
```json theme={null}
[
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
},
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"],
"id": 2
},
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 3
}
]
```
## Response Format
Responses are returned as an array in the same order:
```json theme={null}
[
{
"jsonrpc": "2.0",
"result": "0x10d4f",
"id": 1
},
{
"jsonrpc": "2.0",
"result": "0x1234567890abcdef",
"id": 2
},
{
"jsonrpc": "2.0",
"result": "0x3b9aca00",
"id": 3
}
]
```
## Limits
| Constraint | Value |
| ---------------------- | ----- |
| Max requests per batch | 20 |
## Important: Compute Units
Batching does **not** reduce Compute Unit (CU) consumption. Each request in the batch uses the same CUs as individual requests. Batching optimizes network efficiency, not billing.
## Best Practices
* Use unique `id` values to match responses
* Handle partial failures (some requests may succeed while others fail)
* Group related operations together
* Keep batches under the 20 request limit
# RPC Rate Limits
Source: https://docs.moralis.com/rpc-nodes/introduction/resources/rpc-rate-limits
Understand rate limits and Compute Units for Moralis RPC Nodes
## Overview
Moralis uses Compute Units (CUs) to track API usage. Rate limits ensure fair usage and system stability across all users.
## Rate Limits by Plan
| Plan | CUs Included | API Throughput | Node Throughput | Nodes |
| ---------- | ------------ | -------------- | --------------- | --------- |
| Starter | 10M | 1,500 CU/s | 100 CU/s | 2 |
| Pro | 100M | 1,500 CU/s | 100 CU/s | 5 |
| Business | 350M | 3,000 CU/s | 300 CU/s | Unlimited |
| Enterprise | Custom | Custom | Custom | Unlimited |
All plans include archive request support.
## Understanding Throughput
* **API Throughput** - Maximum CUs per second across all your requests
* **Node Throughput** - Maximum CUs per second per individual node
* **Nodes** - Number of dedicated node endpoints available
## Avoiding Rate Limits
To stay within limits:
1. Monitor your CU consumption in the dashboard
2. Keep total CU/s below your plan's throughput
3. Implement exponential backoff for retries
4. Cache responses when possible
5. Use batch requests to reduce HTTP overhead (not CU cost)
## Rate Limit Response
When rate limited, you'll receive an HTTP 429 response:
```json theme={null}
{
"jsonrpc": "2.0",
"error": {
"code": -32005,
"message": "Rate limit exceeded"
},
"id": 1
}
```
## Need Higher Limits?
Contact Moralis for Enterprise plans with custom limits tailored to your needs.
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/linea/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/linea/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/linea/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/linea/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/linea/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/linea/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/linea/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/linea/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/linea/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/linea/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/linea/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/linea/overview
Explore Linea JSON-RPC methods
## Introduction
Linea is a high-performance Layer 2 solution for Ethereum, designed to provide low-cost and fast transactions while maintaining Ethereum’s security through zk-rollups. Linea’s architecture allows for greater scalability, enabling decentralized applications (dApps) to process more transactions at lower costs, making it ideal for decentralized finance (DeFi), gaming, and NFT ecosystems.
## Supported Networks
The Linea RPC API is available for the following networks:
1. **Linea Mainnet**
2. **Linea Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :---------------- | :------------- | :----------------- |
| **Linea Mainnet** | 0xe708 (59144) | `linea` |
| **Linea Sepolia** | 0xe705 (59141) | `linea-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/linea/eth-blockNumber)
* [eth\_call](/rpc-nodes/linea/eth-call)
* [eth\_chainId](/rpc-nodes/linea/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/linea/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/linea/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/linea/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/linea/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/linea/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/linea/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/linea/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/linea/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/linea/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/linea/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/linea/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/linea/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/linea/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/linea/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/linea/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/linea/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/linea/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/linea/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/linea/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/linea/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/linea/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/linea/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/linea/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/linea/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/lisk/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/lisk/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/lisk/overview
Explore Lisk JSON-RPC methods
## Introduction
Lisk is pioneering a transformative journey by integrating with the Ethereum ecosystem as a Layer-2 (L2) solution. Focused on bringing real-world assets (RWA), off-chain assets (OCA), and decentralized physical infrastructure networks (DePIN) onchain, Lisk empowers developers with a robust, scalable platform designed to enhance the Ethereum network. By leveraging Lisk's L2 architecture, developers can build dApps that bridge the gap between traditional systems and the decentralized future.
## Supported Networks
The Lisk RPC API is available for the following networks:
1. **Lisk Mainnet**
2. **Lisk Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :--------------- | :------------ | :----------------- |
| **Lisk Mainnet** | 0x46f (1135) | `lisk` |
| **Lisk Sepolia** | 0x106a (4202) | `lisk-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/lisk/eth-blockNumber)
* [eth\_call](/rpc-nodes/lisk/eth-call)
* [eth\_chainId](/rpc-nodes/lisk/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/lisk/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/lisk/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/lisk/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/lisk/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/lisk/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/lisk/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/lisk/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/lisk/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/lisk/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/lisk/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/lisk/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/lisk/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/lisk/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/lisk/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/lisk/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/lisk/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/lisk/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/lisk/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/lisk/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/lisk/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/lisk/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/lisk/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/lisk/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/lisk/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/mantle/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/mantle/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/mantle/overview
Explore Mantle JSON-RPC methods
## Introduction
Mantle is a high-performance, scalable Layer 2 blockchain built on Ethereum. By leveraging rollup technology, Mantle provides developers and users with faster and cheaper transactions while maintaining the security of Ethereum. Mantle is ideal for decentralized finance (DeFi), NFTs, and other decentralized applications (dApps) that require low-latency, high-throughput transaction processing.
## Supported Networks
The Mantle RPC API is available for the following networks:
1. **Mantle Mainnet**
2. **Mantle Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :----------------- | :------------ | :----------------- |
| **Mantle Mainnet** | 0x1388 (5000) | `mantle` |
| **Mantle Sepolia** | 0x138b (5003) | `mantle-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/mantle/eth-blockNumber)
* [eth\_call](/rpc-nodes/mantle/eth-call)
* [eth\_chainId](/rpc-nodes/mantle/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/mantle/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/mantle/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/mantle/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/mantle/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/mantle/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/mantle/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/mantle/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/mantle/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/mantle/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/mantle/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/mantle/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/mantle/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/mantle/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/mantle/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/mantle/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/mantle/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/mantle/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/mantle/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/mantle/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/mantle/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/mantle/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/mantle/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/mantle/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/mantle/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/moonbeam/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/moonbeam/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/moonbeam/overview
Explore Moonbeam JSON-RPC methods
## Introduction
Moonbeam is a smart contract platform that makes it easy to build native interoperable applications. It is fully Ethereum-compatible, allowing Ethereum developers to use their existing tools and deploy decentralized applications (dApps) with minimal changes. Moonbeam focuses on providing an Ethereum-like environment on Polkadot, ensuring scalability and low transaction costs while maintaining interoperability with other blockchains.
## **Supported Networks**
The Moonbeam RPC API is available for the following networks:
1. **Moonbeam**
2. **Moonriver**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :------------ | :----------- | :----------------- |
| **Moonbeam** | 0x504 (1284) | `moonbeam` |
| **Moonriver** | 0x505 (1285) | `moonriver` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/moonbeam/eth-blockNumber)
* [eth\_call](/rpc-nodes/moonbeam/eth-call)
* [eth\_chainId](/rpc-nodes/moonbeam/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/moonbeam/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/moonbeam/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/moonbeam/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/moonbeam/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/moonbeam/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/moonbeam/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/moonbeam/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/moonbeam/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/moonbeam/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/moonbeam/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/moonbeam/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/moonbeam/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/moonbeam/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/moonbeam/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/moonbeam/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/moonbeam/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/moonbeam/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/moonbeam/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/moonbeam/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/moonbeam/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/moonbeam/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/moonbeam/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/moonbeam/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/moonbeam/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/opbnb/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/opbnb/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/opbnb/overview
Explore opBNB JSON-RPC methods
## Introduction
opBNB is a Layer 2 scaling solution built on BNB Chain, offering fast and affordable transactions while maintaining compatibility with the Ethereum Virtual Machine (EVM). This makes opBNB a great choice for decentralized applications (dApps) that prioritize performance, including DeFi and NFT ecosystems.
## Supported Networks
The opBNB RPC API is available for the following network:
1. **opBNB Mainnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :---------------- | :----------- | :----------------- |
| **opBNB Mainnet** | 0xcc (204) | `opbnb` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/opbnb/eth-blockNumber)
* [eth\_call](/rpc-nodes/opbnb/eth-call)
* [eth\_chainId](/rpc-nodes/opbnb/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/opbnb/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/opbnb/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/opbnb/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/opbnb/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/opbnb/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/opbnb/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/opbnb/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/opbnb/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/opbnb/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/opbnb/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/opbnb/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/opbnb/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/opbnb/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/opbnb/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/opbnb/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/opbnb/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/opbnb/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/opbnb/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/opbnb/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/opbnb/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/opbnb/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/opbnb/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/opbnb/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/opbnb/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/optimism/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/optimism/overview
Explore Optimism JSON-RPC methods
## Introduction
Optimism is a Layer 2 scaling solution built on Ethereum that uses optimistic rollups to bundle transactions, providing faster and cheaper transactions while retaining the security of Ethereum. Optimism focuses on scalability, low gas fees, and maintaining compatibility with the Ethereum ecosystem, making it an ideal platform for decentralized applications (dApps), decentralized finance (DeFi), and NFTs.
## Supported Networks
The Optimism RPC API is available for the following networks:
1. **Optimism Mainnet**
2. **Optimism Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :------------------- | :------------------ | :----------------- |
| **Optimism Mainnet** | 0xa (10) | `optimism` |
| **Optimism Sepolia** | 0xaa37dc (11155420) | `optimism-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/optimism/eth-blockNumber)
* [eth\_call](/rpc-nodes/optimism/eth-call)
* [eth\_chainId](/rpc-nodes/optimism/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/optimism/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/optimism/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/optimism/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/optimism/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/optimism/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/optimism/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/optimism/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/optimism/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/optimism/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/optimism/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/optimism/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/optimism/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/optimism/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/optimism/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/optimism/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/optimism/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/optimism/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/optimism/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/optimism/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/optimism/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/optimism/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/optimism/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/optimism/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/optimism/eth-send-raw-transaction)
# RPC Nodes
Source: https://docs.moralis.com/rpc-nodes/overview
Moralis Nodes give you reliable, low-latency access to blockchain networks for reading data and submitting transactions - ideal for powering wallets, dapps, indexers, bots, and custom infrastructure at scale.
## Overview
**Moralis RPC Nodes** provide reliable, low-latency access to blockchain networks for reading on-chain data and submitting transactions.
Instead of running your own nodes, Moralis handles the infrastructure so you can focus on building your application.
***
## What Are RPC Nodes?
RPC (Remote Procedure Call) nodes are your gateway to blockchain networks. They allow you to:
* **Read Data** - Query blockchain state, balances, and transactions
* **Submit Transactions** - Send signed transactions to the network
* **Subscribe to Events** - Listen for new blocks and contract events
* **Access Archives** - Query historical blockchain state
***
## Key Features
* **High Availability** - 99.9% uptime SLA
* **Low Latency** - Optimized for fast response times
* **Multi-Chain** - Support for 20+ blockchain networks
* **Archive Access** - Full historical data on supported chains
* **WebSocket Support** - Real-time subscriptions and event streaming
* **Rate Limits** - Generous limits with burst capacity
* **Global Distribution** - Edge nodes for reduced latency
***
## Supported Networks
Moralis RPC Nodes support major blockchain networks:
* **Ethereum** - Mainnet and testnets
* **Polygon** - PoS and zkEVM
* **BNB Chain** - BSC and opBNB
* **Arbitrum** - One and Nova
* **Optimism** - Mainnet
* **Base** - Mainnet
* **Avalanche** - C-Chain
* **And more** - Linea, zkSync, Blast, Mantle, and others
***
## Common Use Cases
* **Wallets**\
(query balances and submit transactions)
* **dApps**\
(interact with smart contracts)
* **Indexers**\
(fetch and process blockchain data)
* **Trading Bots**\
(monitor mempool and execute trades)
* **Analytics**\
(query historical blockchain state)
* **Backend Services**\
(reliable blockchain connectivity)
***
## Get Started
Choose a network to get started:
* [**Ethereum**](/rpc-nodes/ethereum/overview)
* [**Polygon**](/rpc-nodes/polygon/overview)
* [**BNB Chain**](/rpc-nodes/bsc/overview)
* [**Arbitrum**](/rpc-nodes/arbitrum/overview)
* [**Optimism**](/rpc-nodes/optimism/overview)
* [**Base**](/rpc-nodes/base/overview)
* [**Avalanche**](/rpc-nodes/avalanche/overview)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon-zkevm/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/polygon-zkevm/overview
Explore Polygon zkEVM JSON-RPC methods
## Introduction
Polygon zkEVM is a Layer 2 scaling solution that combines the security of Ethereum with the scalability of zero-knowledge rollups. zkEVM allows for fast and low-cost transactions while maintaining compatibility with the Ethereum Virtual Machine (EVM), making it easier for developers to deploy their existing Ethereum applications. Polygon zkEVM is ideal for decentralized finance (DeFi), NFTs, and other decentralized applications requiring high throughput.
## Supported Networks
The Polygon zkEVM RPC API is available for the following networks:
1. **Polygon zkEVM Mainnet**
2. **Polygon zkEVM Cardona Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :-------------------------------- | :----------- | :---------------------- |
| **Polygon zkEVM Mainnet** | 0x44d (1101) | `polygon-zkevm` |
| **Polygon zkEVM Cardona Testnet** | 0x98a (2442) | `polygon-zkevm-cardona` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/polygon-zkevm/eth-blockNumber)
* [eth\_call](/rpc-nodes/polygon-zkevm/eth-call)
* [eth\_chainId](/rpc-nodes/polygon-zkevm/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/polygon-zkevm/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/polygon-zkevm/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/polygon-zkevm/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/polygon-zkevm/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/polygon-zkevm/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/polygon-zkevm/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/polygon-zkevm/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/polygon-zkevm/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/polygon-zkevm/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/polygon-zkevm/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/polygon-zkevm/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/polygon-zkevm/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/polygon-zkevm/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/polygon-zkevm/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/polygon-zkevm/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/polygon-zkevm/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/polygon-zkevm/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/polygon-zkevm/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/polygon-zkevm/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/polygon-zkevm/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/polygon-zkevm/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/polygon-zkevm/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/polygon-zkevm/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/polygon-zkevm/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/polygon/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/polygon/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/polygon/overview
Explore Polygon JSON-RPC methods
## Introduction
Polygon (formerly Matic Network) is a protocol and a framework for building and connecting Ethereum-compatible blockchain networks. It offers a highly scalable, low-cost platform for decentralized applications (dApps) without sacrificing security. Polygon is known for its fast finality and low transaction fees, making it ideal for various use cases, including DeFi, NFTs, and gaming.
## Supported Networks
The Polygon RPC API is available for the following networks:
1. **Polygon Mainnet**
2. **Polygon Amoy Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :------------------ | :-------------- | :----------------- |
| **Polygon Mainnet** | 0x89 (137) | `polygon` |
| **Polygon Amoy** | 0x13882 (80002) | `amoy` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/polygon/eth-blockNumber)
* [eth\_call](/rpc-nodes/polygon/eth-call)
* [eth\_chainId](/rpc-nodes/polygon/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/polygon/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/polygon/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/polygon/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/polygon/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/polygon/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/polygon/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/polygon/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/polygon/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/polygon/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/polygon/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/polygon/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/polygon/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/polygon/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/polygon/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/polygon/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/polygon/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/polygon/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/polygon/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/polygon/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/polygon/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/polygon/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/polygon/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/polygon/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/polygon/eth-send-raw-transaction)
# Pricing
Source: https://docs.moralis.com/rpc-nodes/pricing
Understand compute unit costs, rate limits, and plan tiers for Moralis RPC Nodes.
All [Moralis plans](https://moralis.io/pricing) include generous monthly limits on the number of requests you can make. Some requests are more computationally expensive than others, so heavier requests are assigned higher **Compute Unit (CU) weights**.
## What is a Compute Unit (CU)?
A **Compute Unit** is a measure of computational load assigned to each RPC request. Each method has a **CU Weight** that is deducted from your total available CUs. Archive requests (queries to historical data) often have a higher **Archive CU Weight**.
## Plan Tiers
| | Starter | Pro | Business | Enterprise |
| ---------------------------- | ---------- | ----------- | ----------- | ---------- |
| CUs Included | 10,000,000 | 100,000,000 | 350,000,000 | Custom |
| API Throughput (CUs/second) | 1,500 | 1,500 | 3,000 | Custom |
| Node Throughput (CUs/second) | 100 | 100 | 300 | Custom |
| Number of Nodes | 2 | 5 | Unlimited | Unlimited |
| Archive Requests | Yes | Yes | Yes | Yes |
## Standard RPC Method Costs
| RPC Method | CU Weight | Archive CU Weight |
| ----------------------------------------- | --------- | ----------------- |
| `eth_blockNumber` | 3 | 3 |
| `eth_call` | 3 | 12 |
| `eth_chainId` | 3 | 3 |
| `eth_createAccessList` | 3 | 3 |
| `eth_estimateGas` | 5 | 5 |
| `eth_feeHistory` | 3 | 3 |
| `eth_gasPrice` | 3 | 3 |
| `eth_getBalance` | 3 | 12 |
| `eth_getBlockByHash` | 12 | 12 |
| `eth_getBlockByNumber` | 3 | 12 |
| `eth_getBlockTransactionCountByHash` | 12 | 12 |
| `eth_getBlockTransactionCountByNumber` | 3 | 12 |
| `eth_getBlockReceipts` | 3 | 12 |
| `eth_getCode` | 3 | 12 |
| `eth_getLogs` | 12 | 12 |
| `eth_getProof` | 3 | 12 |
| `eth_getStorageAt` | 3 | 12 |
| `eth_getTransactionByHash` | 12 | 12 |
| `eth_getTransactionByBlockHashAndIndex` | 12 | 12 |
| `eth_getTransactionByBlockNumberAndIndex` | 3 | 12 |
| `eth_getTransactionCount` | 2 | 8 |
| `eth_getTransactionReceipt` | 8 | 8 |
| `eth_getUncleByBlockHashAndIndex` | 8 | 8 |
| `eth_getUncleByBlockNumberAndIndex` | 2 | 8 |
| `eth_getUncleCountByBlockHash` | 8 | 8 |
| `eth_getUncleCountByBlockNumber` | 2 | 8 |
| `eth_maxPriorityFeePerGas` | 2 | 2 |
| `eth_sendRawTransaction` | 3 | 3 |
## Extended RPC Method Costs
Moralis provides extended RPC methods that offer advanced data retrieval. These are more computationally intensive and have higher CU weights.
| Method | Description | CU Weight |
| ---------------------------- | ----------------------------------------- | --------- |
| `eth_getTransactions` | Get native transactions by wallet address | 15 |
| `eth_getDecodedTransactions` | Get decoded wallet history | 30 |
| `eth_getTokenBalances` | Get ERC20 token balances by wallet | 25 |
| `eth_getTokenPrice` | Get ERC20 token price by token address | 25 |
| `eth_getTokenMetadata` | Get ERC20 token metadata by token address | 8 |
| `eth_getNFTBalances` | Get NFTs by wallet address | 20 |
| `eth_getNFTCollections` | Get NFT collections by wallet address | 20 |
## Archive Nodes
Archive nodes store historical blockchain data beyond the most recent blocks. Because of the additional computational and storage resources required, querying archive nodes comes with a higher CU cost. If your use case involves accessing deep historical data, be mindful of the increased cost shown in the **Archive CU Weight** column above.
## Optimizing CU Usage
* **Limit block range** — The default block range for queries is 100 blocks. Requesting larger ranges or querying archive data increases CU consumption.
* **Monitor usage** — Track your CU usage in the [Moralis Dashboard](https://admin.moralis.com/) to avoid hitting rate limits.
* **Use batch requests** — Combine multiple requests into a single API call. Note that batching does not reduce total CU cost, but it reduces HTTP overhead. Maximum batch size is 20 requests per call. See [Batch Requests](/rpc-nodes/introduction/resources/rpc-batch-requests) for details.
## Need Higher Limits?
If your use case requires more CUs than your current plan offers, consider upgrading or reaching out to the Moralis team for custom solutions at [moralis.io/pricing](https://moralis.io/pricing).
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/pulsechain/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/pulse/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/pulsechain/overview
Explore Pulsechain JSON-RPC methods
## Introduction
Pulsechain is a high-performance Ethereum-compatible blockchain designed to offer fast and cost-effective transactions. With its focus on scalability and efficiency, Pulsechain is an ideal platform for developers building decentralized applications (dApps), particularly in the DeFi and NFT spaces.
## Supported Networks
The Pulsechain RPC API is available for the following networks:
1. **Pulsechain Mainnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :--------------------- | :----------- | :----------------- |
| **Pulsechain Mainnet** | 0x171 (369) | `pulse` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/pulsechain/eth-blockNumber)
* [eth\_call](/rpc-nodes/pulsechain/eth-call)
* [eth\_chainId](/rpc-nodes/pulsechain/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/pulsechain/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/pulsechain/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/pulsechain/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/pulsechain/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/pulsechain/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/pulsechain/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/pulsechain/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/pulsechain/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/pulsechain/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/pulsechain/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/pulsechain/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/pulsechain/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/pulsechain/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/pulsechain/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/pulsechain/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/pulsechain/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/pulsechain/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/pulsechain/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/pulsechain/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/pulsechain/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/pulsechain/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/pulsechain/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/pulsechain/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/pulsechain/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/ronin/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/ronin/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/ronin/overview
Explore Ronin JSON-RPC methods
## Introduction
Ronin is a blockchain built by Sky Mavis, designed specifically to power Axie Infinity and other decentralized applications (dApps). It provides an easy-to-use experience with low fees, fast transactions, and high security, making it ideal for gaming and NFT applications.
## Supported Networks
The Ronin RPC API is available for the following networks:
1. **Ronin Mainnet**
2. **Ronin Saigon Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :---------------- | :----------- | :----------------- |
| **Ronin Mainnet** | 0x7e4 (2020) | `ronin` |
| **Gnosis Chiado** | 0x7e5 (2021) | `ronin-testnet` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/ronin/eth-blockNumber)
* [eth\_call](/rpc-nodes/ronin/eth-call)
* [eth\_chainId](/rpc-nodes/ronin/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/ronin/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/ronin/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/ronin/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/ronin/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/ronin/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/ronin/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/ronin/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/ronin/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/ronin/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/ronin/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/ronin/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/ronin/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/ronin/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/ronin/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/ronin/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/ronin/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/ronin/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/ronin/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/ronin/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/ronin/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/ronin/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/ronin/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/ronin/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/ronin/eth-send-raw-transaction)
# RPC Node Supported Chains
Source: https://docs.moralis.com/rpc-nodes/supported-chains
Blockchain networks supported by Moralis RPC nodes for direct JSON-RPC access.
### RPC Node Supported Chains
Moralis provides managed **RPC node access** for supported blockchains, enabling you to send JSON-RPC requests without operating your own infrastructure.
RPC coverage focuses on:
* Reliability
* Performance
* High-availability access to popular chains
Use the table below to see which chains are supported by Moralis RPC nodes.
| Chain Name | Type | Chain ID | RPC Supported | Path Parameter |
| --------------------------- | ------- | --------------------- | ------------- | ----------------------- |
| Ethereum Mainnet | Mainnet | 0x1 (1) | ✓ | `eth` |
| Ethereum Sepolia | Testnet | 0xaa36a7 (11155111) | ✓ | `sepolia` |
| Polygon Mainnet | Mainnet | 0x89 (137) | ✓ | `polygon` |
| Polygon Amoy | Testnet | 0x13882 (80002) | ✓ | `amoy` |
| Binance Smart Chain Mainnet | Mainnet | 0x38 (56) | ✓ | `bsc` |
| Binance Smart Chain Testnet | Testnet | 0x61 (97) | ✓ | `bsc-testnet` |
| Arbitrum | Mainnet | 0xa4b1 (42161) | ✓ | `arbitrum` |
| Arbitrum Sepolia | Testnet | 0x66eee (421614) | ✓ | `arbitrum-sepolia` |
| Base | Mainnet | 0x2105 (8453) | ✓ | `base` |
| Base Sepolia | Testnet | 0x14a34 (84532) | ✓ | `base-sepolia` |
| Optimism | Mainnet | 0xa (10) | ✓ | `optimism` |
| Optimism Sepolia | Testnet | 0xaa37dc (11155420) | ✓ | `optimism-sepolia` |
| Linea | Mainnet | 0xe708 (59144) | ✓ | `linea` |
| Linea Sepolia | Testnet | 0xe705 (59141) | ✓ | `linea-sepolia` |
| Avalanche | Mainnet | 0xa86a (43114) | ✓ | `avalanche` |
| Fantom Mainnet | Mainnet | 0xfa (250) | ✗ | N/A |
| Fantom Testnet | Testnet | 0xfa2 (4002) | ✗ | N/A |
| Cronos Mainnet | Mainnet | 0x19 (25) | ✗ | N/A |
| Gnosis | Mainnet | 0x64 (100) | ✓ | `gnosis` |
| Gnosis Chiado | Testnet | 0x27d8 (10200) | ✓ | `gnosis-testnet` |
| Chiliz Mainnet | Mainnet | 0x15b38 (88888) | ✗ | N/A |
| Chiliz Testnet | Testnet | 0x15b32 (88882) | ✗ | N/A |
| Moonbeam | Mainnet | 0x504 (1284) | ✓ | `moonbeam` |
| Moonriver | Testnet | 0x505 (1285) | ✓ | `moonriver` |
| Moonbase | Testnet | 0x507 (1287) | ✓ | `moonbase` |
| Blast | Mainnet | 0x13e31 (81457) | ✓ | `blast` |
| Blast Sepolia | Testnet | 0xa0c71fd (168587773) | ✓ | `blast-sepolia` |
| zkSync | Mainnet | 0x144 (324) | ✓ | `zksync` |
| zkSync Sepolia | Testnet | 0x12c (300) | ✓ | `zksync-sepolia` |
| Mantle | Mainnet | 0x1388 (5000) | ✓ | `mantle` |
| Mantle Sepolia | Testnet | 0x138b (5003) | ✓ | `mantle-sepolia` |
| opBNB | Mainnet | 0xcc (204) | ✓ | `opbnb` |
| Polygon zkEVM | Mainnet | 0x44d (1101) | ✓ | `polygon-zkevm` |
| Polygon zkEVM Cardona | Testnet | 0x98a (2442) | ✓ | `polygon-zkevm-cardona` |
| Zetachain | Mainnet | 0x1b58 (7000) | ✓ | `zetachain` |
| Zetachain Testnet | Testnet | 0x1b59 (7001) | ✓ | `zetachain-testnet` |
| Flow | Mainnet | 0x2eb (747) | ✓ | `flow` |
| Flow Testnet | Testnet | 0x221 (545) | ✓ | `flow-testnet` |
| Ronin | Mainnet | 0x7e4 (2020) | ✓ | `ronin` |
| Ronin Saigon Testnet | Testnet | 0x7e5 (2021) | ✓ | `ronin-testnet` |
| Lisk | Mainnet | 0x46f (1135) | ✓ | `lisk` |
| Lisk Sepolia Testnet | Testnet | 0x106a (4202) | ✓ | `lisk-sepolia` |
| Pulsechain | Mainnet | 0x171 (369) | ✓ | `pulse` |
| HyperEVM | Mainnet | 0x3e7 (999) | ✗ | N/A |
| Sei | Mainnet | 0x531 (1329) | ✗ | N/A |
| Sei Testnet | Testnet | 0x530 (1328) | ✗ | N/A |
| Monad | Mainnet | 0x8f (143) | ✗ | N/A |
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/zetachain/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zetachain/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/zetachain/overview
Explore Zetachain JSON-RPC methods
## Introduction
Zetachain is a Layer 1 blockchain designed for cross-chain interoperability, allowing developers to create decentralized applications (dApps) that interact seamlessly with multiple blockchains. By enabling direct cross-chain messaging and asset transfers, Zetachain eliminates the need for bridges and wrapped assets, providing a more secure and user-friendly solution for decentralized finance (DeFi), NFTs, and multi-chain applications.
## **Supported Networks**
The Zetachain RPC API is available for the following networks:
1. **Zetachain Mainnet**
2. **Zetachain Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :-------------------- | :------------ | :------------------ |
| **Zetachain Mainnet** | 0x1b58 (7000) | `zetachain` |
| **Zetachain Testnet** | 0x1b59 (7001) | `zetachain-testnet` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/zetachain/eth-blockNumber)
* [eth\_call](/rpc-nodes/zetachain/eth-call)
* [eth\_chainId](/rpc-nodes/zetachain/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/zetachain/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/zetachain/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/zetachain/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/zetachain/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/zetachain/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/zetachain/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/zetachain/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/zetachain/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/zetachain/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/zetachain/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/zetachain/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/zetachain/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/zetachain/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/zetachain/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/zetachain/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/zetachain/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/zetachain/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/zetachain/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/zetachain/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/zetachain/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/zetachain/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/zetachain/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/zetachain/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/zetachain/eth-send-raw-transaction)
# eth_blockNumber
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-blockNumber
Returns the number of most recent block.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
```
# eth_call
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-call
Executes a new message call immediately without creating a transaction on the blockchain.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
```
# eth_chainId
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-chain-id
Returns the chain ID of the current connected node as described in EIP-695.
#### Path parameters
Your API key for authentication
#### Request body
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_createAccessList
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-create-access-list
Creates an access list that you can include in a transaction.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Maximum fee per gas the sender is willing to pay to miners
Maximum total fee per gas the sender is willing to pay
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0x8ba1f109551bd432803012645haca66c9834d7c6", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xa9059cbb0000000000000000000000008ba1f109551bd432803012645haca66c9834d7c60000000000000000000000000000000000000000000000000de0b6b3a7640000"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
}
],
"gasUsed": "0x7671"
}
}
```
# eth_estimateGas
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-estimate-gas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
#### Path parameters
Your API key for authentication
#### Request
The address the transaction is sent from
The address the transaction is directed to
Integer of the gas provided for the transaction execution
Integer of the gasPrice used for each paid gas
Integer of the value sent with this transaction
Hash of the method signature and encoded parameters
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
{
"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
"value": "0x186a0"
},
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601", "value": "0x186a0"}, "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
```
# eth_feeHistory
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-fee-history
Returns historical gas information for a range of blocks.
#### Path parameters
Your API key for authentication
#### Request
Number of blocks in the requested range
Highest number block of the requested range
Array of percentile values to sample from each block's effective priority fees per gas
#### Example request `params`
```javascript theme={null}
[
"0x4",
"latest",
[25, 75]
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.026089875,
0.406803,
0.010817,
0.5
],
"baseFeePerBlobGas": [
"0x3319eb",
"0x350c54",
"0x364072",
"0x364072",
"0x32279d"
],
"blobGasUsedRatio": [
0.47619047619047616,
0.2857142857142857,
0,
0.3333333333333333
],
"oldestBlock": "0x11b9231",
"reward": [
["0x4a817c800", "0x4a817c800"],
["0x773593c0", "0x773593c0"],
["0x0", "0x0"],
["0x0", "0x0"]
]
}
}
```
# eth_gasPrice
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-gas-price
Returns the current price per gas in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
```
# eth_getBalance
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-balance
Returns the balance of the account of given address.
#### Path parameters
Your API key for authentication
#### Request
Address to check for balance
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
```
# eth_getBlockByHash
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-block-by-hash
Returns information about a block by hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockByNumber
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-block-by-number
Returns information about a block by block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
If true it returns the full transaction objects, if false only the hashes of the transactions
#### Example request `params`
```javascript theme={null}
[
"0x1b4",
true
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1b4", true], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x3319bb0",
"blobGasUsed": "0x120000",
"difficulty": "0x0",
"excessBlobGas": "0xa576243",
"extraData": "0xe29ca82051756173617220287175617361722e77696e2920e29ca8",
"gasLimit": "0x3938700",
"gasUsed": "0x2965eaa",
"hash": "0xc319ec0da50d354ce425b63fb6914a42aafdb9ee9807518edd595809e25fbe38",
"logsBloom": "0x7feeeb37793b4fdfff7ab7aefde2d7fdfff9575bfef5bdff3fb97bfef7bcddbbdf9d55e77fdf7ead7b98ffd9bb6fefff7e77b163bf9eeebdddd1ffbf376cfbeb7efffef83ffbe9eb7ff7776ab3dcf8bfee7ebaddfffdf7fe3fffdf6ed3f7dff77cf2fd7efffff7a19ef7ffbbe3e8befdb7fff76b6ed6e7ffceeb99ff7eeb5efebfff3fff7da1fb39f9fff3fd7f3f77b6dd0bed39f5fff3bfa7fbbce7f9f6ec6e0fff50bfe7f9f79efff35ff6d93fecfefbffdaf7b7eff35ec6ff42fe7e6f77f7deff7eff57f6aafa597feebdffff7bbd677e27ffbfadfdf57f7e7d2aeeffffff6676ffa7f3f375eb95eecf9ffa235cbfcdefafbf8feed9dc7b56ff2fdfedfefe",
"miner": "0x396343362be2a4da1ce0c1c210945346fb82aa49",
"mixHash": "0x07444bb5750f746e200e1dcd8d83221b26576d3357b833cc1e434e7966d0e774",
"nonce": "0x0000000000000000",
"number": "0x1736791",
"parentBeaconBlockRoot": "0x2759f248e2d1cb1a2f5c2657c4efcc623dd8ea7f23e8700162e7fccdacedfd5d",
"parentHash": "0xdf0e4dee910167d7b1687a6cb677983ce7ed351ae78ab7e2c5ba39d793c80391",
"receiptsRoot": "0x5f1c58e498161509245daad0f60319d9abab7f04d2ca60e99a3674cfdc9b8327",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1ef1e",
"stateRoot": "0x728c7e38107037b573d719e67b6872ee3ca4e01b47818598316cd696bfe24f2c",
"timestamp": "0x697b4bcb",
"transactions": [
"0xbf7bd0cf98c3b65525f1f7267b1d02e7ccd7cd133b137f46723a91cf187616d5",
"0x06ac9281da76d530aa19600e2c34aae7564a78702d3eb52b1fb363985473e296"
],
"transactionsRoot": "0xa8c680f6ad8ccc7a49db5ab76cbd9194c88e16dbcfa440104f7787e5ba815c4f",
"uncles": [],
"withdrawals": [
{
"index": "0x6f78bfb",
"validatorIndex": "0x955f5",
"address": "0x5d3ca1842d0988816434ea51ca420182f3f1e31a",
"amount": "0x102d2f1"
}
],
"withdrawalsRoot": "0x9b7ecf1ba575fc02e4b4c14bd65d5ca95c0e066adaae3fc2ef16f5acd90214d8"
}
}
```
# eth_getBlockReceipts
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-block-receipts
Returns all transaction receipts for a given block.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xf21d9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0xf21d9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
"blockNumber": "0xf21d9c",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x1dcd6500",
"from": "0x8ba1f109551bd432803012645haca66c9834d7c6",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x0",
"type": "0x2"
}
]
}
```
# eth_getBlockTransactionCountByHash
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-block-transaction-count-by-hash
Returns the number of transactions in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getBlockTransactionCountByNumber
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-block-transaction-count-by-number
Returns the number of transactions in a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0xe8"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["0xe8"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_getCode
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-code
Returns code at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address to get the code from
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
```
# eth_getLogs
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-logs
Returns an array of all logs matching a given filter object.
#### Path parameters
Your API key for authentication
#### Request
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
Contract address or a list of addresses from which logs should originate
Array of 32 Bytes DATA topics. Topics are order-dependent
Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
#### Example request `params`
```javascript theme={null}
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
null,
[
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
]
]
}
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"logIndex": "0x1",
"blockNumber": "0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
```
# eth_getProof
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-proof
Returns the account and storage values of the specified account including the Merkle-proof.
#### Path parameters
Your API key for authentication
#### Request
Address of the account or contract
Array of storage-keys which should be proofed and included
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
[
"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
],
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
"accountProof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
],
"balance": "0x0",
"codeHash": "0x5e61b0f7919ab4e6fc7cfa6f3f5f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
"nonce": "0x0",
"storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"value": "0x1",
"proof": [
"0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021fa0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315017e79a3de5ab2dc8bb46a59fdb37a09b3b8d0e0e4c1e3b2d3e8f7c6e5d4c3b2a1e0f9e8d7c6b5a4e3f2e1d0c9b8a7a0b1f8e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0a0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0a0d7c6b5a4e3f2e1d0c9b8a7a6f5e4d3c2b1a0f9e8d7c6b5a4e3f2e1d0c9b8a7a08080"
]
}
]
}
}
```
# eth_getStorageAt
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-storage-at
Returns the value from a storage position at a given address.
#### Path parameters
Your API key for authentication
#### Request
Address of the storage
Integer of the position in the storage
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```
# eth_getTransactionByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-transaction-by-block-hash-and-index
Returns information about a transaction by block hash and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
Integer of the transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-transaction-by-block-number-and-index
Returns information about a transaction by block number and transaction index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The transaction index position
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAE9E", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5BAE9E",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x0",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionByHash
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-transaction-by-hash
Returns the information about a transaction requested by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"v": "0x25",
"r": "0x1b5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5",
"s": "0x5e176d927f8b73e1c20c2e8d6f80c5c5e0f2e5c5e0f2e5c5e0f2e5c5e0f2e5c5"
}
}
```
# eth_getTransactionCount
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-transaction-count
Returns the number of transactions sent from an address.
#### Path parameters
Your API key for authentication
#### Request
Address to get transaction count for
Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null
#### Example request `params`
```javascript theme={null}
[
"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"latest"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getTransactionReceipt
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-transaction-receipt
Returns the receipt of a transaction by transaction hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a transaction
#### Example request `params`
```javascript theme={null}
[
"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
"transactionIndex": "0x41",
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"cumulativeGasUsed": "0x33bc",
"gasUsed": "0x4dc",
"contractAddress": null,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1"
}
}
```
# eth_getUncleByBlockHashAndIndex
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-uncle-by-block-hash-and-index
Returns information about an uncle of a block by hash and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x1b4",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleByBlockNumberAndIndex
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-uncle-by-block-number-and-index
Returns information about an uncle of a block by number and uncle index position.
#### Path parameters
Your API key for authentication
#### Request
A block number, or the string "earliest", "latest" or "pending"
The uncle's index position
#### Example request `params`
```javascript theme={null}
[
"0x29c",
"0x0"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x027f07",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x9f759",
"gasUsed": "0x9f759",
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"logsBloom": "0x1a060020000015554c000200000003050000200017041014032020801000056020000001000a00d0020204040020012150010010000000280005000c00000000000020c0000000024008104011000080020020000001006100900000024208002000020002100000000000000080000000120080000002003c0000200000000200002010008300300001001031100100040010420000800000000014000004002000000c040200060000000080000000100000000040a2000001000061000042021080400200000410000404080800014008201000c20100500020011000000030001100100024008c80190400402008000020000c0041104218100000000000000002000800000",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"mixHash": "0x99e9d85137db46ef1e85fff042bb15a7b6f46618b7f600b0b4e7fb52fceafc3a",
"nonce": "0xfcf4db6d9bce1b8b",
"number": "0x29c",
"parentHash": "0xa057c32b6ed8eb5e006cadfad55c7e635549c6e2135c4e6c3a9d5a6a80f72c3",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0x1a7e46b37b26e0c3f67ed4de3b5d3b1ff84a2e0a5e2dcf4d4b0d34b5a22b6e3",
"timestamp": "0x55ba467c",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
# eth_getUncleCountByBlockHash
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-uncle-count-by-block-hash
Returns the number of uncles in a block from a block matching the given block hash.
#### Path parameters
Your API key for authentication
#### Request
Hash of a block
#### Example request `params`
```javascript theme={null}
[
"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
# eth_getUncleCountByBlockNumber
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-get-uncle-count-by-block-number
Returns the number of uncles in a block from a block matching the given block number.
#### Path parameters
Your API key for authentication
#### Request
Integer of a block number, or the string "earliest", "latest" or "pending"
#### Example request `params`
```javascript theme={null}
[
"0x5BAE9E"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5BAE9E"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
# eth_maxPriorityFeePerGas
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-max-priority-fee-per-gas
Returns a suggestion for the max priority fee per gas for dynamic fee transactions in wei.
#### Path parameters
Your API key for authentication
#### Request
No parameters required.
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f00"
}
```
# eth_sendRawTransaction
Source: https://docs.moralis.com/rpc-nodes/zksync/eth-send-raw-transaction
Submits a pre-signed transaction for broadcast to the network.
#### Path parameters
Your API key for authentication
#### Request
The signed transaction data
#### Example request `params`
```javascript theme={null}
[
"0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"
]
```
```shellscript curl theme={null}
curl https://site1.moralis-nodes.com/zksync/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869808504e3b2928082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68"], "id": 1}'
```
```json JSON theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
# Overview
Source: https://docs.moralis.com/rpc-nodes/zksync/overview
Explore zkSync JSON-RPC methods
## Introduction
zkSync is a Layer 2 scaling solution for Ethereum that uses zero-knowledge rollups to provide low-cost, high-throughput transactions while maintaining the security of the Ethereum network. It enables developers to build scalable decentralized applications (dApps) with faster transaction finality and lower fees. zkSync’s architecture is ideal for decentralized finance (DeFi), NFTs, and other applications requiring high-speed processing.
## Supported Networks
The zkSync RPC API is available for the following networks:
1. **zkSync Mainnet**
2. **zkSync Sepolia Testnet**
## Network Details
| **Network** | **Chain ID** | **Path Parameter** |
| :----------------- | :----------- | :----------------- |
| **zkSync Mainnet** | 0x144 (324) | `zksync` |
| **zkSync Sepolia** | 0x12c (300) | `zksync-sepolia` |
## Supported RPC Methods
* [eth\_blockNumber](/rpc-nodes/zksync/eth-blockNumber)
* [eth\_call](/rpc-nodes/zksync/eth-call)
* [eth\_chainId](/rpc-nodes/zksync/eth-chain-id)
* [eth\_createAccessList](/rpc-nodes/zksync/eth-create-access-list)
* [eth\_estimateGas](/rpc-nodes/zksync/eth-estimate-gas)
* [eth\_feeHistory](/rpc-nodes/zksync/eth-fee-history)
* [eth\_gasPrice](/rpc-nodes/zksync/eth-gas-price)
* [eth\_getBalance](/rpc-nodes/zksync/eth-get-balance)
* [eth\_getBlockByHash](/rpc-nodes/zksync/eth-get-block-by-hash)
* [eth\_getBlockByNumber](/rpc-nodes/zksync/eth-get-block-by-number)
* [eth\_getBlockTransactionCountByHash](/rpc-nodes/zksync/eth-get-block-transaction-count-by-hash)
* [eth\_getBlockTransactionCountByNumber](/rpc-nodes/zksync/eth-get-block-transaction-count-by-number)
* [eth\_getBlockReceipts](/rpc-nodes/zksync/eth-get-block-receipts)
* [eth\_getCode](/rpc-nodes/zksync/eth-get-code)
* [eth\_getLogs](/streams/api-reference/history/get-logs)
* [eth\_getProof](/rpc-nodes/zksync/eth-get-proof)
* [eth\_getStorageAt](/rpc-nodes/zksync/eth-get-storage-at)
* [eth\_getTransactionByHash](/rpc-nodes/zksync/eth-get-transaction-by-hash)
* [eth\_getTransactionByBlockHashAndIndex](/rpc-nodes/zksync/eth-get-transaction-by-block-hash-and-index)
* [eth\_getTransactionByBlockNumberAndIndex](/rpc-nodes/zksync/eth-get-transaction-by-block-number-and-index)
* [eth\_getTransactionCount](/rpc-nodes/zksync/eth-get-transaction-count)
* [eth\_getTransactionReceipt](/rpc-nodes/zksync/eth-get-transaction-receipt)
* [eth\_getUncleByBlockHashAndIndex](/rpc-nodes/zksync/eth-get-uncle-by-block-hash-and-index)
* [eth\_getUncleByBlockNumberAndIndex](/rpc-nodes/zksync/eth-get-uncle-by-block-number-and-index)
* [eth\_getUncleCountByBlockHash](/rpc-nodes/zksync/eth-get-uncle-count-by-block-hash)
* [eth\_getUncleCountByBlockNumber](/rpc-nodes/zksync/eth-get-uncle-count-by-block-number)
* [eth\_maxPriorityFeePerGas](/rpc-nodes/zksync/eth-max-priority-fee-per-gas)
* [eth\_sendRawTransaction](/rpc-nodes/zksync/eth-send-raw-transaction)
# Streams Tutorials
Source: https://docs.moralis.com/streams-tutorials
Step-by-step tutorials for building real-time blockchain monitoring with Moralis Streams — wallets, tokens, NFTs, and smart contract events.
## Overview
These tutorials show you how to set up real-time blockchain event monitoring using Moralis Streams, with complete code examples for common use cases.
***
### Wallet Monitoring
Monitor wallet transactions in real time with webhooks.
Stream events for all addresses without specifying contracts.
Attach and manage multiple addresses on a single stream.
Include native token balances in webhook payloads.
Monitor high-value ENS domain registration events.
***
### Token Monitoring
Track specific ERC-20 token transfers from a list of wallets.
Monitor ERC-20 transfers over a certain amount.
Track ERC-20 token mints and burns in real time.
Track new token and DEX pair creation events.
***
### NFT Monitoring
Monitor all NFT transfers chain-wide in real time.
Filter NFT transfers from specific wallet addresses.
Monitor specific NFTs or collections by token ID.
***
### Smart Contracts & Events
Monitor all events from a contract factory in real time.
# Add Address to Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/address/add-address-to-stream
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{id}/address
# Delete Address from Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/address/delete-address-from-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/bitcoin/{id}/address
# Get Addresses by Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/address/get-addresses-by-stream
/openapi-files/streams-api/streams.yaml GET /streams/bitcoin/{id}/address
# Create Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/create-streams
/openapi-files/streams-api/streams.yaml PUT /streams/bitcoin
# Delete Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/delete-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/bitcoin/{id}
# Get Stream by ID
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/get-stream-by-id
/openapi-files/streams-api/streams.yaml GET /streams/bitcoin/{id}
# Get Streams
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/get-streams
/openapi-files/streams-api/streams.yaml GET /streams/bitcoin
# Get Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/get-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{chainId}/block/{blockNumber}
# Send Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/send-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{chainId}/block-to-webhook/{blockNumber}/{streamId}
# Update Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/update-stream
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{id}
# Update Stream Status
Source: https://docs.moralis.com/streams/api-reference/bitcoin/streams/update-stream-status
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{id}/status
# Add Xpub to Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/xpub/add-xpub
/openapi-files/streams-api/streams.yaml POST /streams/bitcoin/{id}/xpub
# Delete Xpub from Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/xpub/delete-xpub
/openapi-files/streams-api/streams.yaml DELETE /streams/bitcoin/{id}/xpub/{xpubId}
# Get Xpubs by Stream
Source: https://docs.moralis.com/streams/api-reference/bitcoin/xpub/get-xpubs
/openapi-files/streams-api/streams.yaml GET /streams/bitcoin/{id}/xpub
# Get History
Source: https://docs.moralis.com/streams/api-reference/history/get-history
/openapi-files/streams-api/streams.yaml GET /history
Get all history
# Get Logs
Source: https://docs.moralis.com/streams/api-reference/history/get-logs
/openapi-files/streams-api/streams.yaml GET /history/logs
Get All logs.
# Replay History
Source: https://docs.moralis.com/streams/api-reference/history/replay-history
/openapi-files/streams-api/streams.yaml POST /history/replay/{streamId}/{id}
Replay a specific history.
# Get Project Settings
Source: https://docs.moralis.com/streams/api-reference/project/get-project-settings
/openapi-files/streams-api/streams.yaml GET /settings
Get the settings for the current project based on the project api-key.
# Set Project Settings
Source: https://docs.moralis.com/streams/api-reference/project/set-project-settings
/openapi-files/streams-api/streams.yaml POST /settings
Set the settings for the current project based on the project api-key.
# Add Address to Stream
Source: https://docs.moralis.com/streams/api-reference/solana/address/add-address-to-stream
/openapi-files/streams-api/streams.yaml POST /streams/solana/{id}/address
# Delete Address from Stream
Source: https://docs.moralis.com/streams/api-reference/solana/address/delete-address-from-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/solana/{id}/address
# Get Addresses by Stream
Source: https://docs.moralis.com/streams/api-reference/solana/address/get-addresses-by-stream
/openapi-files/streams-api/streams.yaml GET /streams/solana/{id}/address
# Create Stream
Source: https://docs.moralis.com/streams/api-reference/solana/streams/create-streams
/openapi-files/streams-api/streams.yaml PUT /streams/solana
# Delete Stream
Source: https://docs.moralis.com/streams/api-reference/solana/streams/delete-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/solana/{id}
# Get Stream by ID
Source: https://docs.moralis.com/streams/api-reference/solana/streams/get-stream-by-id
/openapi-files/streams-api/streams.yaml GET /streams/solana/{id}
# Get Streams
Source: https://docs.moralis.com/streams/api-reference/solana/streams/get-streams
/openapi-files/streams-api/streams.yaml GET /streams/solana
# Get Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/solana/streams/get-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/solana/{chainId}/block/{blockNumber}
# Send Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/solana/streams/send-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/solana/{chainId}/block-to-webhook/{blockNumber}/{streamId}
# Update Stream
Source: https://docs.moralis.com/streams/api-reference/solana/streams/update-stream
/openapi-files/streams-api/streams.yaml POST /streams/solana/{id}
# Update Stream Status
Source: https://docs.moralis.com/streams/api-reference/solana/streams/update-stream-status
/openapi-files/streams-api/streams.yaml POST /streams/solana/{id}/status
# Get Stats
Source: https://docs.moralis.com/streams/api-reference/stats/get-stats
/openapi-files/streams-api/streams.yaml GET /stats
Get the global stats for the account.
# Get Stats by Stream
Source: https://docs.moralis.com/streams/api-reference/stats/get-stats-by-stream
/openapi-files/streams-api/streams.yaml GET /stats/{streamId}
Get the stats for the streamId specified
# Add Address to Stream
Source: https://docs.moralis.com/streams/api-reference/streams/add-address-to-stream
/openapi-files/streams-api/streams.yaml POST /streams/evm/{id}/address
Adds an address to a Stream.
# Create Stream
Source: https://docs.moralis.com/streams/api-reference/streams/create-streams
/openapi-files/streams-api/streams.yaml PUT /streams/evm
Creates a new evm stream.
# Delete Address from Stream
Source: https://docs.moralis.com/streams/api-reference/streams/delete-address-from-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/evm/{id}/address
Deletes an address from a Stream.
# Delete Stream
Source: https://docs.moralis.com/streams/api-reference/streams/delete-stream
/openapi-files/streams-api/streams.yaml DELETE /streams/evm/{id}
Delete a specific evm stream.
# Duplicate Stream
Source: https://docs.moralis.com/streams/api-reference/streams/duplicate-stream
/openapi-files/streams-api/streams.yaml POST /streams/evm/{id}/duplicate
Duplicate a specific evm stream.
# Get Addresses by Stream
Source: https://docs.moralis.com/streams/api-reference/streams/get-addresses-by-stream
/openapi-files/streams-api/streams.yaml GET /streams/evm/{id}/address
Get all addresses associated with a specific stream.
# Get Stream by ID
Source: https://docs.moralis.com/streams/api-reference/streams/get-stream-by-id
/openapi-files/streams-api/streams.yaml GET /streams/evm/{id}
Get a specific evm stream.
# Get All Streams
Source: https://docs.moralis.com/streams/api-reference/streams/get-streams
/openapi-files/streams-api/streams.yaml GET /streams/evm
Get all the evm streams for the current project based on the project api-key .
# Get Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/streams/get-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/evm/{chainId}/block/{blockNumber}
Get webhook data returned on the block number with provided stream config.
# Replace Address on Stream
Source: https://docs.moralis.com/streams/api-reference/streams/replace-address-on-stream
/openapi-files/streams-api/streams.yaml PATCH /streams/evm/{id}/address
Replaces address from a Stream.
# Send Webhook Data by Block Number
Source: https://docs.moralis.com/streams/api-reference/streams/send-webhook-data-by-block-number
/openapi-files/streams-api/streams.yaml POST /streams/evm/{chainId}/block-to-webhook/{blockNumber}/{streamId}
Execute.
# Update Stream
Source: https://docs.moralis.com/streams/api-reference/streams/update-stream
/openapi-files/streams-api/streams.yaml POST /streams/evm/{id}
Updates a specific evm stream.
# Update Stream Status
Source: https://docs.moralis.com/streams/api-reference/streams/update-stream-status
/openapi-files/streams-api/streams.yaml POST /streams/evm/{id}/status
Updates the status of specific evm stream.
# Bitcoin Streams
Source: https://docs.moralis.com/streams/bitcoin-streams
Stream real-time Bitcoin transaction data directly to your application with webhooks, no node infrastructure, no polling, no missed blocks.
## Overview
**Bitcoin Streams** extends Moralis Streams to the Bitcoin network, delivering real-time transaction data via webhooks. Moralis indexes Bitcoin automatically and pushes structured payloads to your endpoint whenever transactions match your criteria.
Webhooks typically arrive within seconds of a block being mined — no node, no polling, no missed blocks.
***
## Key Features
* **Real-time delivery:** end-to-end latency is typically under 10 seconds after a block is mined
* **Dual-phase notifications:** matched transactions trigger two webhook deliveries: once when the transaction enters the mempool (unconfirmed) and again upon on-chain confirmation
* **All address formats supported:** P2PKH (legacy, `1...`), P2SH (SegWit-wrapped, `3...`), and Bech32 native SegWit (`bc1q...`)
* **Xpub support:** attach an extended public key to a stream and Moralis derives and monitors its addresses automatically — ideal for HD wallets
* **Flexible monitoring:** watch specific addresses, attach an xpub, or enable firehose mode with `allAddresses` to receive every Bitcoin transaction
* **Automatic retries:** Moralis retries webhook delivery until it receives an HTTP 200 response
***
## How It Works
1. A new Bitcoin block is produced
2. Moralis evaluates every transaction against your registered addresses
3. Matching transactions fire a webhook in the **mempool** phase (unconfirmed)
4. When the block confirms, a second webhook is delivered marking the transaction as confirmed
5. Your service upserts on `txid` to reconcile the two-phase lifecycle
***
## Webhook Payload Structure
Each Bitcoin webhook payload contains:
* **Block metadata** — hash, height, timestamp, difficulty, merkle root, transaction count
* **Transaction details** — `txid`, input/output counts, locktime, version, block reference
* **Outputs (`vout`)** — value in BTC (not satoshis), script type, recipient address
* **Inputs (`vin`)** — structural fields only; `address` and `value` fields remain `null`
* **Confirmation status** — boolean flag distinguishing mempool from confirmed deliveries
Output values are represented as **BTC decimals** (e.g. `3.13258866`). To convert to satoshis, multiply by `1e8`:
```js theme={null}
const satoshis = Math.round(btc * 1e8);
```
***
## Configuration Parameters
When creating a Bitcoin stream you specify:
| Parameter | Description |
| ---------------- | ----------------------------------------------------------- |
| `webhookUrl` | Public HTTPS endpoint that will receive payloads (required) |
| `network` | Must be `["mainnet"]` as an array |
| `includeInputs` | Include input structure in the payload |
| `includeOutputs` | Include output structure in the payload |
| `allAddresses` | Firehose mode — deliver every Bitcoin transaction |
| `description` | Human-readable stream description |
| `tag` | Identifier for routing / filtering on your side |
***
## API Endpoints
All Bitcoin Streams endpoints require the `x-api-key` header.
### Streams
| Method | Endpoint | Purpose |
| -------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `PUT` | `/streams/bitcoin` | [Create a stream](/streams/api-reference/bitcoin/streams/create-streams) with a webhook URL and configuration |
| `POST` | `/streams/bitcoin/{id}` | [Update a stream's](/streams/api-reference/bitcoin/streams/update-stream) configuration |
| `POST` | `/streams/bitcoin/{id}/status` | [Pause or resume a stream](/streams/api-reference/bitcoin/streams/update-stream-status) |
| `GET` | `/streams/bitcoin` | [List existing Bitcoin streams](/streams/api-reference/bitcoin/streams/get-streams) |
| `GET` | `/streams/bitcoin/{id}` | [Get a stream by ID](/streams/api-reference/bitcoin/streams/get-stream-by-id) |
| `DELETE` | `/streams/bitcoin/{id}` | [Remove a stream](/streams/api-reference/bitcoin/streams/delete-stream) |
| `POST` | `/streams/bitcoin/{chainId}/block/{blockNumber}` | [Get webhook data for a historical block](/streams/api-reference/bitcoin/streams/get-webhook-data-by-block-number) |
| `POST` | `/streams/bitcoin/{chainId}/block-to-webhook/{blockNumber}/{streamId}` | [Replay a historical block](/streams/api-reference/bitcoin/streams/send-webhook-data-by-block-number) for backfilling |
### Addresses
| Method | Endpoint | Purpose |
| -------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `GET` | `/streams/bitcoin/{id}/address` | [List addresses](/streams/api-reference/bitcoin/address/get-addresses-by-stream) attached to a stream |
| `POST` | `/streams/bitcoin/{id}/address` | [Add an address](/streams/api-reference/bitcoin/address/add-address-to-stream) to monitor (one per request) |
| `DELETE` | `/streams/bitcoin/{id}/address` | [Remove an address](/streams/api-reference/bitcoin/address/delete-address-from-stream) from a stream |
### Xpub
| Method | Endpoint | Purpose |
| -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `GET` | `/streams/bitcoin/{id}/xpub` | [List xpubs](/streams/api-reference/bitcoin/xpub/get-xpubs) attached to a stream |
| `POST` | `/streams/bitcoin/{id}/xpub` | [Add an xpub](/streams/api-reference/bitcoin/xpub/add-xpub) to derive and monitor addresses from |
| `DELETE` | `/streams/bitcoin/{id}/xpub/{xpubId}` | [Remove an xpub](/streams/api-reference/bitcoin/xpub/delete-xpub) from a stream |
***
## Limitations
Bitcoin Streams has a few behaviors that differ from EVM Streams — plan your consumer around them.
* **Input data is not populated.** Even with `includeInputs: true`, input `address` and `value` fields return `null`. You can reliably detect **inbound** transfers to watched addresses, not outflows.
* **`isCoinbase` is always `false`.** The `isCoinbase` field does not reliably identify coinbase transactions. Detect coinbase transactions using a heuristic: the transaction contains an `OP_RETURN` output **and** has exactly one input.
* **Values are BTC decimals.** Output values are not denominated in satoshis. Convert with `Math.round(btc * 1e8)` before feeding integer-based ledger systems.
* **Mainnet only.** The `network` parameter must be `["mainnet"]`.
***
## Processing Patterns
### Deduplication
Each matched transaction is delivered **twice** (mempool + confirmation). Use the transaction id (`txid`) as your natural deduplication key and upsert on the second delivery to flip the confirmation flag.
### Coinbase detection
Since `isCoinbase` is unreliable, detect coinbase transactions like this:
```js theme={null}
const isCoinbase =
tx.vin.length === 1 &&
tx.vout.some((out) => out.scriptPubKey?.type === "nulldata"); // OP_RETURN
```
### Value conversion
Store both BTC and satoshi values so downstream services can pick whichever representation fits:
```js theme={null}
const btc = vout.value;
const satoshis = Math.round(btc * 1e8);
```
***
## Common Use Cases
* **Exchange deposits** — monitor hot wallet addresses, mark deposits as `pending` on the mempool delivery and `confirmed` on the block delivery
* **Cold wallet surveillance** — alert on any inbound transfer to an offline storage address
* **Mining pool revenue** — watch payout addresses for both standard payments and coinbase block rewards
* **Treasury monitoring** — real-time accounting for corporate or DAO-held BTC addresses
***
## Setup Checklist
1. Generate an API key from [admin.moralis.com](https://admin.moralis.com)
2. Deploy a publicly accessible HTTPS webhook endpoint
3. Create the stream via `PUT /streams/bitcoin`
4. Attach the wallets you want to monitor — either by [registering individual addresses](/streams/api-reference/bitcoin/address/add-address-to-stream) (`POST /streams/bitcoin/{id}/address`) or by [adding an xpub](/streams/api-reference/bitcoin/xpub/add-xpub) (`POST /streams/bitcoin/{id}/xpub`) to auto-derive and watch its addresses
5. Implement the verification handler — respond to the empty-body test `POST` with HTTP `200`
6. Build upsert logic keyed on `txid` to handle the mempool → confirmed transition
7. Always return HTTP `200` from your handler, even when your own processing errors — Moralis retries on non-200 responses
# Streams
Source: https://docs.moralis.com/streams/overview
Real-time blockchain webhooks for wallets, contracts, and on-chain events with guaranteed delivery and flexible filtering.
## Overview
Moralis **Streams** lets you receive **real-time blockchain events** directly in your backend via webhooks.
Instead of polling APIs or indexing chains yourself, Streams pushes on-chain activity to you the moment it happens - based on rules you define.
***
## What Is Moralis Streams?
Moralis Streams allows you to **listen to blockchain activity in real time**, including:
* Wallet activity (transfers, swaps, interactions)
* Contract events (via ABI decoding)
* NFT and token transfers
* Native and internal transactions
* Custom on-chain conditions using filters
When a matching event occurs, Moralis delivers a **webhook** to your server with a structured data payload.
***
## How Streams Works
At a high level:
1. A new block is produced on-chain
2. Moralis processes and evaluates the block
3. Your stream rules are applied
4. Matching events are detected
5. A webhook is delivered to your endpoint
All delivery is handled by Moralis - no nodes, polling, or infrastructure required.
***
## What You Can Listen To
With Streams, you can:
* Monitor one address or **millions of addresses** with a single stream
* Listen to **all contract events** or only specific ABI events
* Track transfers, swaps, mints, burns, and internal transactions
* Apply **advanced filters** (amounts, addresses, tokens, contracts)
* Run **read-only smart contract functions** as part of event processing
* Enrich events with balances and decoded data
***
## Common Use Cases
Streams is commonly used for:
* **Real-time wallet notifications**\
(send, receive, swap, stake, burn)
* **Asset monitoring**\
(token or NFT movement, price-sensitive events)
* **Games & apps**\
(in-game actions, state changes, achievements)
* **Token sales & launches**\
(participation tracking, contribution thresholds)
* **Protocol monitoring**\
(liquidity events, contract interactions)
***
## Working With Webhooks
Streams delivers events via **HTTP webhooks**:
* Webhooks are sent using `POST` requests
* Payloads include decoded, structured event data
* Delivery is retried automatically on failure
* Events can be replayed manually if needed
To ensure correctness, Moralis sends a **mandatory test webhook** whenever a stream is created or updated.
***
## Reliability & Guarantees
Streams is built for production workloads:
* Guaranteed webhook delivery with retries
* Automatic backoff if your service is unavailable
* Manual replay support
* Spam detection and filtering
* Secure webhook signing
***
## When to Use Streams
Use Streams if you need:
* Real-time blockchain events
* Push-based architecture
* Low-latency notifications
* Reliable delivery without running infrastructure
If you only need historical data, use the [**Data APIs**](/data-api/overview) instead.
***
## Get Started
* **Quickstart**
* **Stream Configuration**
* **Webhooks**
* **Tutorials**
***
## Streams API Overview Video
# Pricing
Source: https://docs.moralis.com/streams/pricing
Understand how Streams API usage is calculated using records and compute units, and learn how to optimize your costs.
## Records
Records are the fundamental unit for calculating Streams API usage. A **record** is one of the following:
* A transaction (`txs`)
* A log event (`logs`)
* An internal transaction (`txsInternal`)
The total record count for a webhook equals the sum of all three: **txs + logs + txsInternal**.
## Charging Structure
Each record costs **10 Compute Units (CUs)**. The `x-records-charged` header in webhook responses shows the exact record count for that delivery.
Only webhooks with `confirmed: true` incur charges. Unconfirmed webhooks (`confirmed: false`) have `x-records-charged: 0` and are free.
For each transaction, you receive two webhooks:
1. **Unconfirmed** — Sent when the transaction is included in a block (free).
2. **Confirmed** — Sent once the block is considered final (charged).
## Records by Transaction Type
The number of records charged varies depending on transaction complexity:
| Transaction Type | Records Charged |
| ---------------------------- | --------------- |
| Native transfer | 1 record |
| ERC20 transfer | 2 records |
| Single NFT transfer (ERC721) | 11 records |
| Batch NFT transfer (ERC1155) | 2 records |
| ERC721 minting (100 tokens) | 100 records |
## Decoded Logs Are Free
Moralis automatically decodes standardized contract events at **no additional cost**. These do **not** count as records:
* `erc20Transfers`
* `erc20Approvals`
* `nftTransfers`
## Monitoring Your Usage
Use the `/status` endpoint ([Get Stats](/streams/api-reference/stats/get-stats)) to track your consumption. It provides:
* `totalLogsProcessed`
* `totalTxsProcessed`
* `totalTxsInternalProcessed`
Sum these values to determine total records consumed during your billing period.
## Plan Limits
For details on CU allocations, throughput limits, and plan comparisons, visit the [Moralis Pricing Page](https://moralis.io/pricing).
# Create Your First Stream
Source: https://docs.moralis.com/streams/quickstart/create-your-first-stream
Learn how to create a new stream using the Moralis Admin Panel or the SDK to start monitoring blockchain addresses and receiving webhook data.
You can create a stream either through the **Moralis Admin Panel** (no code required) or programmatically using the **Moralis SDK**.
## Option 1: Create via Admin Panel
### Getting Started
1. Go to [admin.moralis.com/streams](https://admin.moralis.com/streams).
2. Click on **Create a new Stream**.
3. Choose one of the templates:
* **Custom Event** — Customizable options for events and filters, allowing precise notifications.
* **Wallet Activity** — Track native transactions and smart contract interactions (transfers, approvals).
* **Contract Activity** — Monitor smart contract events (logs).
### Setting Up the Stream
**1. Name your stream and select the types of events you want to track.**
**2. Set up event filtering.**
You can find more details in the [Filters](/streams/streams-concepts/filters) documentation.
**3. Add a tag for your stream and choose if you wish to receive additional data.**
**4. Add the addresses you wish to track.**
**5. Pick which chains should be tracked.**
**6. Test your stream (optional).**
**7. Add your webhook URL where the `POST` requests will be sent.**
For testing, you can use a service like [webhook.site](https://webhook.site/) to receive and inspect webhooks.
**8. Save your configuration.**
You will now be able to see your stream details and its status in the dashboard. Once the addresses you are monitoring start sending or receiving transactions, you will see the webhook data delivered to your endpoint.
***
## Option 2: Create via SDK
Make sure you have a Moralis API key before proceeding. You can get one from the [Moralis Dashboard](https://admin.moralis.com/).
### Step 1: Create a Stream
To create a stream, you need these required parameters:
* `webhookUrl` — Webhook URL where Moralis will send the POST request.
* `description` — A description for this stream.
* `tag` — A user-provided tag sent along with the webhook to identify the stream.
* `chains` — An array of chains to monitor.
* At least one of `includeContractLogs`, `includeNativeTxs`, or `includeInternalTxs` must be set to `true`.
```javascript theme={null}
const Moralis = require("moralis").default;
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const response = await Moralis.Streams.add({
webhookUrl: "https://webhook.site/YOUR_WEBHOOK_URL",
description: "My first stream",
tag: "my_stream",
chains: ["0x1"],
includeNativeTxs: true,
});
console.log(response.toJSON().id); // print the stream id
};
runApp();
```
```python theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
stream_body = {
"webhookUrl": "https://webhook.site/YOUR_WEBHOOK_URL",
"description": "my first stream",
"tag": "my_stream",
"chainIds": ["0x1"],
"includeNativeTxs": True,
}
results = streams.evm_streams.create_stream(api_key=api_key, body=stream_body)
print(results["id"]) # print the stream id
```
### Step 2: Add an Address to a Stream
Now that you have a stream ID, you can add addresses to monitor. You can add individual addresses or a batch.
```javascript theme={null}
const Moralis = require("moralis").default;
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const list = [
"0xf3d8d9f1f1ccbc8f7e313b7e7cdaa1d6e5b2c2f2",
"0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
];
const response = await Moralis.Streams.addAddress({
id: "YOUR_STREAM_ID",
address: list,
});
console.log(response.toJSON());
};
runApp();
```
```python theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
params = {
"id": "YOUR_STREAM_ID",
}
address_list = [
"0xf3d8d9f1f1ccbc8f7e313b7e7cdaa1d6e5b2c2f2",
"0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
]
stream_body = {"address": address_list}
results = streams.evm_streams.add_address_to_stream(
api_key=api_key, body=stream_body, params=params
)
print(results)
```
### Step 3: Update a Stream (Optional)
You can update a stream to add contract log monitoring, such as listening for ERC20 transfers.
```javascript theme={null}
const Moralis = require("moralis").default;
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
});
const ERC20TransferABI = [
{
anonymous: false,
inputs: [
{ indexed: true, name: "from", type: "address" },
{ indexed: true, name: "to", type: "address" },
{ indexed: false, name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
];
const response = await Moralis.Streams.update({
id: "YOUR_STREAM_ID",
abi: ERC20TransferABI,
includeContractLogs: true,
topic0: ["Transfer(address,address,uint256)"],
description: "My first stream - with ERC20 transfers",
});
console.log(response.toJSON());
};
runApp();
```
```python theme={null}
from moralis import streams
api_key = "YOUR_API_KEY"
erc20_transfer_abi = [
{
"anonymous": False,
"inputs": [
{"indexed": True, "name": "from", "type": "address"},
{"indexed": True, "name": "to", "type": "address"},
{"indexed": False, "name": "value", "type": "uint256"},
],
"name": "Transfer",
"type": "event",
}
]
params = {"id": "YOUR_STREAM_ID"}
stream_body = {
"abi": erc20_transfer_abi,
"includeContractLogs": True,
"topic0": ["Transfer(address,address,uint256)"],
"description": "my first stream - with ERC20 transfers",
}
results = streams.evm_streams.update_stream(
api_key=api_key, body=stream_body, params=params
)
print(results)
```
## Next Steps
Once your stream is created, you will receive a [mandatory test webhook](/streams/webhooks/test-webhooks) that you must respond to with a `200` status code for the stream to activate.
* [Receive Your First Webhook](/streams/quickstart/receive-your-first-webhook) — Learn what to expect when webhooks start arriving.
* [Webhook Security](/streams/security-and-reliability/webhook-security) — Verify webhook signatures to ensure data authenticity.
* [Filters](/streams/streams-concepts/filters) — Fine-tune which events trigger webhooks.
# Receive Your First Webhook
Source: https://docs.moralis.com/streams/quickstart/receive-your-first-webhook
Understand the webhook lifecycle, payload structure, and how to handle confirmed and unconfirmed webhooks from Moralis Streams.
Once your stream is active, Moralis will send webhook `POST` requests to your configured URL whenever monitored addresses are involved in on-chain events.
## Mandatory Test Webhook
Whenever you create or update a stream, you will receive a **test webhook**. You must return a `200` status code (or any `2xx` code) for the stream to start delivering real data.
The test body looks like this:
```json theme={null}
{
"abi": {},
"block": {
"hash": "",
"number": "",
"timestamp": ""
},
"txs": [],
"txsInternal": [],
"logs": [],
"chainId": "",
"tag": "",
"streamId": "",
"confirmed": true,
"retries": 0,
"erc20Approvals": [],
"erc20Transfers": [],
"nftApprovals": [],
"nftTransfers": []
}
```
No response body is required — only the status code matters. See [Test Webhooks](/streams/webhooks/test-webhooks) for more details.
## Two Webhooks Per Event
You will receive **two webhooks** for each event:
1. **Unconfirmed** (`confirmed: false`) — Sent as soon as the transaction is included in a block. The block may still be dropped due to a chain reorganization. You are **not charged** for unconfirmed webhooks.
2. **Confirmed** (`confirmed: true`) — Sent once enough blocks have been mined to consider the block final. Only confirmed webhooks count toward your [billing](/streams/pricing).
In rare cases, the confirmed webhook may arrive before the unconfirmed one. Make sure your application handles this scenario.
## Webhook Payload Structure
The webhook body contains all the data for the block event. The key fields are:
| Field | Description |
| ---------------- | ------------------------------------------------ |
| `chainId` | The chain ID (e.g., `0x1` for Ethereum) |
| `block` | Block metadata (number, hash, timestamp) |
| `txs` | Array of native transactions |
| `txsInternal` | Array of internal transactions |
| `logs` | Array of raw event logs |
| `erc20Transfers` | Decoded ERC20 transfer events (free) |
| `erc20Approvals` | Decoded ERC20 approval events (free) |
| `nftTransfers` | Decoded NFT transfer events (free) |
| `nftApprovals` | Decoded NFT approval events (free) |
| `tag` | Your user-defined stream tag |
| `streamId` | The ID of the stream that triggered this webhook |
| `confirmed` | Whether the block is confirmed |
| `retries` | Number of delivery retries |
## Example: Native Transaction Webhook
```json theme={null}
{
"confirmed": false,
"chainId": "0x1",
"abi": [],
"streamId": "c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17",
"tag": "my_stream",
"retries": 0,
"block": {
"number": "15988759",
"hash": "0x3aa07bd98e328db97ec273ce06b3a15fc645931fbd26337fe20c48b274277f76",
"timestamp": "1668676247"
},
"logs": [],
"txs": [
{
"hash": "0xd68700a0e2abd9c041eb236812e4194bf91c8182a2b03065887ab0f33d5c2958",
"gas": "149200",
"gasPrice": "13670412399",
"nonce": "57995",
"input": "0x...",
"transactionIndex": "52",
"fromAddress": "0x839d4641f97153b0ff26ab837860c479e2bd0242",
"toAddress": "0x1111111254eeb25477b68fb85ed929f73a960582",
"value": "0",
"type": "2",
"receiptCumulativeGasUsed": "3131649",
"receiptGasUsed": "113816",
"receiptStatus": "1"
}
],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": { "ERC1155": [], "ERC721": [] },
"nftTransfers": []
}
```
## Verifying Webhook Signatures
Every webhook includes an `x-signature` header — a SHA3 hash of the body combined with your API key. Always verify this signature to ensure the webhook is from Moralis.
```javascript theme={null}
import Moralis from "moralis";
const { headers, body } = request;
Moralis.Streams.verifySignature({
body,
signature: headers["x-signature"],
}); // throws error if not valid
```
```python theme={null}
from web3 import Web3
def verify_signature(req, secret):
provided_signature = req.headers.get("x-signature")
if not provided_signature:
raise TypeError("Signature not provided")
data = req.data + secret.encode()
signature = Web3.keccak(text=data.decode()).hex()
if provided_signature != signature:
raise ValueError("Invalid Signature")
```
For full details, see [Webhook Security](/streams/security-and-reliability/webhook-security).
## Decoded Data (Free)
Moralis automatically decodes standard contract events at no additional cost:
* **ERC20 Transfers** — Includes `tokenName`, `tokenSymbol`, `tokenDecimals`, `from`, `to`, `value`, and `contract` address.
* **ERC20 Approvals** — Includes `owner`, `spender`, `value`, and token metadata.
* **NFT Transfers** — Includes `tokenId`, `tokenName`, `tokenContractType` (ERC721/ERC1155), `from`, `to`, `amount`, and `contract` address.
These decoded fields are included in both confirmed and unconfirmed payloads and do **not** count as records for billing purposes.
## Next Steps
* [Webhook Payloads](/streams/webhooks/webhook-payloads) — Detailed reference for all payload types.
* [Confirmation and Finality](/streams/webhooks/confirmation-and-finality) — How block confirmations work across chains.
* [Pricing](/streams/pricing) — Understand how records and compute units are calculated.
# Delivery Guarantees
Source: https://docs.moralis.com/streams/security-and-reliability/delivery-guarantees
Learn how Moralis reliably delivers blockchain data, including retry behavior, durability, and how events are protected from data loss.
## Overview
Moralis is built to deliver blockchain data **reliably**, even in the presence of network issues, server downtime, or blockchain reorganizations.
This page explains:
* What Moralis guarantees
* How delivery failures are handled
* What you should expect when consuming events at scale
***
## Reliable Event Delivery
Moralis ensures that **eligible blockchain events are not silently lost**.
If a webhook delivery fails (for example, due to a timeout or server error), Moralis will **automatically retry delivery** until the event is acknowledged or the retry window expires.
As a result:
* Events are delivered reliably
* Temporary failures do not cause data loss
* Duplicate deliveries are possible and expected in failure scenarios
Delivery mechanics:
* [**Webhook Delivery**](/streams/webhooks/webhook-delivery)
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
***
## What This Means in Practice
Under normal operation:
* Each event is delivered once
If delivery fails:
* The event is retried automatically
* The same payload may be sent again
* Your system should handle duplicates safely
This design favors **correctness and completeness** over strict delivery assumptions.
Guidance on safe handling:
* [**Ordering & Idempotency**](/streams/security-and-reliability/ordering-and-idempotency)
***
## Durable Storage & Recovery
When delivery issues occur:
* Failed webhook deliveries are retained (plan-dependent)
* Events can be replayed manually if needed
* Delivery resumes automatically once issues are resolved
Recovery options:
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
* [**Error Handling**](/streams/streams-concepts/error-handling)
***
## Blockchain Reorganization Safety
Blockchains are probabilistic systems. Transactions may appear in a block and later be removed due to reorganization.
Moralis handles this by:
* Delivering provisional events (`confirmed: false`)
* Finalizing only confirmed events (`confirmed: true`)
* Preventing invalidated data from being treated as final
More details:
* [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality)
* [**Re-org Handling**](/streams/streams-concepts/re-org-handling)
***
## What Moralis Does *Not* Guarantee
### Strict ordering
Events may arrive:
* Out of order
* With retries interleaved
* With confirmed events preceding unconfirmed ones (rare)
Ordering is intentionally relaxed to ensure reliability.
Ordering strategies:
* [**Ordering & Idempotency**](/streams/security-and-reliability/ordering-and-idempotency)
***
### Reliable Delivery with Retries
Moralis does not attempt to deliver each event *exactly once*.
Exactly-once delivery is not realistically achievable across network boundaries and webhook-based systems. Instead, Moralis guarantees **reliable delivery with retries**, and expects consumers to be idempotent.
***
## Operational Safeguards
To protect delivery reliability, Moralis includes:
* Automatic retry schedules
* Delivery queue limits and backpressure
* Stream health monitoring
* Error and termination states
* Email notifications on critical failures
Operational details:
* [**Error Handling**](/streams/streams-concepts/error-handling)
* [**Stream Lifecycle**](/streams/streams-concepts/stream-lifecycle-and-management)
***
## Best Practices
To fully benefit from Moralis’ delivery guarantees:
* Make webhook handlers idempotent
* Persist state only for confirmed events
* Monitor queue size headers
* Use replays for recovery, not polling
***
## Related Pages
* [**Ordering & Idempotency**](/streams/security-and-reliability/ordering-and-idempotency)
* [**Webhook Delivery**](/streams/webhooks/webhook-delivery)
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
* [**Error Handling**](/streams/streams-concepts/error-handling)
* [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality)
# Ordering & Idempotency
Source: https://docs.moralis.com/streams/security-and-reliability/ordering-and-idempotency
Learn how Moralis delivers events without strict ordering guarantees, and how to design idempotent consumers that handle retries, duplicates, and replays safely.
## Overview
Blockchain data is produced by distributed systems and delivered over networks that can fail, retry, and recover.
As a result, Moralis does **not** guarantee strict ordering or single delivery of events. Instead, it prioritizes **reliability and correctness**.
This page explains:
* Why events may arrive out of order
* Why duplicate deliveries are possible
* How to process events safely using idempotency
***
## Why Ordering Is Not Guaranteed
Events may arrive out of order due to:
* Network latency and retries
* Automatic retry behavior on delivery failure
* Manual replay of historical events
* Confirmed and unconfirmed events being delivered separately
* Regional delivery differences
This behavior is expected and intentional.
Delivery mechanics:
* [**Webhook Delivery**](/streams/webhooks/webhook-delivery)
***
## What You Can Rely On Instead
Every webhook payload includes stable identifiers that allow you to reason about order and uniqueness:
* Chain ID
* Block number
* Transaction hash
* Log index (for contract events)
* Confirmation state (`confirmed`)
Payload reference:
* [**Webhook Payload**](/streams/webhooks/webhook-payloads)
These fields let you:
* Deduplicate events
* Sort events deterministically
* Reconcile final state safely
***
## What Idempotency Means
Idempotent processing means:
> Handling the same event multiple times produces the same result as handling it once.
This is essential because:
* Webhooks may be retried automatically
* Replays intentionally resend historical events
* Network failures may cause duplicate deliveries
Retry and replay behavior:
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
***
## Recommended Idempotency Strategies
### Use deterministic event keys
Common approaches include:
* `transactionHash`
* `transactionHash + logIndex`
* `streamId + transactionHash`
Store processed keys and ignore duplicates.
***
### Treat unconfirmed events as provisional
* Use `confirmed: false` for real-time UX
* Persist state only on `confirmed: true`
Confirmation model:
* [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality)
***
### Design replays to be safe
Replays should:
* Reapply state deterministically
* Overwrite or reconcile existing records
* Never assume data is “new”
Recovery workflows:
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
***
## Common Mistakes to Avoid
* Assuming webhook arrival order equals block order
* Using arrival timestamps as a source of truth
* Mutating permanent state on unconfirmed events
* Failing or crashing on duplicate payloads
***
## Relationship to Delivery Guarantees
| Topic | Page |
| :----------------- | :------------------------------------------------------------------------------- |
| Reliable delivery | [**Delivery Guarantees**](/streams/security-and-reliability/delivery-guarantees) |
| Retry behavior | [**Retries & Replays**](/streams/webhooks/retries-and-replays) |
| Confirmation model | [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality) |
| Re-org handling | [**Re-org Handling**](/streams/streams-concepts/re-org-handling) |
***
## Best Practices Summary
* Expect duplicates
* Do not assume ordering
* Persist only confirmed state
* Make handlers idempotent by design
***
## Next Steps
* Understand delivery mechanics → Explore [Webhook Delivery](/streams/webhooks/webhook-delivery)
* Plan recovery flows → Explore [Retries & Replays](/streams/webhooks/retries-and-replays)
* Handle confirmations correctly → Explore [Confirmation & Finality](/streams/webhooks/confirmation-and-finality)
* Protect against re-orgs → Explore [Re-org Handling](/streams/streams-concepts/re-org-handling)
# Spam Detection
Source: https://docs.moralis.com/streams/security-and-reliability/spam-detection
Learn how Moralis Streams identifies and flags potential spam contracts in webhook payloads, helping you filter or handle suspicious on-chain activity safely.
Streams currently uses a legacy spam detection system. This will be upgraded to align with the newer Moralis [API Spam Detection](/data-api/resources/spam-filtering) in a future release.
Spam detection in Moralis Streams provides an **additional safety signal** that helps you identify contracts associated with spam, phishing, or suspicious activity.
This feature allows you to:
* Detect potentially malicious contracts in real time
* Filter or suppress spam-related events
* Warn users about risky interactions
***
## How Spam Detection Works
When spam detection is enabled, Streams adds a boolean field called:
```javascript theme={null}
possibleSpam
```
This field is attached to the following webhook objects:
* `erc20Transfers`
* `erc20Approvals`
* `nftTransfers`
* `nftApprovals`
The value indicates whether the contract involved in the event is **potentially associated with spam or malicious behavior**.
Example:
```javascript theme={null}
{
"contract": "0x...",
"possibleSpam": true
}
```
***
## How to Use Spam Signals
The `possibleSpam` flag is designed as a **signal**, not a hard block.
Common usage patterns include:
* Hiding spam tokens or NFTs from user interfaces
* Suppressing notifications for spam-related activity
* Flagging risky activity for manual review
* Applying stricter filters to spam-flagged events
Filtering options:
* [**Filters**](/streams/streams-concepts/filters)
***
## Filtering Out Spam Events
You can configure Streams to **exclude spam-related events entirely**.
By enabling the `filterPossibleSpamAddresses` option:
* Events involving contracts flagged as spam will not trigger webhooks
* These events will not consume stream usage
This is useful if you want to:
* Reduce noise
* Avoid processing low-quality or malicious activity
Related configuration:
* [**Filters**](/streams/streams-concepts/filters)
* [**Advanced Options**](/streams/streams-concepts/advanced-options)
***
## How Contracts Are Classified
Contracts flagged as spam are evaluated against a set of internal criteria, including:
* Compliance with token and NFT standards
* Minting and transfer behavior (e.g. honeypot patterns)
* Copycat or impersonation signals
* Other proprietary heuristics
Classification is **continuously updated** as new data becomes available.
***
## Supported Chains
Spam detection in Streams is supported on **all EVM-compatible chains**, with the strongest initial coverage on:
* Ethereum Mainnet
* Polygon Mainnet
* BNB Chain
***
## Relationship to API Spam Detection
Streams spam detection is **separate from** the newer Moralis API [Spam Filtering](/data-api/resources/spam-filtering) and [Token Safety](/data-api/data-features/token-scores) features.
Key differences:
* Streams uses a legacy classification system
* API spam detection includes richer metadata and filtering
* The two systems will be unified in a future update
API spam features:
* [**Spam Filtering**](/data-api/resources/spam-filtering)
* [**Token Scores**](/data-api/data-features/token-scores)
***
## Best Practices
* Treat `possibleSpam` as a signal, not absolute truth
* Combine spam flags with confirmation state
* Avoid persisting spam events unless required
* Prefer filtering spam at the stream level when possible
***
## Related Pages
* [**Streams Filters**](/streams/streams-concepts/filters)
* [**Advanced Options**](/streams/streams-concepts/advanced-options)
* [**Webhook Payload**](/streams/webhooks/webhook-payloads)
* [**API Spam Filtering**](/data-api/resources/spam-filtering)
* [**Delivery Guarantees**](/streams/security-and-reliability/delivery-guarantees)
# Webhook Security
Source: https://docs.moralis.com/streams/security-and-reliability/webhook-security
Learn how Moralis secures webhook delivery using request signatures, and how to verify webhook authenticity in your backend.
## Overview
All Moralis webhooks are **cryptographically signed** to ensure authenticity and integrity.
By verifying each webhook signature, you can be confident that:
* The request was sent by Moralis
* The payload was not tampered with
* Your application is protected against spoofed requests
Signature verification is **strongly recommended** for all production environments.
***
## How Webhook Signing Works
Every webhook request includes a signature in the HTTP headers:
```text theme={null}
x-signature
```
This signature is generated by:
1. Serializing the webhook payload
2. Appending your account’s secret
3. Computing a Keccak-256 hash (via `web3.utils.sha3`)
Conceptually:
```javascript theme={null}
signature = sha3(JSON.stringify(body) + secret)
```
The generated signature is then sent with the webhook request.
***
## What Is the Secret Key?
The **secret key** is a Streams-specific credential associated with your Moralis account.
* It is **not** your API key
* It is used **only** for webhook verification
* It can be retrieved via the Streams settings endpoint
***
## Verifying Webhook Signatures
To verify a webhook:
1. Read the `x-signature` header
2. Recompute the signature using the request body and your secret
3. Compare the two values
4. Reject the request if they do not match
Verification should happen **before** processing the payload.
***
## Example: Node.js (Express)
```javascript theme={null}
import { Web3 } from "web3";
function verifySignature(req, secret) {
const providedSignature = req.headers["x-signature"];
if (!providedSignature) {
throw new Error("Missing signature");
}
const web3 = new Web3();
const expectedSignature = web3.utils.sha3(
JSON.stringify(req.body) + secret
);
if (expectedSignature !== providedSignature) {
throw new Error("Invalid signature");
}
}
```
Use this check at the start of your webhook handler.
For handling test webhooks safely, explore [Test Webhooks](/streams/webhooks/test-webhooks).
***
## Security Best Practices
### Always verify signatures
Do not trust:
* Source IP
* User-Agent headers
* Payload structure alone
***
### Use HTTPS
Webhook endpoints must be served over HTTPS to prevent interception or replay.
***
### Keep handlers lightweight
Slow responses can cause retries or queue buildup. Explore [Webhook Delivery](/streams/webhooks/webhook-delivery) to learn how to handle this.
***
### Make handlers idempotent
Retries may result in duplicate payloads. Read more about [Retries & Replays](/streams/webhooks/retries-and-replays).
***
## What Happens If Verification Fails?
If your endpoint:
* Rejects the request (non-2xx)
* Throws an error
* Times out
Then:
* The webhook is considered failed
* Automatic retries will occur
* The stream’s success rate may drop
Read [Error Handling](/streams/streams-concepts/error-handling) for more on failure handling.
***
## Relationship to Other Webhook Concepts
| Topic | Page |
| :----------------------- | :------------------------------------------------------------------------- |
| Delivery guarantees | [**Webhook Delivery**](/streams/webhooks/webhook-delivery) |
| Confirmed vs unconfirmed | [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality) |
| Test requests | [**Test Webhooks**](/streams/webhooks/test-webhooks) |
| Retries & recovery | [**Retries & Replays**](/streams/webhooks/retries-and-replays) |
| Failure states | [**Error Handling**](/streams/streams-concepts/error-handling) |
# Solana Streams
Source: https://docs.moralis.com/streams/solana-streams
Stream real-time Solana transaction data directly to your application with webhooks, no node infrastructure, no polling, no missed slots.
## Overview
**Solana Streams** extends Moralis Streams to Solana mainnet, delivering real-time transaction data via webhooks. Moralis indexes Solana automatically and pushes structured payloads to your endpoint whenever transactions match your criteria.
If you've used Moralis Streams on EVM, the developer model is the same: define a stream, set filters, receive webhooks. The differences are in **what you filter on**, because Solana's transaction model is different from EVM's.
***
## Key Features
* **Real-time delivery:** webhooks arrive within seconds of a slot being produced
* **Flexible filtering:** match by address, program, SPL token mint, or stream every transaction on the network
* **Pre / post token balances:** every payload includes SPL balance snapshots so you can compute exact token deltas without replaying instructions
* **Inner instructions included:** trace nested behavior across Cross-Program Invocations (CPIs) directly from the payload
* **Automatic retries:** Moralis retries webhook delivery until it receives an HTTP 200 response
***
## How It Works
1. A new Solana slot is produced
2. Moralis evaluates every transaction in the resulting block against your registered filters
3. Matching transactions fire a webhook to your endpoint
4. Your service processes the payload, keyed on the transaction `signature`
***
## Available Filters
You can combine filters within a stream to narrow down to exactly the activity you care about.
| Filter | What it does | EVM analog |
| --------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| `addresses` | Match transactions where any `accountKey` in the transaction matches one of the watched addresses | Filtering on `from` / `to` addresses |
| `programIds` | Filter to transactions invoking specific Solana programs (e.g., the SPL Token Program) | Filtering on contract address being called |
| `mintAddresses` | Filter to transactions involving specific SPL tokens, matched via `pre` / `postTokenBalances` | Filtering on ERC-20 contract address |
| `allAddresses` | Receive every transaction on the network (firehose mode, no matching) | Same on EVM |
***
## How Solana Differs From EVM
Most developers come to Solana with an EVM mental model. The concepts below bridge the two so you can pick the right filter and parse the payload correctly.
### Account keys vs. from/to
On EVM, a transaction has a `from` and (usually) a single `to`. On Solana, a transaction lists **all accounts it touches** in `accountKeys` - signers, recipients, programs, and any account read or written. The `addresses` filter matches against this full list, so a single Solana transaction can match multiple watched addresses.
### Programs vs. smart contracts
Solana **programs** are the executable code on-chain - the equivalent of EVM smart contracts. Each program has a `programId` (an address). The most common one developers will care about is the **SPL Token Program** (`TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`), which handles all standard token transfers - similar to how the ERC-20 standard governs token behavior on EVM, except it's a single shared program rather than per-token contracts.
### Mint addresses vs. token contracts
On EVM, every ERC-20 token is its own contract; the contract address **is** the token. On Solana, all SPL tokens are managed by the same Token Program, and each token is identified by its **mint address** (the account that defines that token's supply and metadata). To watch transfers of a specific Solana token, filter by its `mintAddress`.
### Slots, blocks, and signatures
* **Slot** - Solana's time unit. Most slots produce a block; some are skipped.
* **Block** - what you'd expect, with a `blockHash` and `blockTime`.
* **Signature** - Solana's transaction ID is its first signature (base58-encoded), not a hash. This is what you use to look up a transaction.
### Inner instructions
A Solana transaction contains top-level **instructions**, and each instruction can trigger **inner instructions** when one program calls another (Cross-Program Invocations, or CPIs). Conceptually similar to internal calls in EVM. The webhook payload includes both, so you can trace nested behavior.
### Pre / post token balances
Every Solana transaction webhook includes `preTokenBalances` and `postTokenBalances` - snapshots of SPL token balances for the affected accounts before and after the transaction. This makes it trivial to compute exact token deltas without replaying the instruction logic.
***
## Webhook Payload
Each Solana webhook payload contains block metadata, stream identifiers, and a list of matched transactions.
```json theme={null}
{
"block": {
"slot": "410060994",
"blockHash": "7xJ9Km3V...",
"blockHeight": "389230112",
"blockTime": 1743436800,
"parentSlot": "410060993",
"previousBlockHash": "9aB2cD4e..."
},
"chainId": "solana_mainnet",
"network": "mainnet",
"retries": 0,
"streamId": "3f6684f3-2ba4-44d7-af0e-26ee70cab245",
"tag": "my-solana-stream",
"confirmed": false,
"transactions": [
{
"signature": "5KtP...signature_base58",
"slot": "410060994",
"blockTime": 1743436800,
"fee": "5000",
"err": null,
"accountKeys": [
"GoSBxCH19sMnZVEifsXeeMdEfkTv6Zh6MWvQFQF3e5m7",
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"11111111111111111111111111111111"
],
"instructions": [],
"innerInstructions": [],
"preTokenBalances": [],
"postTokenBalances": []
}
]
}
```
The fields you'll reach for first:
* `signature` - transaction id, base58-encoded
* `accountKeys` - every account the transaction touches
* `instructions[].programId` - which programs were invoked
* `preTokenBalances` / `postTokenBalances` - SPL balance snapshots for delta calculation
***
## Common Use Cases
* **Wallet activity notifications** - alert users on inbound and outbound activity for a Solana address
* **DEX / DeFi position monitoring** - track interactions with specific protocols by `programId`
* **SPL token transfer tracking** - airdrops, payments, and compliance flows filtered by `mintAddress`
* **Bot monitoring & MEV detection** - watch high-frequency program activity in real time
* **AI agents** - react to on-chain events as they happen
If you've built on Streams for EVM, you can stand up a Solana equivalent in minutes. The developer model is identical - only the filters differ.
***
## Setup Checklist
1. Generate an API key from [admin.moralis.com](https://admin.moralis.com)
2. Deploy a publicly accessible HTTPS webhook endpoint
3. Create the stream via `PUT /streams/solana`
4. Register the addresses, program IDs, or mint addresses you want to watch
5. Implement the verification handler — respond to the empty-body test `POST` with HTTP `200`
6. Build dedupe logic keyed on `signature`
7. Always return HTTP `200` from your handler, even when your own processing errors — Moralis retries on non-200 responses
***
## Roadmap
More Solana-specific filters and decoded payload options are on the way. If you need a specific protocol or filter prioritized, [reach out to the team](https://moralis.com/contact-sales).
# Advanced Options
Source: https://docs.moralis.com/streams/streams-concepts/advanced-options
Configure advanced Streams options to control which transactions, logs, and events are included in webhook payloads.
## Overview
Streams provides several advanced configuration options that allow you to **fine-tune which on-chain data is included in your webhook payloads**.
These options control:
* Which transaction types are included
* Whether contract logs and internal transactions are captured
* How specific events are filtered at a granular level
Used correctly, they help reduce noise while ensuring you receive all relevant data.
***
## Global Stream Options
These options apply at the **stream level** and affect the overall webhook payload.
***
### Include Contract Logs
```javascript theme={null}
includeContractLogs: true
```
When enabled:
* All contract logs are included in webhook payloads
* Required when monitoring **specific contracts**
* Useful when monitoring wallets that interact with contracts
If you are only monitoring wallet activity, this can be disabled unless contract interaction details are required.
***
### Include Internal Transactions
```javascript theme={null}
includeInternalTxs: true
```
When enabled:
* Includes internal transactions (contract-to-contract calls)
* Useful for tracing value movement inside smart contracts
* Particularly relevant for DeFi protocols and complex contract interactions
***
### Include Native Transactions
```javascript theme={null}
includeNativeTxs: true
```
When enabled:
* Includes native currency transfers (e.g. ETH, MATIC)
* Useful for tracking wallet balance changes or native payments
***
### Include All Transaction Logs
```javascript theme={null}
includeAllTxLogs: true
```
When enabled:
* Includes **all logs related to a transaction** if *any* log or transaction matches your stream configuration
* Expands the webhook payload to include full transaction context
**Requirements:**
* Must be used together with either:
* `includeNativeTxs`, or
* `includeContractLogs`
**Plan availability:**\
Available on **Pro plans and higher**.
***
## Advanced Options (Per-Event Configuration)
The `advancedOptions` field allows you to define **event-specific rules** that override or refine the global stream configuration.
Each entry targets a specific event signature and optionally applies filters.
***
### Advanced Option Structure
```javascript theme={null}
{
"topic0": "string",
"filter": { },
"includeNativeTxs": boolean
}
```
***
### Fields Explained
#### `topic0`
The event signature to listen for (e.g. `Transfer(address,address,uint256)`).
* Required
* Determines which decoded event the option applies to
***
#### `filter`
A filter expression applied **only to this event**.
* Uses the same filter syntax described in **Filters**
* Allows precise inclusion logic per event
***
#### `includeNativeTxs`
Controls whether native transactions should be included **alongside this specific event**.
***
## Example: Filtered ERC-20 Transfers
```javascript theme={null}
{
"topic0": "Transfer(address,address,uint256)",
"filter": {
"and": [
{ "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] },
{ "gt": ["amount", "100000000000000000000"] }
]
},
"includeNativeTxs": false
}
```
This configuration:
* Listens only to ERC-20 `Transfer` events
* Filters transfers from a specific address
* Requires the transferred amount to exceed a threshold
* Excludes native transactions
Amounts must be expressed in the token’s base units (e.g. wei).
***
## When to Use Advanced Options
Advanced options are useful when you want to:
* Apply **different rules per event type**
* Reduce webhook payload size
* Filter high-value or high-signal events
* Track contract activity with precision
For simpler use cases, global stream options are usually sufficient.
***
## Best Practices
* Start with global options, then refine with `advancedOptions`
* Avoid overlapping filters that can be hard to reason about
* Keep filters simple where possible
* Test changes in a non-production stream first
***
## Summary
* Global options control overall stream behaviour
* `advancedOptions` enable per-event customization
* Filters and advanced options work together
* Proper configuration reduces noise and improves reliability
# Error Handling
Source: https://docs.moralis.com/streams/streams-concepts/error-handling
Understand how Streams handles webhook failures, retries, error states, termination, and how to recover from delivery issues safely.
## Overview
Streams is designed for **reliable, at-least-once delivery** of webhook events.\
While Moralis handles retries and failure recovery automatically, errors can still occur—most commonly due to webhook endpoint availability or throughput constraints.
This page explains:
* How delivery failures are handled
* When streams enter error or terminated states
* How retries, replays, and recovery work
* What actions you should take in production
***
## Delivery Guarantees (Important Context)
Moralis guarantees **at-least-once delivery** of webhooks while a stream is active.
This means:
* Webhooks may be retried
* Duplicate deliveries are possible
* Your webhook handler **must be idempotent**
Correctness is prioritised over strict ordering.
***
## Automatic Webhook Retries
If a webhook delivery fails (timeout, network error, non-2xx response), Moralis automatically retries delivery using an exponential backoff strategy.
### Retry schedule
| Attempt | Interval |
| :------ | :--------- |
| 0 | 1 minute |
| 1 | 10 minutes |
| 2 | 1 hour |
| 3 | 2 hours |
| 4 | 6 hours |
| 5 | 12 hours |
| 6 | 24 hours |
Retries apply only to **delivery failures**.\
They do not reprocess blocks or regenerate events.
***
## Error State
A stream may enter the `error` state under the following conditions:
### 1. Low webhook success rate
If the webhook success rate for a stream drops **below 70%**, the stream enters the error state.
### 2. Delivery backlog (queue saturation)
If your server cannot consume webhooks fast enough:
* A delivery queue builds up
* The queue reaches its maximum size (10,000 events)
* The stream is placed into the error state
You can monitor queue pressure using the `x-queue-size` response header.
***
### Behaviour in Error State
When a stream is in the `error` state:
* Webhook delivery is **paused**
* Events are **not delivered**
* Blocks are **still evaluated**
* Retry scheduling resumes once the stream is reactivated
An **email notification** is sent when a stream enters this state.
***
## Terminated State
If a stream remains in the `error` state for **24 hours**, it is automatically **terminated**.
### Behaviour in Terminated State
A terminated stream:
* Does **not** send webhooks
* Does **not** process new blocks
* Drops all subsequent events permanently
* Cannot be resumed
An **email notification** is sent when termination occurs.
To recover, a **new stream must be created**.
***
## Webhook Success Rate
Each stream tracks a webhook success rate per webhook URL:
* Starts at **100%**
* Each failed delivery reduces the rate by **1%**
* Each successful delivery increases the rate by **1%**
* Capped between **0% and 100%**
If the success rate falls below **70%**, the stream enters the error state.
***
## Viewing Failed Webhooks
Failed webhook deliveries are retained for a limited time (plan-dependent, up to 7 days).
### Retrieve failed deliveries
```javascript theme={null}
const history = await Moralis.Streams.getHistory({ limit: 100 });
```
Each failed delivery includes:
* Webhook payload
* Error message
* Stream ID
* Timestamp
* Unique history ID
***
## Replaying Failed Webhooks
Failed webhooks can be replayed manually.
### Replay a failed webhook
```javascript theme={null}
await Moralis.Streams.retry({
id: "HISTORY_ID",
streamId: "STREAM_ID",
});
```
Replayed webhooks are delivered with the same payload as the original attempt.
Replays do not regenerate events or reprocess blocks.
For block-level recovery, use **Replay Block** (see *Retries & Replays*).
***
## Best Practices to Avoid Errors
* Ensure webhook endpoints respond quickly and consistently
* Treat webhook handling as **idempotent**
* Monitor `x-queue-size` headers
* Choose a stream region close to your backend
* Pause streams during planned outages
* Act promptly on error-state email notifications
***
## Summary
* Delivery failures trigger automatic retries
* Prolonged failures cause streams to enter `error`
* Error state pauses delivery but preserves configuration
* 24 hours in error results in termination
* Failed deliveries can be replayed
* Block-level recovery requires replay
# Filters
Source: https://docs.moralis.com/streams/streams-concepts/filters
Learn how to filter Streams events using logical operators, value comparisons, and special stream variables to control exactly which on-chain events trigger webhooks.
## Overview
Streams filters allow you to **control exactly which events trigger webhooks** by applying logical conditions to on-chain data.
Filters are evaluated **before** a webhook is delivered. Events that do not match your filter rules are ignored and do not consume usage.
***
## How Filters Work
Filters are defined as a **JSON expression** using logical operators and comparison rules.
* Filters apply to **decoded event data**
* Filters require a **valid ABI** for the event being filtered
* All conditions must resolve to `true` for the event to trigger a webhook
***
## Supported Operators
### Logical operators
| Operator | Description | Notes | Example |
| :------- | :--------------------------------------- | ----------------------- | ------------------------------------------- |
| `and` | All nested conditions must match | Need at least 2 filters | `{ "or" : [ {..filter1}, {...filter2} ]}` |
| `or` | At least one nested condition must match | Need at least 2 filters | `{ "and" : [ {..filter1}, {...filter2} ]} ` |
### Comparison operators
| Operator | Description | Notes | Example |
| :------- | :-------------------- | :------------------ | -------------------------------------- |
| `eq` | Equal to | | `{ "eq": ["value", "1000"] }` |
| `ne` | Not equal to | | `{ "ne": ["address", "0x...325"] }` |
| `lt` | Less than | Numeric values only | `{ "lt": ["amount", "50"] }` |
| `gt` | Greater than | Numeric values only | `{ "gt": ["price", "500000"] }` |
| `lte` | Less than or equal | Numeric values only | `{ "lte": ["amount", "100"] }` |
| `gte` | Greater than or equal | Numeric values only | `{ "gte": ["amount", "100"] }` |
| `in` | Value exists in array | Array required | `{ "in": ["name": ["alice", "bob"]]}` |
| `nin` | Value not in array | Array required | `{ "nin": ["name": ["bob", "alice"]]}` |
***
## Special Stream Variables
Moralis provides special variables that can be used in filters to access stream-level metadata.
| Variable | Description |
| :--------------------------------- | :---------------------------------------- |
| `moralis_streams_contract_address` | Contract emitting the event (lowercase) |
| `moralis_streams_chain_id` | Chain ID for the event |
| `moralis_streams_possibleSpam` | Indicates if the event is flagged as spam |
### Example: filter by contract address
```javascript theme={null}
{
"eq": ["moralis_streams_contract_address", "0x0000000000000000000000000000000000000000"]
}
```
Note: contract addresses must be lowercase.
***
## Filtering Possible Spam Events
Some contract addresses are associated with spam, phishing attempts, or other suspicious activity. Moralis identifies these and flags them with `possibleSpam = true`.
You can exclude these events entirely by enabling:
```javascript theme={null}
"filterPossibleSpamAddresses": true
```
When enabled:
* Events involving contracts flagged as possible spam are excluded
* No webhook is sent
* No usage is consumed
By default, `filterPossibleSpamAddresses` is set to `false`.
Learn more about spam detection in the **Safety & Trust** section.
***
## Example: Different Rules per Contract
You can apply different thresholds depending on which contract emitted the event.
```javascript theme={null}
{
"or": [
{
"and": [
{ "eq": ["moralis_streams_contract_address", "0x1"] },
{ "gte": ["value", 1000000000] }
]
},
{
"and": [
{ "eq": ["moralis_streams_contract_address", "0x2"] },
{ "gte": ["value", 1000000000000000000000] }
]
}
]
}
```
This is useful when monitoring multiple tokens with different decimals or value semantics.
***
## Example: Filtering by Value Range
Filter transfers where the amount is between two values:
```javascript theme={null}
{
"and": [
{ "gt": ["value", 5000000000] },
{ "lt": ["value", 50000000000] }
]
}
```
> Example assumes a token with 6 decimals (e.g. USDC).
***
## Example: Mint and Burn Detection
A zero address indicates:
* **Mint** when used as `from`
* **Burn** when used as `to`
```javascript theme={null}
{
"or": [
{
"and": [
{ "eq": ["from", "0x0000000000000000000000000000000000000000"] },
{ "gte": ["value", 10000000000] }
]
},
{
"and": [
{ "eq": ["to", "0x0000000000000000000000000000000000000000"] },
{ "gte": ["value", 10000000000] }
]
}
]
}
```
***
## Important Notes
* Filters require a **valid ABI** for the event being filtered
* Filters are evaluated **before webhook delivery**
* Invalid filters will prevent the stream from working
* Filters use **AND / OR logic only** (no implicit precedence)
***
## When to Use Filters
Use filters to:
* Reduce webhook volume
* Exclude spam or low-value events
* Trigger alerts only for meaningful activity
* Apply different logic per contract or chain
# Parsed Data
Source: https://docs.moralis.com/streams/streams-concepts/parsed-data
Learn how to extract typed, decoded data from Streams webhooks, including ERC-20 transfers/approvals, NFT transfers/approvals, and custom contract events.
## Overview
Moralis Streams makes it easy to work with webhook payloads by providing **parsed, structured data** for common on-chain activity.
Depending on your stream configuration, Moralis can include ready-to-use parsed sections such as:
* **Transactions**
* **Internal transactions**
* **ERC-20 transfers**
* **ERC-20 approvals**
* **NFT transfers**
* **NFT approvals**
* **Custom smart contract events** (decoded using your ABI)
This helps you avoid manually decoding logs and building your own parsing pipeline.
Example payload:
```javascript theme={null}
{
"confirmed": false,
"chainId": "0x1",
"streamId": "uuid",
"tag": "string",
"retries": 0,
"block": { },
"logs": [],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftTransfers": [],
"nftApprovals": { "ERC721": [], "ERC1155": [] }
}
```
Learn more about [Webhook Payloads](/streams/webhooks/webhook-payloads).
***
## What Moralis Parses for You
When enabled for a stream, webhook payloads can include structured arrays for:
* `erc20Transfers`
* `erc20Approvals`
* `nftTransfers`
* `nftApprovals`
* `logs` (raw logs for your configured ABI events)
For custom contract events, you can decode logs into a typed structure using the ABI provided in the webhook payload.
***
## Parsing Smart Contract Events (Typed Example)
If you are streaming a smart contract event, you can decode the logs from the webhook into a typed structure.
```javascript theme={null}
import Moralis from "moralis";
import { BigNumber } from "@moralisweb3/core";
interface URI {
value: string;
id: BigNumber;
}
const webhookData = {
confirmed: true,
chainId: "0x1",
abi: [
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "string", name: "value", type: "string" },
{ indexed: true, internalType: "uint256", name: "id", type: "uint256" },
],
name: "URI",
type: "event",
},
],
logs: [
{
logIndex: "475",
transactionHash:
"0x55125fa34ce16c295c222d48fc3efe210864dc2fb017f5965b4e3743d72342d5",
address: "0x495f947276749ce646f68ac8c248420045cb7b5e",
data: "0x0000000000000000000000000000000000000000000000000000000000000020...",
topic0:
"0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b",
topic1:
"0xab6953e647a36018fc48d6223583597b84c755a0000000000000010000000001",
topic2: null,
topic3: null,
},
],
erc20Transfers: [],
erc20Approvals: [],
nftApprovals: { ERC1155: [], ERC721: [] },
nftTransfers: [],
};
const decodedLogs = Moralis.Streams.parsedLogs(webhookData);
console.log(decodedLogs[0].value);
console.log(decodedLogs[0].id.toString());
```
***
## Notes
* For ERC-20 and NFT activity, use the dedicated parsed arrays (`erc20Transfers`, `nftTransfers`, etc.) when available.
* For contract events, decoding relies on the ABI you configure for the stream.
* Raw logs remain available in the payload even when parsed data is provided.
# Rate Limits
Source: https://docs.moralis.com/streams/streams-concepts/rate-limits
Understand Streams rate limits, address management constraints, and how stream reloads impact webhook delivery.
## Rate Limits & Address Management
Streams rate limits primarily apply to **stream configuration changes**, not event delivery.
The most important limits to understand relate to **adding addresses to a stream**, as these operations trigger internal reloads that affect when monitoring becomes active.
***
## Address Management & Stream Reloads
When you add new addresses to a stream, Moralis must **reload the stream configuration** to include those addresses in monitoring.
This reload:
* Is asynchronous
* Takes longer as the number of addresses increases
* Must complete before new blocks are processed for the added addresses
During a reload, the stream may temporarily be unable to detect events for newly added addresses.
***
## Rate Limits for Adding Addresses
### Address add rate limit
* **Maximum:** 5 requests per 5 minutes
* Each request may include **multiple addresses**
If you need to add many addresses, always batch them into as few requests as possible.
***
## Impact on Webhook Delivery
### Reload timing
If an address is added shortly before a block is produced:
* The stream may not finish reloading in time
* Events involving the new address in that block may be missed
* No webhook will be sent for those events
This is more likely when:
* The stream already contains many addresses
* Multiple address updates are submitted close together
***
### Reload loops
Submitting many small address-addition requests can:
* Trigger repeated reloads
* Slow down activation of new addresses
* Cause you to hit the rate limit
* Delay effective monitoring
***
## Best Practices
### Batch address updates
Always batch addresses into a single request when possible.\
This reduces reloads and speeds up activation.
***
### Plan address additions ahead of time
If you expect activity on a new address:
* Add it **well before** the expected transaction
* Avoid last-second updates near block times
Streams are not designed for ultra-last-second address registration.
***
## Handling Missed Events
If you believe events were missed due to reload timing:
### 1. Verify address addition
Confirm the address was successfully added using the **Get Stream Info** endpoint.
### 2. Replay affected blocks
Use the **Replay Block** endpoint with:
* The affected block number
* The relevant stream ID
This allows Moralis to reprocess the block and resend applicable webhooks.
***
## What Rate Limits Do *Not* Apply To
* Event delivery volume
* Number of webhooks received
* Number of monitored events per block
These are governed by stream configuration and pricing, not per-request rate limits.
***
## Summary
* Address additions trigger stream reloads
* Reloads are not instantaneous
* Address add requests are rate limited
* Batch updates and planning ahead are essential
* Missed events can be recovered using block replay
# Re-org Handling
Source: https://docs.moralis.com/streams/streams-concepts/re-org-handling
Learn how Moralis Streams detects and handles blockchain reorganizations to ensure reliable and consistent event delivery.
### Overview
A blockchain reorganization (re-org) occurs when a previously accepted block is replaced by another block at the same height.
Re-orgs are a normal part of blockchain operation, especially on:
* High-throughput chains
* L2s
* Testnets
Moralis Streams is designed to **handle re-orgs safely and transparently**.
***
### How Streams Handles Re-orgs
When a re-org occurs:
1. Streams detects the replaced block
2. Events from the dropped block are invalidated
3. Replacement block events are processed
4. Confirmation logic is recalculated
You do **not** need to manually detect or resolve re-orgs.
***
### Impact on Webhooks
Re-org handling is reflected through:
* `confirmed: false` events that may not be finalized
* `confirmed: true` events only sent after finality
If a transaction is removed due to a re-org:
* It will **not** receive a confirmed webhook
* Replacement transactions will be delivered instead
See also:
* [**Confirmation & Finality**](/streams/webhooks/confirmation-and-finality)
* [**Webhook Delivery**](/streams/webhooks/webhook-delivery)
***
### Why This Matters
Without re-org handling, applications risk:
* Double-counting transactions
* Incorrect balances
* Invalid ownership state
Streams ensures:
* Only finalized state is confirmed
* Re-orgs do not corrupt downstream systems
***
### Replays & Recovery
If your system was offline during a re-org:
* You can replay affected blocks
* You can replay failed webhooks
See also:
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
***
### Best Practices
* Treat `confirmed: false` as provisional
* Persist only confirmed state
* Make handlers idempotent
* Use replays for recovery, not polling
# Stream Lifecycle
Source: https://docs.moralis.com/streams/streams-concepts/stream-lifecycle-and-management
Learn how to manage Streams throughout their lifecycle, including monitoring status, updating configuration, changing regions, and pausing or resuming streams.
## Overview
Moralis Streams can be **created, monitored, updated, paused, and resumed** at any time - either programmatically or via the Moralis dashboard.
This gives you full control over how streams behave in production and allows you to safely manage changes without deleting or recreating streams.
***
## Stream States
Each stream has a lifecycle state that indicates whether it is actively delivering events.
### Supported statuses
| Status | Description |
| :----------- | :--------------------------------------------------------------- |
| `active` | Stream is live and delivering webhooks |
| `paused` | Stream is temporarily disabled |
| `error` | Stream encountered a configuration or delivery error |
| `terminated` | Stream was automatically stopped after 24 hours in `error` state |
The current status is returned when listing or fetching streams.
***
## Listing Streams
You can retrieve all streams associated with your account to inspect their configuration and status.
```javascript theme={null}
const streams = await Moralis.Streams.getAll({
limit: 100,
});
```
Each stream includes metadata such as:
* Webhook URL
* Enabled chains
* Status
* Filters and ABI configuration
* Region and delivery settings
Streams can also be viewed and managed from the dashboard.
***
## Updating Stream Configuration
Streams can be updated at any time to reflect changes such as:
* Webhook URL updates
* Adding or removing chains
* Adjusting filters or ABIs
* Changing stream behavior
Example: updating a webhook URL
```javascript theme={null}
await Moralis.Streams.update({
id: "STREAM_ID",
webhook: "https://your-new-webhook-url",
});
```
Updates take effect immediately and do not require stream recreation.
***
## Pausing and Resuming Streams
Streams can be paused without deleting them. This is useful for:
* Maintenance windows
* Incident response
* Temporary traffic reduction
### Pause a stream
```javascript theme={null}
await Moralis.Streams.updateStatus({
id: "STREAM_ID",
status: "paused",
});
```
### Resume a stream
```javascript theme={null}
await Moralis.Streams.updateStatus({
id: "STREAM_ID",
status: "active",
});
```
Paused streams do not process events and do not send webhooks.
***
## Stream Regions
Each stream runs in a specific region to optimise webhook delivery latency.
Available regions include:
* `us-east-1`
* `us-west-2`
* `eu-central-1`
You can update the region at any time:
```javascript theme={null}
await Moralis.Streams.setSettings({
region: "eu-central-1",
});
```
For best performance, choose the region closest to your backend infrastructure.
***
## Error Handling
If a stream enters the `error` state:
* The stream stops delivering events
* A status message is provided explaining the issue
* Configuration must be corrected before resuming
Common causes include:
* Invalid ABI definitions
* Invalid filters
* Unreachable webhook endpoints
Read more about [Error Handling](/streams/streams-concepts/error-handling).
***
## Terminated State
If a stream remains in the `error` state for **24 hours**, it is automatically **terminated**.
A terminated stream:
* Does **not** send webhooks
* Does **not** process new blocks
* Drops all events that occur after termination
* Cannot be automatically resumed
When a stream is terminated, an **email notification** is sent to the account owner.
Read more about [Terminated States](/streams/streams-concepts/error-handling).
***
## Best Practices
* Pause streams instead of deleting them when troubleshooting
* Monitor stream status regularly in production
* Keep webhook URLs and regions aligned with your deployment setup
* Use descriptive stream tags to identify purpose and ownership
# Triggers
Source: https://docs.moralis.com/streams/streams-concepts/triggers
Run read-only smart contract calls as part of Streams processing and enrich webhook events with on-chain data in real time.
## Overview
Triggers allow you to **run read-only smart contract functions** as part of Streams processing and include the results directly in your webhook payloads.
This enables powerful real-time enrichment, such as:
* Fetching token balances during transfers
* Reading contract state when an event fires
* Attaching computed on-chain data to each streamed event
Triggers are evaluated **at stream time**, without requiring additional API calls from your backend.
***
## How Triggers Work
A trigger defines:
* **When** it should run (which event type)
* **Which contract function** to call
* **What inputs** to pass (static values or dynamic selectors)
When a matching event occurs:
1. Moralis executes the read-only contract call
2. The result is attached to the corresponding event object
3. The enriched event is delivered in the webhook
***
## Supported Trigger Types
Triggers can run against different parts of a webhook payload.
| Type | Description |
| :-------------- | :----------------------------- |
| `tx` | Run once per transaction |
| `log` | Run per decoded contract event |
| `erc20transfer` | Run per ERC-20 transfer |
| `erc20approval` | Run per ERC-20 approval |
| `nfttransfer` | Run per NFT transfer |
Additional trigger types may be added over time.
***
## Trigger Definition
A trigger is defined using the following structure:
```javascript theme={null}
interface Trigger {
type: "tx" | "log" | "erc20transfer" | "erc20approval" | "nfttransfer";
contractAddress: string;
functionAbi: AbiItem;
inputs?: (string | string[])[];
topic0?: string;
callFrom?: string;
}
```
***
## Trigger Fields Explained
### `type`
Specifies which event type the trigger runs against.
Example:
```javascript theme={null}
"type": "erc20transfer"
```
***
### `contractAddress`
The address of the contract containing the function to call.
* Must be a valid address **or a selector**
* Selectors allow dynamic resolution per event
***
### `functionAbi`
The ABI of a **single read-only function**.
Requirements:
* Must be a `view` or `pure` function
* Arrays of ABI items are not supported
* Selectors are **not** supported inside ABI definitions
You may rename output fields in the ABI to control how results appear in the webhook.
***
### `inputs` (optional)
Inputs passed to the function call.
* Order must match the function ABI
* Values can be static or selectors
* Structs are supported using arrays
Example:
```javascript theme={null}
"inputs": ["$from"]
```
***
### `topic0` (optional)
Restricts execution to a specific event signature.
* Only valid when `type` is `log`
* Requires the event ABI to be present in the stream
* Selectors are not allowed
***
### `callFrom` (optional)
Overrides `msg.sender` for the contract call.
* Must be a valid address or selector
* Useful for contracts with access-controlled view functions
***
## Selectors
Selectors dynamically reference values from the current webhook event.
* Begin with `$`
* Must be valid for the trigger type
* Validation ensures address selectors resolve to valid addresses
### Common selectors
| Selector | Description |
| :---------- | :------------------------------------- |
| `$contract` | Contract address for the current event |
| `$from` | Sender address |
| `$to` | Recipient address |
| `$value` | Transfer amount |
Invalid selectors will cause stream creation or updates to fail.
***
## Example: Fetch ERC-20 Balances During Transfers
This example enriches every ERC-20 transfer with the sender’s and receiver’s balances at the time of the transfer.
### Step 1: Define the ABI
```javascript theme={null}
const balanceOfSenderAbi = {
name: "balanceOf",
type: "function",
stateMutability: "view",
inputs: [{ name: "owner", type: "address" }],
outputs: [{ name: "fromBalance", type: "uint256" }],
};
```
```javascript theme={null}
const balanceOfReceiverAbi = {
name: "balanceOf",
type: "function",
stateMutability: "view",
inputs: [{ name: "owner", type: "address" }],
outputs: [{ name: "toBalance", type: "uint256" }],
};
```
***
### Step 2: Create Triggers
```javascript theme={null}
const triggers = [
{
type: "erc20transfer",
contractAddress: "$contract",
functionAbi: balanceOfSenderAbi,
inputs: ["$from"],
},
{
type: "erc20transfer",
contractAddress: "$contract",
functionAbi: balanceOfReceiverAbi,
inputs: ["$to"],
},
];
```
***
### Step 3: Resulting Webhook Enrichment
Each ERC-20 transfer will include trigger results:
```javascript theme={null}
"triggers": [
{ "name": "fromBalance", "value": "6967063534600021400000" },
{ "name": "toBalance", "value": "200000000000000000" }
]
```
Trigger results appear **in the same order** as defined.
***
## Error Handling
* Invalid triggers are rejected when creating or updating a stream
* Contract existence is not validated ahead of time
* If a contract call fails:
* The webhook is still delivered
* The trigger result includes an error message
This ensures Streams remain resilient under partial failures.
***
## Notes on Read-Only Functions
Triggers only support **read-only** contract calls:
* `stateMutability: view`
* `stateMutability: pure`
Functions that modify state or require gas are not supported.
***
## When to Use Triggers
Triggers are ideal when you want to:
* Enrich events with on-chain state
* Reduce API calls from your backend
* Attach contextual data at event time
* Keep webhook payloads self-contained
# Streams Supported Chains
Source: https://docs.moralis.com/streams/supported-chains
Blockchains supported by Moralis Streams for real-time onchain event and activity monitoring.
### Streams Supported Chains
Moralis Streams provide **real-time onchain data delivery** via webhooks, allowing you to react to blockchain activity as it happens.
Streams support a subset of chains where:
* Real-time indexing is available.
* Finality and reorg handling meet production requirements.
Use the table below to see which chains are supported for Streams and what types of events can be monitored.
| Chain Name | Type | Chain ID | Streams Supported | Internal Txs | Blocks Until Confirmed |
| --------------------------- | ------- | --------------------- | ----------------- | ------------ | ---------------------- |
| Ethereum Mainnet | Mainnet | 0x1 (1) | ✓ | ✓ | 12 |
| Ethereum Sepolia | Testnet | 0xaa36a7 (11155111) | ✓ | ✓ | 18 |
| Polygon Mainnet | Mainnet | 0x89 (137) | ✓ | ✓ | 100 |
| Polygon Amoy | Testnet | 0x13882 (80002) | ✓ | ✓ | 100 |
| Binance Smart Chain Mainnet | Mainnet | 0x38 (56) | ✓ | ✓ | 18 |
| Binance Smart Chain Testnet | Testnet | 0x61 (97) | ✓ | ✓ | 18 |
| Arbitrum | Mainnet | 0xa4b1 (42161) | ✓ | ✓ | 18 |
| Arbitrum Sepolia | Testnet | 0x66eee (421614) | ✓ | ✓ | 600 |
| Base | Mainnet | 0x2105 (8453) | ✓ | ✓ | 100 |
| Base Sepolia | Testnet | 0x14a34 (84532) | ✓ | ✓ | 100 |
| Optimism | Mainnet | 0xa (10) | ✓ | ✓ | 500 |
| Optimism Sepolia | Testnet | 0xaa37dc (11155420) | ✓ | ✓ | 600 |
| Linea | Mainnet | 0xe708 (59144) | ✓ | ✓ | 100 |
| Linea Sepolia | Testnet | 0xe705 (59141) | ✓ | ✓ | 100 |
| Avalanche | Mainnet | 0xa86a (43114) | ✓ | ✓ | 100 |
| Fantom Mainnet | Mainnet | 0xfa (250) | ✓ | ✓ | 100 |
| Fantom Testnet | Testnet | 0xfa2 (4002) | ✓ | ✓ | 100 |
| Cronos Mainnet | Mainnet | 0x19 (25) | ✓ | ✗ | 100 |
| Gnosis | Mainnet | 0x64 (100) | ✓ | ✗ | 100 |
| Gnosis Chiado | Testnet | 0x27d8 (10200) | ✓ | ✗ | 100 |
| Chiliz Mainnet | Mainnet | 0x15b38 (88888) | ✓ | ✓ | 100 |
| Chiliz Testnet | Testnet | 0x15b32 (88882) | ✓ | ✓ | 100 |
| Moonbeam | Mainnet | 0x504 (1284) | ✓ | ✗ | 100 |
| Moonriver | Testnet | 0x505 (1285) | ✓ | ✗ | 100 |
| Moonbase | Testnet | 0x507 (1287) | ✓ | ✗ | 100 |
| Blast | Mainnet | 0x13e31 (81457) | ✗ | ✗ | N/A |
| Blast Sepolia | Testnet | 0xa0c71fd (168587773) | ✗ | ✗ | N/A |
| zkSync | Mainnet | 0x144 (324) | ✗ | ✗ | N/A |
| zkSync Sepolia | Testnet | 0x12c (300) | ✗ | ✗ | N/A |
| Mantle | Mainnet | 0x1388 (5000) | ✗ | ✗ | N/A |
| Mantle Sepolia | Testnet | 0x138b (5003) | ✗ | ✗ | N/A |
| opBNB | Mainnet | 0xcc (204) | ✗ | ✗ | N/A |
| Polygon zkEVM | Mainnet | 0x44d (1101) | ✗ | ✗ | N/A |
| Polygon zkEVM Cardona | Testnet | 0x98a (2442) | ✗ | ✗ | N/A |
| Zetachain | Mainnet | 0x1b58 (7000) | ✗ | ✗ | N/A |
| Zetachain Testnet | Testnet | 0x1b59 (7001) | ✗ | ✗ | N/A |
| Flow | Mainnet | 0x2eb (747) | ✓ | ✓ | 100 |
| Flow Testnet | Testnet | 0x221 (545) | ✓ | ✓ | 100 |
| Ronin | Mainnet | 0x7e4 (2020) | ✓ | ✓ | 100 |
| Ronin Saigon Testnet | Testnet | 0x7e5 (2021) | ✓ | ✓ | 100 |
| Lisk | Mainnet | 0x46f (1135) | ✓ | ✓ | 100 |
| Lisk Sepolia Testnet | Testnet | 0x106a (4202) | ✓ | ✓ | 100 |
| Pulsechain | Mainnet | 0x171 (369) | ✓ | ✗ | 100 |
| HyperEVM | Mainnet | 0x3e7 (999) | ✓ | ✓ | 100 |
| Sei | Mainnet | 0x531 (1329) | ✓ | ✗ | N/A |
| Sei Testnet | Testnet | 0x530 (1328) | ✓ | ✗ | N/A |
| Monad | Mainnet | 0x8f (143) | ✓ | ✓ | 100 |
# Confirmation & Finality
Source: https://docs.moralis.com/streams/webhooks/confirmation-and-finality
Understand how blockchain confirmations work, how Moralis defines finality, and how confirmed and unconfirmed webhooks should be handled.
### Overview
Blockchains are probabilistic systems. A transaction may appear in a block and later be removed due to a chain reorganization (re-org).
To handle this safely, Moralis Streams distinguishes between **unconfirmed** and **confirmed** events and delivers both to your backend.
This page explains **what confirmation and finality mean**, and how they are exposed through Streams.
***
### What Is Confirmation?
When a transaction is included in a newly mined block, it is considered **unconfirmed**.
At this stage:
* The block may still be replaced
* Transactions may be reordered or dropped
* State changes are *not final*
Streams delivers these events with:
```javascript theme={null}
"confirmed": false
```
This enables **low-latency, real-time reactions**.
See also:
* [**Webhook Delivery**](/streams/webhooks/webhook-delivery)
* [**Webhook Payload**](/streams/webhooks/webhook-payloads)
***
### What Is Finality?
A transaction becomes **confirmed** once enough blocks have been mined on top of it.
At this point:
* The risk of re-org is extremely low
* State can be safely persisted
* Balances and ownership can be finalized
Streams delivers a second webhook with:
```javascript theme={null}
"confirmed": true
```
Confirmation thresholds vary by chain. See [**Supported Chains**](/streams/supported-chains)**.**
***
### Why Streams Sends Two Webhooks
Streams intentionally sends **both states** so you can:
* React instantly (unconfirmed)
* Persist safely (confirmed)
This avoids the need to:
* Poll block explorers
* Manually track confirmations
* Reconcile state after re-orgs
For how Streams handles re-orgs internally:
* [**Re-org Handling**](/streams/streams-concepts/re-org-handling)
***
### Ordering & Edge Cases
In rare cases:
* A `confirmed: true` webhook may arrive before `confirmed: false`
This can occur due to:
* Network latency
* Retry behavior
* Regional delivery differences
Your system should:
* Treat each webhook independently
* Use transaction hash + confirmation flag
* Be idempotent
***
### Common Patterns
**Real-time UX**
* Act on `confirmed: false`
* Update UI optimistically
**Accounting / Persistence**
* Only persist on `confirmed: true`
**Analytics**
* Use both, but deduplicate by transaction hash
***
### Next Steps
* How re-orgs are handled internally → Explore [Re-org Handling](/streams/streams-concepts/re-org-handling)
* How delivery works end-to-end → Explore [Webhook Delivery](/streams/webhooks/webhook-delivery)
* How to replay affected blocks → Explore [Retries & Replays](/streams/webhooks/retries-and-replays)
# Retries & Replays
Source: https://docs.moralis.com/streams/webhooks/retries-and-replays
Recover missed Streams events by replaying blocks and streams, and understand how Moralis handles retries, failures, and recovery scenarios.
## Overview
Streams is designed for **reliable, real-time delivery**, but there are situations where events may need to be replayed or recovered.
Moralis provides **manual replay mechanisms** to help you recover missed webhooks caused by configuration changes, reload timing, or temporary failures.
***
## When Replays Are Needed
You may need to replay events if:
* A stream was reloading when a block was produced
* Addresses were added shortly before on-chain activity
* A webhook endpoint was temporarily unavailable
* A stream was paused or in an error state
* You are recovering from an incident or deployment issue
Replays allow you to **reprocess past blocks** and receive the webhooks that would have been delivered.
***
## Replay Block
The **Replay Block** feature reprocesses a specific block for a given stream.
When replayed:
* The block is re-evaluated against the stream configuration
* Matching events trigger webhooks again
* Webhooks are delivered as if the block just occurred
This is the most precise way to recover missed events.
***
### When to Use Block Replay
Use block replay when:
* You know the exact block number that was missed
* Only a small time window was affected
* You want to avoid duplicate data outside that block
***
## Replay Best Practices
* Always confirm the stream configuration before replaying
* Replays respect the **current** stream configuration
* Ensure your webhook handler is **idempotent**
* Avoid replaying large numbers of blocks unnecessarily
***
## Webhook Retries vs Replays
It’s important to distinguish between **automatic retries** and **manual replays**.
### Automatic retries
* Triggered when your webhook endpoint returns an error or times out
* Handled automatically by Moralis
* Occur shortly after the initial delivery attempt
* Do **not** require manual intervention
### Manual replays
* Triggered by you
* Used to recover missed events
* Can replay historical blocks
* Useful after configuration changes or outages
***
## Recovery After Stream Reloads
When addresses are added to a stream, a reload is required.
If activity occurs before the reload completes:
* The event may not trigger a webhook
* The block can be recovered using replay
This is a normal and expected edge case for dynamic address management.
***
## Recovery After Errors or Termination
* Streams in the `error` state stop delivering events
* Streams in the `terminated` state stop permanently
In both cases:
* Events occurring during downtime are not queued
* Replays can be used to recover missed blocks
* Terminated streams require creating a new stream before replaying
***
## Designing for Recovery
To make recovery safe and predictable:
* Treat webhook processing as **idempotent**
* Use transaction hashes + log indexes as unique identifiers
* Log replayed events separately if needed
* Avoid assuming delivery order
Streams prioritises **correctness over ordering**.
***
## What Cannot Be Recovered
Replays cannot recover:
* Events that occurred before a stream existed
* Events filtered out by stream configuration
* Events dropped intentionally (e.g. spam filtering)
***
## Summary
* Streams delivers events in real time, with retries
* Reloads and failures can cause missed events
* Block replay allows precise recovery
* Recovery is explicit and controlled
* Idempotent webhook handling is essential
# Test Webhooks
Source: https://docs.moralis.com/streams/webhooks/test-webhooks
Learn how Moralis uses test webhooks to validate your endpoint when creating or updating a stream, and how to handle them correctly.
## Overview
Whenever you **create or update a stream**, Moralis sends a **test webhook** to your configured webhook URL.
This test verifies that:
* Your endpoint is reachable
* Your server responds correctly
* Webhook delivery can safely begin
If the test webhook is **not acknowledged successfully**, the stream will **not start**.
***
## When Test Webhooks Are Sent
A test webhook is sent when you:
* Create a new stream
* Update an existing stream (e.g. webhook URL, filters, addresses, chains)
* Reactivate a paused stream
This happens **before** any real on-chain events are delivered.
***
## Required Response
To pass the test webhook:
* Your server **must return a 2xx HTTP status code**
* Common examples: `200`, `201`, `202`
Any non-2xx response will cause the test to fail.
No response body is required - only the status code matters.
***
## Test Webhook Payload
The test webhook uses the **same payload structure** as real webhooks, but contains **empty data**.
Example:
```javascript theme={null}
{
"confirmed": true,
"chainId": "",
"streamId": "",
"tag": "",
"retries": 0,
"block": {
"number": "",
"hash": "",
"timestamp": ""
},
"logs": [],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftTransfers": [],
"nftApprovals": {
"ERC721": [],
"ERC1155": []
},
"abi": {}
}
```
Important notes:
* No on-chain data is included
* No transactions or logs are present
* This payload **should not be persisted**
For full payload documentation, explore [Webhook Payload](/streams/webhooks/webhook-payloads).
***
## How to Handle Test Webhooks
Your webhook handler should:
1. Accept the request
2. Optionally log it
3. Return a 2xx response
4. Skip any application-specific processing
A simple approach is to:
* Detect empty payloads
* Short-circuit processing
***
## Security Considerations
Test webhooks:
* Include an `x-signature` header
* Should be verified the same way as real webhooks
For signature verification, explore [**Webhook Security**](/streams/security-and-reliability/webhook-security)**.**
***
## Common Pitfalls
### Stream does not start
Usually caused by:
* Webhook endpoint returning non-2xx
* Endpoint timing out
* Server not reachable from the internet
### Test webhook processed as real data
Avoid:
* Writing empty events to your database
* Triggering business logic on test payloads
***
## Relationship to Retries & Replays
Test webhooks:
* Are **not retried**
* Are **not stored in history**
* Cannot be replayed
[Retries and Replays](/streams/webhooks/retries-and-replays) apply only to **real event webhooks**.
***
## Next Steps
* Understand delivery guarantees → Explore [Webhook Delivery](/streams/webhooks/webhook-delivery)
* Inspect real payloads → Explore [Webhook Payload](/streams/webhooks/webhook-payloads)
* Secure your endpoint → Explore [Webhook Security](/streams/security-and-reliability/webhook-security)
* Handle failures and recovery → Explore [Error Handling](/streams/streams-concepts/error-handling)
# Webhook Delivery
Source: https://docs.moralis.com/streams/webhooks/webhook-delivery
Understand how Moralis reliably delivers blockchain events to your backend, including confirmation behavior, retries, ordering guarantees, and failure handling.
## Overview
Webhook Delivery explains **how Streams sends events to your backend**, from the moment an on-chain event occurs to when your server successfully processes it.
Moralis Streams is designed for **high reliability at scale**, handling retries, reorgs, confirmation logic, and backpressure automatically - so you can focus on building application logic.
This page covers *delivery behavior*. For payload structure, configuration, or retries, see the linked pages below.
***
## How Webhook Delivery Works
At a high level:
1. A block is produced on-chain
2. Streams detects matching events
3. Moralis sends a webhook to your endpoint
4. Delivery is retried automatically if it fails
5. Events are finalized once the block is confirmed
You do **not** need to poll or manage state manually.
To get started with creating streams, see:
* [**Create Your First Stream**](/streams/quickstart/create-your-first-stream)
***
## Confirmed vs Unconfirmed Webhooks
For most blockchain events, Streams delivers **two webhooks**:
### 1. Unconfirmed (`confirmed: false`)
* Sent as soon as the block is mined
* Low latency
* Block may still be reorganized
### 2. Confirmed (`confirmed: true`)
* Sent after sufficient confirmations
* Safe to persist as final state
This approach gives you **real-time responsiveness** without sacrificing correctness.
Edge case: In rare scenarios, a confirmed webhook may arrive before the unconfirmed one. Your system should handle both cases gracefully.
For chain-specific confirmation thresholds, see:
* [**Supported Chains**](/streams/supported-chains)
For how reorgs are handled internally:
* [**Re-org Handling**](/streams/streams-concepts/re-org-handling)
***
## Delivery Guarantees
Moralis provides **at-least-once delivery** for all webhooks.
This means:
* A webhook will be delivered **until your server acknowledges it**
* Failed deliveries are retried automatically
* Duplicate deliveries are possible (and expected)
Your webhook handler **must be idempotent**.
Read more about [Delivery Guarantees](/streams/security-and-reliability/delivery-guarantees).
***
## Automatic Retries
If your server fails to respond successfully:
* Streams retries delivery using an exponential backoff schedule
* Retries continue for up to **24 hours**
* Retry count is included in the payload
Retry behavior is automatic and requires no configuration.
Detailed retry schedules and replay options:
* [**Retries & Replays**](/streams/webhooks/retries-and-replays)
***
## Queueing & Backpressure
To protect system stability, Streams maintains an internal delivery queue per webhook URL.
Key points:
* If your server processes webhooks too slowly, events queue up
* The current queue size is sent in the `x-queue-size` response header
* If the queue reaches its limit, the stream may enter an error state
To avoid this:
* Ensure your webhook endpoint responds quickly
* Offload heavy processing to background workers
* Deploy streams in a region close to your backend
Read more about [Error Handling](/streams/streams-concepts/error-handling).
***
## Ordering Guarantees
Webhook delivery is **not strictly ordered**.
This can happen due to:
* Network retries
* Regional failover
* Confirmed vs unconfirmed delivery timing
You should **not assume ordering** and should always rely on:
* Transaction hash
* Log index
* Block number
* Confirmation state
Explore [Webhook Payload](/streams/webhooks/webhook-payloads) structure details.
***
## Failure States
Streams have multiple operational states:
| Status | Description |
| :----------- | :--------------------------------------------------------------- |
| `active` | Stream is live and delivering webhooks |
| `paused` | Stream is temporarily disabled |
| `error` | Stream encountered a configuration or delivery error |
| `terminated` | Stream was automatically stopped after 24 hours in `error` state |
Email notifications are sent when:
* A stream enters error state
* A stream is terminated
Read more about [Stream Lifecycle](/streams/streams-concepts/stream-lifecycle-and-management) details.
***
## Security & Verification
Every webhook includes an `x-signature` header.
You **must verify this signature** to ensure the payload originated from Moralis.
Signature verification is covered here [**Webhook Security**](/streams/security-and-reliability/webhook-security)**.**
***
## When to Use Replays
If your system was down or missed events:
* You can replay individual failed webhooks
* You can replay entire blocks for a stream
Replay tools are covered in [**Retries & Replays**](/streams/webhooks/retries-and-replays)**.**
***
## Common Next Steps
Depending on what you’re building:
* Want to understand the payload structure? Explore [Webhook Payload](/streams/webhooks/webhook-payloads)
* Need to handle retries or replays? Explore [Retries & Replays](/streams/webhooks/retries-and-replays)
* Debugging stream failures? Explore [Error Handling](/streams/streams-concepts/error-handling)
* Hardening security? Explore [Webhook Security](/streams/security-and-reliability/webhook-security)
# Webhook Payload
Source: https://docs.moralis.com/streams/webhooks/webhook-payloads
Understand the structure of Streams webhook payloads, including transactions, transfers, logs, confirmations, retries, and signature verification.
## Overview
Every Streams webhook delivers a **JSON payload** containing the on-chain events that match your stream configuration.
A single payload may include:
* Native transactions
* Internal transactions
* ERC-20 transfers and approvals
* NFT transfers and approvals
* Smart contract event logs
The exact contents depend on the options enabled when the stream was created.
***
## Top-Level Payload Structure
All webhook payloads share the same top-level fields:
```javascript theme={null}
{
"confirmed": false,
"chainId": "0x1",
"streamId": "uuid",
"tag": "string",
"retries": 0,
"block": { },
"logs": [],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftTransfers": [],
"nftApprovals": { "ERC721": [], "ERC1155": [] }
}
```
If you’re unfamiliar with any of these fields, see:
* [**Parsed Data**](/streams/streams-concepts/parsed-data)
* [**Advanced Options**](/streams/streams-concepts/advanced-options)
### Key Fields
| Field | Description |
| :------------ | :------------------------------- |
| `confirmed` | Whether the block is finalized |
| `chainId` | Chain the event occurred on |
| `streamId` | Unique stream identifier |
| `tag` | Optional stream tag |
| `retries` | Number of delivery attempts |
| `block` | Block metadata |
| `logs` | Raw smart contract logs |
| `txs` | Native transactions |
| `txsInternal` | Internal (contract) transactions |
***
## Confirmed vs Unconfirmed Events
Streams sends **two webhook payloads per event**:
1. **Unconfirmed (**`confirmed: false`**)**\
Sent as soon as the block is mined.
2. **Confirmed (**`confirmed: true`**)**\
Sent once finality is reached.
This design allows you to:
* React instantly to on-chain activity
* Safely update state once finality is guaranteed
For chain-specific confirmation rules, see [**Supported Chains**](/streams/supported-chains).
For how reorgs are handled, see [**Re-org Handling**](/streams/streams-concepts/re-org-handling).
***
## Verifying Webhook Authenticity
Every webhook includes an `x-signature` header.
You **must verify this signature** to ensure the payload originated from Moralis.
Signature verification is covered in detail here:
* [**Webhook Security**](/streams/security-and-reliability/webhook-security)
Basic flow:
1. Read the raw request body
2. Hash it together with your Streams secret
3. Compare against `x-signature`
***
## Native Transactions (`txs`)
Included when `includeNativeTxs` is enabled.
Native transactions include:
* Sender and recipient
* Value transferred
* Gas usage and receipt fields
These are useful for:
* Wallet balance tracking
* Payment monitoring
* Base-layer activity analysis
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x1",
"abi": [],
"streamId": "c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17",
"tag": "native_transactions",
"retries": 0,
"block": {
"number": "15988759",
"hash": "0x3aa07bd98e328db97ec273ce06b3a15fc645931fbd26337fe20c48b274277f76",
"timestamp": "1668676247"
},
"logs": [],
"txs": [
{
"hash": "0xd68700a0e2abd9c041eb236812e4194bf91c8182a2b03065887ab0f33d5c2958",
"gas": "149200",
"gasPrice": "13670412399",
"nonce": "57995",
"input": "0xf78dc253000000000000000000000000d9408f29026e32852aff8c5c9c8ea834b44b4e1c000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000109fad200000000000000000000000000000000000000000000009ab31572a589a72a11900000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340a5c475167f03b1556c054e0da78192cd2779087fcfee7c08",
"transactionIndex": "52",
"fromAddress": "0x839d4641f97153b0ff26ab837860c479e2bd0242",
"toAddress": "0x1111111254eeb25477b68fb85ed929f73a960582",
"value": "0",
"type": "2",
"v": "1",
"r": "46904304245026065492026869531757792493071866863221741878090753056388581469881",
"s": "17075445080437932806356212399757328600893345374993510540712828450455909549452",
"receiptCumulativeGasUsed": "3131649",
"receiptGasUsed": "113816",
"receiptContractAddress": null,
"receiptRoot": null,
"receiptStatus": "1"
}
],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## Contract Logs (`logs`)
Included when `includeContractLogs` is enabled.
Logs contain:
* Raw topics and data
* Emitting contract address
* Transaction hash and log index
Logs are automatically decoded into higher-level objects when applicable (see below).
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x1",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "reserve0",
"type": "uint112"
},
{
"indexed": false,
"name": "reserve1",
"type": "uint112"
}
],
"name": "Sync",
"type": "event"
}
],
"streamId": "6378fe38-54c7-4816-8d61-fca8e128e260",
"tag": "test_events",
"retries": 1,
"block": {
"number": "15984246",
"hash": "0x7f8d8285b572a60f6a14d5f1dcbd40e487ccffd9ec78f8dfbccb49aa191fbb95",
"timestamp": "1668621827"
},
"logs": [
{
"logIndex": "320",
"transactionHash": "0xf1682fa49b83689093b467ac6937785102895fc3ba418624c28d04f9af6e5e2b",
"address": "0x4cd36d6f32586177e36179a810595a33163a20bf",
"data": "0x00000000000000000000000000000000000000000000944ad388817e590ab6070000000000000000000000000000000000000000000000000000008a602de18e",
"topic0": "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1",
"topic1": null,
"topic2": null,
"topic3": null
}
],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## ERC-20 Transfers
ERC-20 transfers are **automatically decoded** from logs and included at no additional cost.
Each transfer includes:
* `from`, `to`, `value`
* Token metadata (`name`, `symbol`, `decimals`)
* Human-readable `valueWithDecimals`
Transfers appear in both confirmed and unconfirmed payloads.
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x5",
"abi": [],
"streamId": "c4cf9b1a-0cb3-4c79-9ca3-04f11856c555",
"tag": "ChrisWallet",
"retries": 0,
"block": {
"number": "8037952",
"hash": "0x607ff512f17f890bf9ee6206e2029cd8530819ab72b2b9161f9b90d18ece8e03",
"timestamp": "1669667244"
},
"logs": [
{
"logIndex": "132",
"transactionHash": "0x1642a3b9b39e63d7fe571e7c22b80a5b059d2647fe4866d3f7105630f822d833",
"address": "0x0041ebd11f598305d401cc1052df49219630ab79",
"data": "0x0000000000000000000000000000000000000000000069e10006afc3291c0000",
"topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"topic1": "0x0000000000000000000000000a46413965858a6ac4ed5184d7643dc055a4fea3",
"topic2": "0x000000000000000000000000e496601436da37a045d8e88bbd6b2c2e17d8fe33",
"topic3": null
}
],
"txs": [
{
"hash": "0x1642a3b9b39e63d7fe571e7c22b80a5b059d2647fe4866d3f7105630f822d833",
"gas": "85359",
"gasPrice": "6129141152",
"nonce": "88",
"input": "0xa9059cbb000000000000000000000000e496601436da37a045d8e88bbd6b2c2e17d8fe330000000000000000000000000000000000000000000069e10006afc3291c0000",
"transactionIndex": "49",
"fromAddress": "0x0a46413965858a6ac4ed5184d7643dc055a4fea3",
"toAddress": "0x0041ebd11f598305d401cc1052df49219630ab79",
"value": "0",
"type": "2",
"v": "1",
"r": "86947778944630951418310264989677611886333891146913483133255814972120449355054",
"s": "7019311275916215306620036726907048105130260362064080269753410507440852031640",
"receiptCumulativeGasUsed": "11882265",
"receiptGasUsed": "56906",
"receiptContractAddress": null,
"receiptRoot": null,
"receiptStatus": "1"
}
],
"txsInternal": [],
"erc20Transfers": [
{
"transactionHash": "0x1642a3b9b39e63d7fe571e7c22b80a5b059d2647fe4866d3f7105630f822d833",
"logIndex": "132",
"contract": "0x0041ebd11f598305d401cc1052df49219630ab79",
"from": "0x0a46413965858a6ac4ed5184d7643dc055a4fea3",
"to": "0xe496601436da37a045d8e88bbd6b2c2e17d8fe33",
"value": "499999000000000000000000",
"tokenName": "Example Token",
"tokenSymbol": "Token",
"tokenDecimals": "18",
"possibleSpam": false,
"valueWithDecimals": "499999"
}
],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## ERC-20 Approvals
ERC-20 approvals are also automatically decoded and include:
* Owner and spender
* Approved amount
* Token metadata
**Example:**
```javascript expandable theme={null}
{
"confirmed": true,
"chainId": "0x1",
"abi": [],
"streamId": "c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17",
"tag": "native_transactions_with_logs",
"retries": 0,
"block": {
"number": "15988780",
"hash": "0xf40d623518fa16c20614278656e426721820031913fd9c670330d4b2b751d50e",
"timestamp": "1668676499"
},
"logs": [
{
"logIndex": "135",
"transactionHash": "0x59cd370a41c699bdb77a020b3a27735bb7442ace68ec8313040b8b9ee2672244",
"address": "0x96beaa1316f85fd679ec49e5a63dacc293b044be",
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"topic0": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"topic1": "0x0000000000000000000000001748789703159580520cc2ce6d1ba01e7359c44c",
"topic2": "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582",
"topic3": null
}
],
"txs": [
{
"hash": "0x0bd4d05cfee0107ac69f7add8e21d66c3e4fd014b7aad595d6336910a6bfee39",
"gas": "109803",
"gasPrice": "13481860832",
"nonce": "291",
"input": "0x12aa3caf00000000000000000000000053222470cdcfb8081c0e3a50fd106f0d69e63f20000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000053222470cdcfb8081c0e3a50fd106f0d69e63f200000000000000000000000003ec92c9d09403a76bda445ffdfaf6de59717219f00000000000000000000000000000000000000000000000e56d1e2316582742700000000000000000000000000000000000000000000000e53262757bf439a6f0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000006200003c4121c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200042e1a7d4d0000000000000000000000000000000000000000000000000000000000000000e0201111111254eeb25477b68fb85ed929f73a960582000000000000000e56d1e23165827427e26b9977",
"transactionIndex": "92",
"fromAddress": "0x3ec92c9d09403a76bda445ffdfaf6de59717219f",
"toAddress": "0x1111111254eeb25477b68fb85ed929f73a960582",
"value": "0",
"type": "2",
"v": "0",
"r": "5776335037912114053229884461119750189570811705028494471955321961511802532800",
"s": "50481622078880425443801093626517935308993319586804232237135731552994210947860",
"receiptCumulativeGasUsed": "7225224",
"receiptGasUsed": "70168",
"receiptContractAddress": null,
"receiptRoot": null,
"receiptStatus": "1"
}
],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [
{
"transactionHash": "0x59cd370a41c699bdb77a020b3a27735bb7442ace68ec8313040b8b9ee2672244",
"logIndex": "135",
"contract": "0x96beaa1316f85fd679ec49e5a63dacc293b044be",
"owner": "0x1748789703159580520cc2ce6d1ba01e7359c44c",
"spender": "0x1111111254eeb25477b68fb85ed929f73a960582",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"tokenName": "This Is Not Alpha",
"tokenSymbol": "TINA",
"tokenDecimals": "18",
"valueWithDecimals": "1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+59"
}
],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## NFT Transfers
NFT transfers are automatically decoded for both ERC-721 and ERC-1155 tokens.
Each NFT transfer includes:
* `tokenName`: the name of the NFT
* `tokenSymbol`: the symbol of the NFT (only for [ERC721](https://eips.ethereum.org/EIPS/eip-721))
* `tokenContractType`: the type of the NFT (either [ERC721](https://eips.ethereum.org/EIPS/eip-721) or [ERC1155](https://eips.ethereum.org/EIPS/eip-1155))
* `to`: the receiver address of the NFT transfer
* `from`: the sender address of the NFT transfer
* `amount`: the amount of NFT transferred in the transaction (`1` for [ERC721](https://eips.ethereum.org/EIPS/eip-721))
* `transactionHash`: the transaction hash of the NFT transfer on the blockchain
* `tokenId`: the token ID of the NFT transferred
* `operator`: a third party address that has been approved to manage NFTs owned by `from` address. You can read more about operator in the [EIP1155 standard](https://eips.ethereum.org/EIPS/eip-1155).
* `contract`: the contract address of the NFT transferred
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x13881",
"abi": [],
"streamId": "c4cf9b1a-0cb3-4c79-9ca3-04f11856c555",
"tag": "ChrisWallet",
"retries": 0,
"block": {
"number": "29381772",
"hash": "0xdd64099df718e2a439a9805d25a3ab88e943a8c713f2259d9777460d7051572c",
"timestamp": "1669640635"
},
"logs": [
{
"logIndex": "72",
"transactionHash": "0x5ecd6b57593ab2f4f3e39fbb3318a3933e2cf9fdcf5b7ca671fb0fc2ce9dc4b5",
"address": "0x26b4e79bca1a550ab26a8e533be97c40973b2671",
"data": "0x",
"topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"topic1": "0x00000000000000000000000074f64bebb1a9615fc7c2ead9c894b6ffd1803582",
"topic2": "0x000000000000000000000000e496601436da37a045d8e88bbd6b2c2e17d8fe33",
"topic3": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": [
{
"operator": null,
"from": "0x74f64bebb1a9615fc7c2ead9c894b6ffd1803582",
"to": "0xe496601436da37a045d8e88bbd6b2c2e17d8fe33",
"tokenId": "0",
"amount": "1",
"transactionHash": "0x5ecd6b57593ab2f4f3e39fbb3318a3933e2cf9fdcf5b7ca671fb0fc2ce9dc4b5",
"logIndex": "72",
"contract": "0x26b4e79bca1a550ab26a8e533be97c40973b2671",
"possibleSpam": false,
"tokenName": "Test",
"tokenSymbol": "SYMBOL",
"tokenContractType": "ERC721"
}
]
}
```
***
## NFT Approvals
Approval events for ERC-721 and ERC-1155 tokens are grouped under `nftApprovals` and decoded automatically.
***
## Smart Contract Events Only
If you configure a stream to listen only to specific contract events:
* Only `logs` will be populated
* ABI decoding is applied using the ABI you provide
* No token or transaction arrays are included unless explicitly enabled
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x1",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "reserve0",
"type": "uint112"
},
{
"indexed": false,
"name": "reserve1",
"type": "uint112"
}
],
"name": "Sync",
"type": "event"
}
],
"streamId": "6378fe38-54c7-4816-8d61-fca8e128e260",
"tag": "test_events",
"retries": 1,
"block": {
"number": "15984246",
"hash": "0x7f8d8285b572a60f6a14d5f1dcbd40e487ccffd9ec78f8dfbccb49aa191fbb95",
"timestamp": "1668621827"
},
"logs": [
{
"logIndex": "320",
"transactionHash": "0xf1682fa49b83689093b467ac6937785102895fc3ba418624c28d04f9af6e5e2b",
"address": "0x4cd36d6f32586177e36179a810595a33163a20bf",
"data": "0x00000000000000000000000000000000000000000000944ad388817e590ab6070000000000000000000000000000000000000000000000000000008a602de18e",
"topic0": "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1",
"topic1": null,
"topic2": null,
"topic3": null
}
],
"txs": [],
"txsInternal": [],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## Internal Transactions (`txsInternal`)
Internal transactions represent value transfers occurring **inside contract execution**.
Included when `includeInternalTxs` is enabled.
Useful for:
* DeFi protocol tracing
* Understanding internal fund movement
* Advanced analytics
**Example:**
```javascript expandable theme={null}
{
"confirmed": false,
"chainId": "0x1",
"abi": [],
"streamId": "c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17",
"tag": "internal transactions",
"retries": 0,
"block": {
"number": "15988462",
"hash": "0xa4520ca85758374d05c31f6e6869f081997daa6e6b18449d49cfac4558f9e7f8",
"timestamp": "1668672659"
},
"logs": [],
"txs": [],
"txsInternal": [
{
"from": "0x1111111254eeb25477b68fb85ed929f73a960582",
"to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"value": "11000000000000000",
"gas": "117885",
"transactionHash": "0x0e5c3114c0ee7d29cca17aa0b8e790c4d7d25b4789bd14150f113956b5ce94de"
}
],
"erc20Transfers": [],
"erc20Approvals": [],
"nftApprovals": {
"ERC1155": [],
"ERC721": []
},
"nftTransfers": []
}
```
***
## Retry Metadata
If a webhook delivery fails:
* `retries` increments
* The event is retried automatically
* Failed deliveries are retained for replay (plan-dependent)
See [**Retries & Replays**](/streams/webhooks/retries-and-replays) for full recovery behavior.
***
## Common Next Steps
Depending on what you’re building:
* Need cleaner decoded data? Explore [Parsed Data](/streams/streams-concepts/parsed-data)
* Need fine-grained filtering? Explore [Filters](/streams/streams-concepts/filters)
* Need on-chain lookups inside webhooks? Explore [Triggers](/streams/streams-concepts/triggers)
* Handling high throughput? Explore [Rate Limits](/streams/streams-concepts/rate-limits)