Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with a comprehensive Crypto APIs REST API to fetch blockchain-related data. Specifically, for the "blockchain-fees" resource and the "Get EIP 1559 Fee Recommendations EVM" operation, it retrieves recommended Ethereum transaction fees based on the EIP-1559 standard for a specified EVM-compatible blockchain network.

This is useful when you want to programmatically obtain current gas fee recommendations to optimize transaction costs and confirmation times on Ethereum or other EVM chains. For example, before sending a transaction, you can use this node to get suggested base fees and priority fees to set in your transaction, ensuring timely processing without overpaying.

Properties

Name Meaning
network The specific EVM-compatible network (e.g., Ethereum mainnet, Polygon) to query fees for.
blockchain The blockchain identifier within the Crypto APIs ecosystem (e.g., "ethereum").
context Optional string to provide additional context or metadata for the request.

Output

The node outputs JSON data containing the EIP-1559 fee recommendations for the specified network. This typically includes fields such as:

  • Suggested base fee per gas unit.
  • Recommended max priority fee per gas.
  • Other relevant fee parameters to construct an EIP-1559 compliant transaction.

The output is structured as an array of JSON objects, each representing the fee recommendation response from the API.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API key credential configured in n8n to authenticate requests.
  • Relies on the bundled OpenAPI specification file (2024-12-12-final.json) for operation definitions.
  • Uses 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, ensure that the "operation" parameter is correctly set to "Get EIP 1559 Fee Recommendations EVM" and that the bundled OpenAPI spec file is present and unmodified.
  • Invalid Network or Blockchain: Providing incorrect or unsupported values for network or blockchain may result in API errors or empty responses. Verify these inputs against supported networks in Crypto APIs.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Confirm that the API key credential is properly configured in n8n.
  • API Rate Limits or Downtime: If requests fail intermittently, check for rate limiting or service availability issues on the Crypto APIs side.

Links and References

Discussion