Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node integrates with a blockchain events API to listen for new blocks on specified blockchains and networks. It is designed to trigger workflows when a new block is detected, enabling automation based on blockchain activity.

Common scenarios include:

  • Monitoring blockchain networks for new blocks to update databases or dashboards.
  • Triggering alerts or notifications when new blocks are mined.
  • Initiating downstream processes such as transaction analysis or asset tracking upon block creation.

For example, you can configure the node to watch the Ethereum mainnet and automatically process data whenever a new block is added, helping keep your application synchronized with the blockchain state.

Properties

Name Meaning
blockchain The blockchain network to monitor (e.g., Ethereum, Bitcoin).
network The specific network within the blockchain (e.g., mainnet, testnet).
context Optional string to provide additional context or metadata for the event subscription.
JSON Body A collection of optional parameters:
- allowDuplicates Boolean flag to allow duplicate event notifications.
- callbackSecretKey Secret key used to secure callbacks from the blockchain event service.
- callbackUrl URL to which the blockchain event notifications will be sent.

Output

The node outputs JSON data representing the details of the newly detected block. This typically includes block metadata such as block number, hash, timestamp, and other relevant blockchain-specific information.

If configured with a callback URL, the node may also handle incoming webhook data corresponding to new block events.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The node reads a local OpenAPI specification file (2024-12-12-final.json) bundled with the node for operation definitions.
  • Network access to the blockchain event service endpoints is necessary.

Troubleshooting

  • Operation not found error: If the node throws an error stating that the operation was not found, ensure that the selected Resource and Operation are valid and supported by the current version of the node.
  • Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Invalid parameters: Double-check required properties like blockchain and network are provided and correctly spelled.
  • Callback URL issues: If using a callback URL, ensure it is publicly accessible and properly secured if a secret key is used.
  • Duplicate events: If receiving duplicate block events, consider setting the allowDuplicates property accordingly.

Links and References

Discussion