DecentralChain (DCC)
Actions36
- Account Actions
- Matcher Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
The node interacts with the DecentralChain (DCC) blockchain ecosystem, specifically focusing on the Matcher resource's "Get Order Book" operation. This operation retrieves the current order book for a specified trading pair of assets from the DCC matcher service.
This node is beneficial in scenarios where users want to monitor market depth and liquidity for trading pairs on the DecentralChain decentralized exchange. For example, traders or automated trading bots can use this node to fetch bid and ask orders to make informed decisions about placing new orders or analyzing market trends.
Practical example:
- Fetching the full order book for the trading pair DCC/DCC or any other asset pair to analyze current buy and sell offers.
- Limiting the number of bids and asks returned to reduce data volume for quick snapshots of market depth.
Properties
| Name | Meaning |
|---|---|
| Base URL | Base URL to use for blockchain node API if no credential is supplied. |
| Matcher Base URL | Base URL for the Matcher API; used if no matcher credential is supplied. |
| Amount Asset | The asset ID or symbol (e.g., 'DCC') representing the amount side of the trading pair. |
| Price Asset | The asset ID or symbol (e.g., 'DCC') representing the price side of the trading pair. |
| Depth | Optional numeric limit for the number of bid/ask records to return; 0 means full order book. |
Output
The output JSON contains the order book data retrieved from the matcher API endpoint for the specified asset pair. It includes:
bids: Array of bid orders (buy orders), each with price and amount details.asks: Array of ask orders (sell orders), each with price and amount details.- Additional metadata fields as provided by the matcher API.
A debug object is also included containing:
- Operation name (
getOrderBook) - Endpoint path used
- Input parameters such as
amountAsset,priceAsset, anddepth - Matcher base URL used
- Timestamp of the request
No binary data output is produced by this operation.
Dependencies
- Requires access to the DecentralChain Matcher API endpoint, which may require an API key token for authorization (provided via credentials or directly).
- Uses HTTP requests to communicate with the matcher service.
- Optionally uses a base URL credential for the matcher API or falls back to a default URL.
- No additional external libraries are required beyond standard HTTP request helpers.
Troubleshooting
- Invalid JSON in Order JSON or Cancel JSON: If using raw JSON inputs for orders or cancellations, ensure the JSON is valid and correctly formatted. The node throws errors if parsing fails.
- Authorization Errors: If the matcher API requires authentication, ensure that the API token credential is properly configured and passed.
- Empty or Missing Order Book Data: Verify that the asset IDs are correct and that the matcher service supports the requested trading pair.
- Network Issues: Check connectivity to the matcher base URL and ensure no firewall or proxy blocks the requests.
- Depth Parameter Misuse: Setting depth to 0 returns the full order book, which might be large and slow. Use a positive integer to limit results for performance.
Links and References
- DecentralChain Matcher API Documentation (hypothetical link, replace with actual if available)
- DecentralChain Official Website
- n8n Documentation - Creating Custom Nodes