Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with a blockchain data API to retrieve detailed information about a specific block on an EVM-compatible blockchain by its block height. It is useful for scenarios where users need to fetch historical or current block details such as transactions, timestamp, miner info, and other metadata associated with a particular block number.

Practical examples include:

  • Monitoring blockchain activity at a certain block height.
  • Auditing or verifying transactions included in a specific block.
  • Building analytics dashboards that display block-level data.
  • Triggering workflows based on the confirmation of blocks at given heights.

Properties

Name Meaning
blockchain The blockchain network to query (e.g., Ethereum, Binance Smart Chain).
network The specific network environment within the blockchain (e.g., mainnet, testnet).
blockHeight The numeric height (block number) of the block whose details are to be retrieved.
context Optional string to correlate or label the request context for tracking or logging.

Output

The node outputs JSON data representing the detailed information of the requested block. This typically includes fields such as block hash, parent hash, timestamp, list of transactions, miner address, gas used, and other relevant block metadata depending on the blockchain queried.

If the API supports binary data for any field (not evident here), it would be summarized accordingly, but this node primarily returns structured JSON data.

Dependencies

  • Requires an API key credential for authenticating requests to the Crypto APIs REST API service.
  • The node reads from a local OpenAPI specification file (2024-12-12-final.json) bundled with the node to dynamically configure operations and parameters.
  • Uses internal helper functions to make HTTP requests to the Crypto APIs endpoints.

Troubleshooting

  • Operation Not Found Error: If the specified operation is not found in the API spec, ensure the operation name matches exactly and the node version is up to date.
  • Invalid Block Height: Providing a non-existent or out-of-range block height may result in errors or empty responses. Verify the block height exists on the selected blockchain and network.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Confirm that the API key credential is correctly configured in n8n.
  • Network or Blockchain Mismatch: Ensure the blockchain and network properties correspond to supported values by the API; otherwise, the request may fail.
  • Continue On Fail: If enabled, errors during execution will be returned as error objects in the output JSON instead of stopping the workflow.

Links and References

Discussion