Exchange Orders
Access Prerequisites
- Permission (module):
viewExchangeOrdersJournal(to view the listing). Order cancellation requires theotcAdminmodule. - License/Feature:
EXCHANGE - Menu container: GENERAL → Operations group
What it is / when to use
Administrative ledger of exchange orders (order book) — all buy and sell orders placed by users in the P2P/OTC book. The operator checks order states (created, executed, cancelled), inspects the matches (matched items) of each order, and, with the otcAdmin profile, cancels orders still open (created).
Prerequisites
- Permission:
viewExchangeOrdersJournalto view;otcAdminto cancel (dual permission — CPM enum + dynamic module in the DB). - License/Feature:
EXCHANGEenabled (without it, the item does not appear in the menu at all). - Dependencies on other screens: orders are generated by users in the app/trade.
Step by step
- Go to the menu Operations → Exchange Orders.
- Filter by status (All, Created, Executed, Cancelled) and type (All, Buy, Sell). The search has a debounce (~1s).
- Click the receipt icon to view the items/matches of the order (when available).
- For an order in Created status, with
otcAdmin, click block to cancel.
Filters and columns
| Filter/Column | What it shows | Data source |
|---|---|---|
| Search | Book filter (debounce ~1s) | searchInput → getAllOrdersBookAdmin |
| Status | Created / Executed / Cancelled / All | selectedStatus (OrderBookStatus) |
| Type | Buy / Sell / All | selectedType (OrderBookType) |
| ID | Order identifier | id |
| Date | Order date/time | when |
| User | Who placed the order | userName |
| Type | Buy/Sell | type |
| Price | Order limit price | price (6 decimal places) |
| Currency | Traded unit | unitOfMoney |
| Status | Order state | status |
Actions and modals
- Cancel (block): only appears for orders in
CREATEDstatus and withotcAdminpermission. Opens a confirmation bottom-sheet →cancelOrderBookAdmin(id). Cancels the order in the OrderBookControlService and returns the reserve. - View items (receipt): opens the order matches modal (
items), showing which counterparties matched and at what prices.
Business rules / cautions
Caution
- Cancellation is only possible for open orders (
created); already-executed orders are immutable. - The displayed price is the limit price of the order, not necessarily the execution price of each match.
House revenue (limit × execution spread)
- At settlement, the amount paid to the seller uses the limit price (
order.price), never the execution price (executionPrice). When there is a difference between the limit and the execution, the house captures the delta as revenue. When auditing the numbers, do not be surprised by the difference: the seller receives at the limit price, and the spread is appropriated by the platform.
- Financial values: handled as BigNumber — no rounding; the price is displayed with 6 decimal places.
- Idempotency: order settlement is idempotent by
externalIdin FinLib;E00021"already processed" indicates settlement already completed — success.