Skip to content

Trades

The Trades module is mounted at /trades. It has three primary tabs:

TabWhat it shows
BookedAuthoritative booked trades grid (REST + optional live merge from the client trades store).
BlotterBlotter / event-style rows with P&L and lifecycle fields.
New tradeNew trade ticket (NewTradeForm) posting through the trade booking API; on success, trades and blotter queries refresh.

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.

Default columns include:

ColumnNotes
Trade IDPinned left.
InstrumentResolved display from venue/symbol + family.
Inst IDInternal instrument_id (hidden by default).
V.Symbol / SymbolOptional venue/ticker columns (often hidden).
Familyinstrument_family.
Kindinstrument_kind (may be hidden).
Dirtrade_direction.
Price, QtyNumeric.
NotionalHidden by default.
Buy Book / Sell BookBooking destinations.
Buy Entity / Sell EntityLegal entities.
VenueVenue label.
Timetrade_time (formatted).
Statuse.g. BOOKED, CANCELLED, AMENDED (color-coded).
StateDerived “live / cancelled / merged” from status + booking state.
RegimeOften hidden.
SettleSettlement date.
CCYSettlement currency.

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.


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.


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.

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.