← Code LabPython0/50 solved · 0%
Capstone · hard

50. Capstone: trade analytics summary

Combine parsing and aggregation into one report.

Write `summarize(rows)` that takes a list of dicts with `"pair"`, `"amount"` (string), `"fee"` (string), converts amount/fee to floats, and returns a dict `{pair: {"volume": total_amount, "fees": total_fee}}` grouped by pair.
Required in your answer: defaultdictfloat(row