Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with the Crypto APIs REST API to retrieve blockchain-related data. Specifically, for the "addresses-latest" resource and the "Get Address Balance Kaspa" operation, it fetches the balance of a given Kaspa address on a specified network. This is useful in scenarios where users want to monitor wallet balances programmatically, integrate balance checks into workflows, or trigger actions based on balance changes.

Practical examples include:

  • Automatically checking the balance of a Kaspa wallet before initiating a transaction.
  • Monitoring multiple addresses for balance updates in portfolio management tools.
  • Integrating balance retrieval into alerting systems for cryptocurrency holdings.

Properties

Name Meaning
network The blockchain network to query (e.g., mainnet, testnet).
address The Kaspa wallet address whose balance is to be retrieved.
context Optional additional context parameter for the request (usage depends on API specifics).

Output

The node outputs JSON data representing the balance information of the specified Kaspa address on the chosen network. The exact structure depends on the API response but typically includes fields such as confirmed balance, unconfirmed balance, and possibly other metadata related to the address state.

If the API supports binary data for this operation (not indicated here), it would be summarized accordingly; however, this operation primarily returns JSON data.

Dependencies

  • Requires an active connection to the Crypto APIs REST API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The node reads from a local OpenAPI specification file (2024-12-12-final.json) bundled with the node to dynamically resolve API paths and parameters.

Troubleshooting

  • Common issues:

    • Incorrect or missing network or address parameters will cause the API call to fail.
    • Network connectivity problems or invalid API credentials will result in authentication or connection errors.
    • If the operation ID is not found in the specification file, the node throws an error indicating the operation was not found.
  • Error messages:

    • Operation <operationName> not found: Indicates the requested operation does not exist in the loaded API spec. Verify the operation name and resource selection.
    • API errors returned from Crypto APIs are passed through; check the error message for details such as invalid address format or unsupported network.
  • Resolution tips:

    • Ensure all required parameters (network, address) are correctly set.
    • Confirm that the API key credential is valid and has necessary permissions.
    • Check network connectivity and endpoint availability.

Links and References

Discussion