Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node interacts with a cryptocurrency market data API to retrieve exchange rates between two specified asset symbols. It is useful for workflows that require real-time or historical currency conversion rates between cryptocurrencies or tokens. For example, you can use it to convert Bitcoin (BTC) prices into Ethereum (ETH) or any other supported asset symbol, optionally specifying the context or a timestamp for the rate calculation.

Properties

Name Meaning
fromAssetSymbol The symbol of the source asset (e.g., BTC). Required.
toAssetSymbol The symbol of the target asset to convert to (e.g., ETH). Required.
context Optional string to specify additional context for the exchange rate retrieval.
calculationTimestamp Optional UNIX timestamp (number) to get the exchange rate at a specific point in time.

Output

The node outputs JSON data representing the exchange rate information retrieved from the API. The exact structure depends on the API response but typically includes fields such as the exchange rate value, timestamps, and possibly metadata about the assets involved.

If the API supports binary data output (not indicated here), it would be summarized accordingly, but this node primarily returns JSON-formatted exchange rate data.

Dependencies

  • Requires an API key credential for authenticating with the Crypto APIs REST API.
  • The node reads a local OpenAPI specification file (2024-12-12-final.json) bundled with the node to dynamically configure operations.
  • Uses internal helper functions to make HTTP requests to the Crypto APIs service.

Troubleshooting

  • Operation Not Found Error: If the specified operation is not found in the API spec, ensure the "operation" parameter matches exactly one of the available operations for the selected resource.
  • Missing Required Parameters: Both fromAssetSymbol and toAssetSymbol are required; missing these will cause errors.
  • Invalid Timestamp: Providing an invalid or out-of-range calculationTimestamp may result in no data or errors.
  • API Authentication Errors: Ensure the API key credential is correctly configured and has sufficient permissions.
  • Network Issues: Connectivity problems to the Crypto APIs service will cause request failures.

Links and References

Discussion