Skip to content

feat: add matchable_amount to admin API, pool filter, and assign-to-pool endpoint#1421

Open
akirillo wants to merge 4 commits intomainfrom
andrew/v2-internal-quoting
Open

feat: add matchable_amount to admin API, pool filter, and assign-to-pool endpoint#1421
akirillo wants to merge 4 commits intomainfrom
andrew/v2-internal-quoting

Conversation

@akirillo
Copy link
Copy Markdown
Contributor

Adds three relayer enhancements to support v2 internal quoting in the quoters:

  1. matchable_amount on ApiAdminOrder: Exposes min(order.amount_in, backing_balance) on all admin order endpoints and websocket messages, so quoters can check order fillability without independent balance queries.

  2. matching_pool query param filter: Fixes AdminGetOrdersHandler to respect the matching_pool query parameter that the SDK already sends, enabling admin_get_open_orders_in_matching_pool() to work correctly.

  3. POST /v2/relayer-admin/orders/:order_id/assign-pool: New admin endpoint that calls state.assign_order_to_matching_pool() to move orders between matching pools, enabling the quoters to trigger internal matches by assigning user orders into quoter pools.

…ool endpoint

- Add matchable_amount field to ApiAdminOrder (min of order amount_in and backing balance)
- Propagate matchable_amount through SystemBusMessage::AdminOrderUpdate and websocket
- Fix AdminGetOrdersHandler to filter by matching_pool query param
- Add POST /v2/relayer-admin/orders/:order_id/assign-pool endpoint
- Add AssignOrderToPoolRequest type and route constant
@claude
Copy link
Copy Markdown

claude bot commented Mar 28, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

matching_pool: String,
update_type: AdminOrderUpdateType,
matchable_amount: Amount,
) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if AdminOrderUpdateType is Cancelled and matchable_amount != 0, emit an error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, have matchable_amount be an Option<Amount>, for more precise semantics.

@claude
Copy link
Copy Markdown

claude bot commented Apr 2, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants