Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with the Crypto APIs REST API to estimate the smart fee for a blockchain transaction based on UTXOs (Unspent Transaction Outputs). It is useful when you want to dynamically calculate the recommended transaction fee to ensure timely confirmation on a specified blockchain network. For example, if you are building a wallet or payment system that needs to set appropriate fees for Bitcoin or other UTXO-based blockchains, this node helps by providing fee estimates according to current network conditions and user preferences.

Properties

Name Meaning
blockchain The blockchain network to query (e.g., Bitcoin, Litecoin).
network The specific network environment (e.g., mainnet, testnet) of the selected blockchain.
context Optional context string to correlate or identify the request.
confirmationTarget Optional number indicating the desired number of blocks within which the transaction should confirm.
estimateMode Optional mode for fee estimation; can be either "economical" (lower fee, slower confirmation) or "conservative" (higher fee, faster confirmation).

Output

The node outputs JSON data representing the estimated smart fee details returned from the Crypto APIs service. This typically includes fee rates and related metadata necessary to construct a transaction with an appropriate fee. The output is structured as an array of JSON objects, each corresponding to one input item processed.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Crypto APIs REST API.
  • Requires an API key credential configured in n8n to authenticate requests.
  • Uses a local OpenAPI specification file (2024-12-12-final.json) bundled with the node to map operations and parameters.
  • Relies on internal helper functions to perform HTTP requests to the Crypto APIs endpoints.

Troubleshooting

  • Operation not found error: If the node throws an error stating the operation was not found, verify that the selected Resource and Operation are valid and supported by the installed version of the node.
  • Missing required parameters: Ensure all required properties such as blockchain and network are provided; missing these will cause request failures.
  • API authentication errors: Confirm that the API key credential is correctly configured and has sufficient permissions.
  • Network or connectivity issues: Check internet connectivity and Crypto APIs service status if requests time out or fail.
  • Invalid parameter values: Providing unsupported values for estimateMode or invalid numbers for confirmationTarget may result in API errors.

Links and References

Discussion