Actions19
- Block Actions
- DeFi Actions
- NFT Actions
- Token Actions
- Transaction Actions
- Wallet Actions
Block → Get Block
AI-generatedOverview
This node interacts with the Moralis Web3 API to retrieve detailed information about a specific blockchain block. It supports querying a block by its number or the keyword "latest" across multiple supported blockchains such as Ethereum, Arbitrum, Avalanche, and others. This is useful for blockchain developers, analysts, or enthusiasts who need to fetch block data for monitoring, analysis, or integration into decentralized applications.
Use Case Examples
- Fetch details of block number 123456 on the Ethereum blockchain.
- Retrieve the latest block information on the Polygon blockchain.
Properties
| Name | Meaning |
|---|---|
| Chain | The blockchain network to query, e.g., Ethereum, Polygon, BSC, etc. |
| Block Number | The block number to retrieve information for, or the keyword "latest" to get the most recent block. |
| Additional Fields | Optional parameters to customize the request such as limit, cursor for pagination, whether to include metadata, and the number format (decimal or hex). |
Output
JSON
json- The JSON response containing block information from the Moralis API, including block details, operation type, resource type, blockchain chain, and a timestamp of the query.
Dependencies
- Moralis Web3 API with an API key credential
Troubleshooting
- Common issues include invalid or missing API key, incorrect block number format, or unsupported chain selection.
- Errors may occur if the block number does not exist or if the API rate limit is exceeded.
- Ensure the block number is valid and the chain parameter matches a supported blockchain.
Links
- Moralis Web3 API - Block Endpoint - Official documentation for the Moralis API block endpoints, detailing parameters and response structure.