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 Books" operation. It retrieves open trading markets (order books) from the DCC matcher service, which is a decentralized exchange component that manages asset trading pairs and their order books.
Common scenarios where this node is beneficial include:
- Fetching all available trading markets to display or analyze liquidity and trading options.
- Integrating real-time market data into trading bots or portfolio management tools.
- Monitoring active markets for price discovery or arbitrage opportunities.
Practical example:
- A user wants to list all currently open trading pairs on the DCC matcher to decide which assets to trade or monitor. This node fetches that list directly from the matcher API.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL of the DCC node API to use if no credential is supplied. |
| Matcher Base URL | The base URL for the Matcher API, used if no matcher credential is supplied. Defaults to the mainnet matcher endpoint. |
Output
The output JSON contains the response from the matcher API endpoint /matcher/orderbook, which lists all open trading markets (order books). The structure typically includes details about each trading pair such as asset IDs, current bids, asks, and other market metadata.
Additionally, the output includes a debug field with metadata about the request:
operation: The operation performed ("getOrderBooks").endpoint: The API endpoint called (/matcher/orderbook).matcherBaseUrl: The base URL used for the matcher API.timestamp: The time when the request was made.
Example output snippet (simplified):
{
"markets": [
{
"amountAsset": "assetId1",
"priceAsset": "assetId2",
"bids": [...],
"asks": [...],
...
},
...
],
"debug": {
"operation": "getOrderBooks",
"endpoint": "/matcher/orderbook",
"matcherBaseUrl": "https://mainnet-matcher.decentralchain.io",
"timestamp": "2024-06-01T12:00:00Z"
}
}
No binary data output is produced by this operation.
Dependencies
- Requires access to the DecentralChain Matcher API, either via a provided matcher credential or fallback to the configured matcher base URL.
- HTTP requests are made using n8n's built-in HTTP helper.
- No external libraries beyond those bundled with the node are required for this operation.
Troubleshooting
- Invalid or unreachable Matcher Base URL: Ensure the Matcher Base URL is correct and accessible from your environment.
- Authentication errors: If using credentials, verify that the API token or authentication method is valid and has permission to access matcher endpoints.
- Network issues: Timeouts or connection failures may occur if the matcher service is down or network connectivity is interrupted.
- Unexpected response format: If the matcher API changes, the node might fail to parse the response correctly. Check for updates or API changes.
- Error message "Invalid JSON in Order JSON": This error is not relevant for "Get Order Books" but may appear in other matcher operations involving raw JSON input.
To resolve common errors:
- Double-check URLs and credentials.
- Test the matcher API endpoint independently (e.g., via curl or Postman).
- Enable "Continue On Fail" in the node settings to handle errors gracefully during workflow execution.
Links and References
- DecentralChain Matcher API Documentation
- DecentralChain Official Website
- n8n HTTP Request Node Documentation (for understanding HTTP calls within n8n)
This summary focuses exclusively on the "Matcher" resource and the "Get Order Books" operation as requested.