feat: add matchable_amount to admin API, pool filter, and assign-to-pool endpoint#1421
Open
feat: add matchable_amount to admin API, pool filter, and assign-to-pool endpoint#1421
Conversation
…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 encountered an error —— View job I'll analyze this and get back to you. |
weijiekoh
approved these changes
Mar 30, 2026
| matching_pool: String, | ||
| update_type: AdminOrderUpdateType, | ||
| matchable_amount: Amount, | ||
| ) { |
Contributor
There was a problem hiding this comment.
Nit: if AdminOrderUpdateType is Cancelled and matchable_amount != 0, emit an error.
Contributor
There was a problem hiding this comment.
Or, have matchable_amount be an Option<Amount>, for more precise semantics.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three relayer enhancements to support v2 internal quoting in the quoters:
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.matching_pool query param filter: Fixes
AdminGetOrdersHandlerto respect thematching_poolquery parameter that the SDK already sends, enablingadmin_get_open_orders_in_matching_pool()to work correctly.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.