CrowdTrendz DEX - Trade Prettify icon

CrowdTrendz DEX - Trade Prettify

Format and prettify DEX trade data for better readability

Prettify Trade Data

AI-generated

Summary

Formats submitted DEX trade data into a compact output with amounts, token pair, slippage tolerance, average price, and buy/sell status. It requires a valid estimate with the first path entry and nonzero input and output amounts.

Inputs

  • Input item JSON (required) — Each item must have status set to "submitted" and an estimate object containing paths[0][0], amount_in, and amount_out. The first path entry supplies token_in, token_out, and amount_in; estimate may also supply min_amount_out and avg_price_impact. An optional swap.slippageTolerance supplies the slippage value. Optional transactionId, sender, and timestamp values can be included in the output.
  • Price Precision — Decimal places used to round avg_price; defaults to 6 (allowed range 0–12).
  • Include Transaction ID — When enabled (default), includes transactionid if the input has transactionId.
  • Include Sender — When enabled (default), includes sender if present in the input.
  • Include Timestamp — When enabled (default), includes timestamp if present in the input.

Output shape

One output item per successfully processed input item.

Each output contains estimate_amount_in, estimate_amount_out, estimate_min_amount_out, estimate_avg_price_impact, swap_from, swap_to, swap_amount, swap_slippagetolerance, avg_price, and is_buying, plus enabled optional fields when present. is_buying is true when token_in is "lovelace"; avg_price uses amount_in / amount_out for buys and amount_out / amount_in otherwise. Missing optional estimate values and slippage default to 0. Invalid status, missing estimate or path data, and zero amounts cause an item error; with Continue On Fail enabled, errors are returned as items containing error, item_index, and a timestamp.

Links

Discussion