DecentralChain (DCC)
Actions36
- Account Actions
- Matcher Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node interacts with the DecentralChain (DCC) blockchain ecosystem, specifically focusing on the "Matcher" resource's "Get Order Book Restrictions" operation. It retrieves trading restrictions and limits for a given asset pair from the Matcher API, which is responsible for managing decentralized exchange order books.
Typical use cases include:
- Fetching order book constraints before placing orders to ensure compliance with market rules.
- Automating trading strategies that need to respect minimum/maximum order sizes or price increments.
- Monitoring market conditions and restrictions programmatically.
For example, a trader might use this node to get the allowed minimum and maximum order amounts for a DCC/DCC trading pair before submitting a limit order.
Properties
| Name | Meaning |
|---|---|
| Base URL | Base URL of the DCC node API used if no credential is supplied. |
| Matcher Base URL | Base URL for the Matcher API; used if no matcher-specific credential is supplied. |
| Amount Asset | The asset ID or symbol (e.g., 'DCC') representing the amount asset in the trading pair. |
| Price Asset | The asset ID or symbol (e.g., 'DCC') representing the price asset in the trading pair. |
Output
The output JSON contains the order book restrictions information for the specified asset pair. This typically includes details such as:
- Minimum and maximum order amounts allowed.
- Price step increments.
- Other trading constraints imposed by the matcher for the pair.
Additionally, the output includes a debug object with metadata about the request, including:
- Operation name (
getOrderBookRestrictions) - API endpoint called
- Provided parameters (
amountAsset,priceAsset) - Matcher base URL used
- Timestamp of the request
No binary data is produced by this operation.
Example output structure (simplified):
{
"minAmount": 100000,
"maxAmount": 1000000000,
"priceStep": 1000,
"otherRestrictions": { ... },
"debug": {
"operation": "getOrderBookRestrictions",
"endpoint": "/matcher/orderbook/{amountAsset}/{priceAsset}/info",
"amountAsset": "DCC",
"priceAsset": "WAVES",
"matcherBaseUrl": "https://mainnet-matcher.decentralchain.io",
"timestamp": "2024-06-01T12:00:00Z"
}
}
Dependencies
- Requires access to the DecentralChain Matcher API endpoint.
- Optionally uses credentials for the Matcher API to authenticate requests.
- Requires network connectivity to the specified Matcher Base URL.
- No additional external libraries are required beyond standard HTTP request capabilities provided by n8n.
Troubleshooting
- Invalid Asset IDs: If the
amountAssetorpriceAssetIDs are incorrect or not recognized by the matcher, the API may return errors or empty results. Verify asset IDs are correct. - Network Issues: Failure to connect to the Matcher Base URL will cause request failures. Check network connectivity and URL correctness.
- Authentication Errors: If using credentials, ensure the API token or key is valid and has sufficient permissions.
- Malformed JSON: Although this operation does not require raw JSON input, other matcher operations do. Providing invalid JSON in those cases causes errors.
- API Rate Limits: Excessive requests may be throttled by the Matcher API. Implement retries or backoff as needed.
Common error messages:
"Invalid JSON in Order JSON"— Not applicable here but relevant for raw JSON inputs in other matcher operations.- HTTP 404 or 400 errors indicating invalid endpoints or parameters.
- Network timeout or connection refused errors.