Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with a cryptocurrency API service to fetch various types of crypto-related data. Specifically, for the "Market Data & Prices" resource and the "Get Exchange Rate By Assets IDs" operation, it retrieves the exchange rate between two specified crypto assets identified by their asset IDs. This is useful in scenarios where you need to programmatically obtain real-time or historical exchange rates between cryptocurrencies or tokens.

Practical examples include:

  • Converting portfolio values from one crypto asset to another.
  • Displaying current exchange rates on a dashboard.
  • Automating trading strategies that depend on asset price conversions.
  • Historical analysis of exchange rates at specific timestamps.

Properties

Name Meaning
fromAssetId The asset ID of the source cryptocurrency or token from which to convert.
toAssetId The asset ID of the target cryptocurrency or token to which to convert.
context (Optional) Additional context information for the exchange rate request.
calculationTimestamp (Optional) A UNIX timestamp (number) specifying the exact time for which to get the exchange rate.

Output

The node outputs JSON data representing the exchange rate information between the specified assets. The structure typically includes fields such as the exchange rate value, the involved asset IDs, and possibly metadata like timestamps or context details.

If binary data were returned (not indicated here), it would represent raw data files or media related to the exchange rate, but this operation focuses on JSON-formatted numeric and descriptive data.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • Relies on the presence of a local JSON specification file (2024-12-12-final.json) bundled with the node for operation metadata (this is internal and managed by the node).

Troubleshooting

  • Common issues:

    • Missing or invalid asset IDs will cause the API request to fail.
    • Incorrect or expired API credentials will result in authentication errors.
    • Providing an invalid timestamp format may lead to unexpected results or errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "Operation <operationName> not found": Indicates the requested operation is not defined; ensure the correct operation name is selected.
    • API errors returned from the external service will be passed through; check the error message for details such as invalid parameters or rate limits.
  • Resolutions:

    • Verify all required input properties are correctly set.
    • Confirm API credentials are valid and have necessary permissions.
    • Use proper UNIX timestamp format if specifying calculationTimestamp.
    • Check network connectivity and retry if transient errors occur.

Links and References

Discussion