DecentralChain (DCC) icon

DecentralChain (DCC)

Create, sign and broadcast DecentralChain transactions, plus query blockchain data

Overview

This node interacts with the DecentralChain Matcher API to manage asset rates among other blockchain-related operations. Specifically, the Delete Asset Rate operation under the Matcher resource allows users to delete a previously set rate for a given asset on the matcher service.

Typical use cases include:

  • Removing outdated or incorrect exchange rate information for an asset.
  • Managing asset pricing data in decentralized trading environments.
  • Automating cleanup of asset rates as part of broader blockchain asset management workflows.

For example, if you have set a custom rate for an asset and want to remove it from the matcher’s settings, this operation will send a DELETE request to the matcher API to delete that asset rate.

Properties

Name Meaning
Base URL Base URL to use for general API requests when no credential is supplied (default: https://nodes.decentralchain.io).
Matcher Base URL Base URL specifically for the Matcher API requests, used if no matcher credential is supplied (default: https://mainnet-matcher.decentralchain.io).
Asset ID The identifier of the asset whose rate you want to delete from the matcher settings. This is required.

Output

The output JSON contains the response from the Matcher API after attempting to delete the asset rate. It includes:

  • The HTTP response body returned by the matcher endpoint for deleting the asset rate.
  • A debug object providing metadata about the operation such as:
    • Operation name (deleteAssetRate)
    • Endpoint path used
    • Asset ID targeted
    • Matcher base URL used
    • Timestamp of the request

Example output structure:

{
  "...": "API response fields",
  "debug": {
    "operation": "deleteAssetRate",
    "endpoint": "/matcher/settings/rates/{assetId}",
    "assetId": "the-asset-id",
    "matcherBaseUrl": "https://mainnet-matcher.decentralchain.io",
    "timestamp": "2024-06-xxTxx:xx:xx.xxxZ"
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires access to the DecentralChain Matcher API endpoint.
  • Optionally uses credentials for authentication; if not provided, falls back to configured base URLs.
  • Requires network connectivity to the specified matcher base URL.
  • No additional external libraries beyond those bundled with the node are needed for this operation.

Troubleshooting

  • Common issues:

    • Incorrect or missing Asset ID will cause the API call to fail.
    • Network connectivity problems to the matcher base URL.
    • Authentication failures if credentials are required but not properly configured.
    • Invalid base URLs or typos in URLs can lead to request errors.
  • Error messages:

    • "Invalid JSON in Cancel JSON" — Not applicable here but seen in other matcher operations involving JSON input.
    • HTTP error responses from the matcher API will be surfaced in the node output.
    • "Attachment is not valid base58" or "Attachment exceeds 140 bytes" errors relate to other operations and do not apply here.
  • Resolution tips:

    • Verify the Asset ID is correct and exists on the matcher.
    • Check network access and base URL correctness.
    • Ensure any required API tokens or credentials are correctly set up.
    • Use the debug output to inspect request details and timestamps for troubleshooting.

Links and References


This summary focuses exclusively on the Matcher > Delete Asset Rate operation as requested, based on static analysis of the provided source code and property definitions.

Discussion