Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node integrates with a Crypto APIs REST API to listen for blockchain events, specifically the "Mined Transaction" event under the "blockchain-events" resource. It allows users to subscribe or query for notifications when a particular transaction is mined on a specified blockchain network.

Common scenarios include:

  • Monitoring specific transactions to confirm when they are included in a block.
  • Triggering workflows based on the confirmation of blockchain transactions.
  • Automating responses or alerts once a transaction is mined.

For example, a user might configure this node to watch for a Bitcoin transaction ID and receive data once that transaction is confirmed on the Bitcoin mainnet.

Properties

Name Meaning
blockchain The blockchain network to monitor (e.g., Bitcoin, Ethereum).
network The specific network within the blockchain (e.g., mainnet, testnet).
context Optional string to pass additional context or metadata with the request.
JSON Body A collection of optional parameters:
- allowDuplicates Boolean flag to allow duplicate event notifications.
- callbackSecretKey Secret key used to secure callback requests.
- callbackUrl URL to which the event notification will be sent via webhook.
- transactionId The specific transaction ID to monitor for being mined.

Output

The node outputs JSON data representing the response from the Crypto APIs service regarding the mined transaction event subscription or query. This typically includes details about the transaction status, blockchain confirmations, and any metadata returned by the API.

If configured with a callback URL, the node facilitates receiving asynchronous webhook notifications about the mined transaction event.

No binary data output is involved.

Dependencies

  • Requires an active connection to the Crypto APIs REST API.
  • 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.
  • No other external dependencies beyond standard Node.js modules and n8n workflow helpers.

Troubleshooting

  • Operation Not Found Error: If the node throws an error stating the operation is not found, ensure the selected operation matches exactly "Mined Transaction" under the "blockchain-events" resource.
  • Missing Required Parameters: The blockchain and network properties are required; missing these will cause errors.
  • Invalid Callback URL or Secret: If using webhooks, verify the callback URL is reachable and the secret key matches expected values to avoid failed webhook deliveries.
  • API Authentication Issues: Ensure the API key credential is valid and has permissions to access blockchain event subscriptions.
  • Duplicate Events: If duplicate notifications are received, consider setting the allowDuplicates flag appropriately.

Links and References

Discussion