Overview
The DEX Trade Parser node processes Cardano blockchain data to extract and parse decentralized exchange (DEX) trading history related to a specified wallet address. It transforms raw DEX order data into a clean, structured trading history with detailed trade information such as timestamps, assets involved, amounts, prices, and transaction hashes.
This node is useful for users who want to analyze their Cardano DEX activity, track buy/sell/swap trades, or integrate trading data into workflows for reporting, portfolio tracking, or tax calculations.
Typical use cases include:
- Parsing recent DEX orders fetched from the blockchain or other nodes.
- Extracting the latest trade details from previously parsed trade data.
- Converting complex on-chain order and execution data into human-readable trade records.
Properties
| Name | Meaning |
|---|---|
| Network | The Cardano network to use. Options: Mainnet or Testnet. |
| Wallet Address | The Cardano wallet address to analyze. This is required and should be a valid address. |
Output
The node outputs JSON objects representing parsed DEX trades or error/status messages. Each successful trade output includes fields such as:
timestamp: ISO string of the trade time.direction: Trade direction (BUY,SELL,SWAP).assetName: Human-readable asset name (e.g., ADA).identifier: Asset identifier string.amountIn: Amount spent (formatted to 6 decimals).amountOut: Amount received (formatted to 6 decimals).price: Price ratio between assets (formatted to 6 decimals).txHash: Transaction hash of the trade.executionCount: Number of executions involved in the trade.platforms: Names of DEX platforms involved.executionHashes: Array of transaction hashes involved in the trade.- Additional optional notes or status fields depending on trade completeness.
If no trades are found or input data is invalid, the output contains descriptive error or info messages with success flags.
The node does not output binary data.
Dependencies
- Requires an API key credential for the Blockfrost API service to access Cardano blockchain data.
- Uses the Blockfrost SDK to query transactions, assets, and metadata.
- Must be configured with the correct network (
mainnetortestnet) matching the wallet address.
Troubleshooting
Common issues:
- Invalid or missing wallet address parameter will cause errors.
- Input data must contain an array of orders; otherwise, parsing fails.
- If connected nodes do not provide properly structured order data, the node will return an error message indicating invalid input format.
- API key misconfiguration or network mismatch can lead to failed blockchain queries.
Error messages:
"Wallet address not found. Please specify address parameter."— Ensure the wallet address property is set."Invalid input format. Expected order history with orders array."— Check that input data contains anordersarray or compatible structure."No valid trade data found in input."— When using the "Get Latest DEX Trade" operation without prior parsed trade data.- Node operation errors with messages like
"DEX trade parsing failed: <error>"indicate internal processing or API call failures.
Resolution tips:
- Verify wallet address correctness.
- Confirm upstream nodes provide expected data shape.
- Check Blockfrost API key validity and network selection.
- Use "Parse Trading History" before "Get Latest DEX Trade" to ensure proper input.
Links and References
- Blockfrost API Documentation
- Cardano DEX concepts and CIP-674 metadata standard (referenced internally for parsing)
- n8n documentation on custom nodes and credentials configuration
