Trades
The Trades module is mounted at /trades. It has three primary tabs:
| Tab | What it shows |
|---|---|
| Booked | Authoritative booked trades grid (REST + optional live merge from the client trades store). |
| Blotter | Blotter / event-style rows with P&L and lifecycle fields. |
| New trade | New trade ticket (NewTradeForm) posting through the trade booking API; on success, trades and blotter queries refresh. |
Booked trades grid
Section titled “Booked trades grid”The booked grid uses AG Grid with grouping/pivot panels and saved views (Saved views in the toolbar). Click a row to open the detail sheet. Right‑click a row for booking actions.
Columns (TradesModule / TradesGrid)
Section titled “Columns (TradesModule / TradesGrid)”Default columns include:
| Column | Notes |
|---|---|
| Trade ID | Pinned left. |
| Instrument | Resolved display from venue/symbol + family. |
| Inst ID | Internal instrument_id (hidden by default). |
| V.Symbol / Symbol | Optional venue/ticker columns (often hidden). |
| Family | instrument_family. |
| Kind | instrument_kind (may be hidden). |
| Dir | trade_direction. |
| Price, Qty | Numeric. |
| Notional | Hidden by default. |
| Buy Book / Sell Book | Booking destinations. |
| Buy Entity / Sell Entity | Legal entities. |
| Venue | Venue label. |
| Time | trade_time (formatted). |
| Status | e.g. BOOKED, CANCELLED, AMENDED (color-coded). |
| State | Derived “live / cancelled / merged” from status + booking state. |
| Regime | Often hidden. |
| Settle | Settlement date. |
| CCY | Settlement currency. |
Blotter tab
Section titled “Blotter tab”The blotter is a separate grid fed from useBlotterRest. Columns include Trade ID, Instrument, Inst ID (hidden), Book, Side, Qty, Price, Event, Settle, Real P&L, Unreal P&L, Time, with full pivot/sidebar tooling.
New trade tab
Section titled “New trade tab”The New trade form posts a book-trade request through the API. After a successful book, the module invalidates ["trades"] and ["blotter"] so both tabs stay in sync.
Trade detail sheet
Section titled “Trade detail sheet”Clicking a row in Booked opens a modal sheet (TradeDetailSheet):
- Header: trade id, status pill, direction badge, Close.
- Loads
useTradeDetail(trade_id)and merges the list row with the detail payload when it arrives. - Sections (Identity, Instrument, Execution, Books, Settlement, Fees) show fields such as external id, source, regime, price, qty, notional, books, entities, settlement date/currency/method, and fee amounts.
Context menu: clone and cancel
Section titled “Context menu: clone and cancel”Right‑click a booked trade:
- Clone trade… — opens Clone trade, pre-filled from the source trade; submitting books a new trade via the API (clone + refresh pattern).
- Cancel trade — disabled if already CANCELLED; otherwise confirms and calls cancel by trade id (mutation). Success/error surfaces as inline banners under the grid.