-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full Node Status taker order status protos #2003
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,3 +220,38 @@ message StreamOrderbookFill { | |
// Resulting fill amounts for each order in the orders array. | ||
repeated uint64 fill_amounts = 3; | ||
} | ||
|
||
// StreamTakerOrder provides information on a taker order that was attempted | ||
// to be matched on the orderbook. | ||
// It is intended to be used only in full node streaming. | ||
message StreamTakerOrder { | ||
// The taker order that was matched on the orderbook. Can be a | ||
// regular order or a liquidation order. | ||
oneof taker_order { | ||
Order order = 1; | ||
StreamLiquidationOrder liquidation_order = 2; | ||
} | ||
|
||
// Information on the taker order after it is matched on the book, | ||
// either successfully or unsuccessfully. | ||
StreamTakerOrderStatus taker_order_status = 3; | ||
} | ||
|
||
// StreamTakerOrderStatus is a representation of a taker order | ||
// after it is attempted to be matched on the orderbook. | ||
// It is intended to be used only in full node streaming. | ||
message StreamTakerOrderStatus { | ||
// The state of the taker order after attempting to match it against the orderbook. | ||
// Possible enum values can be found here: | ||
// https://github.com/dydxprotocol/v4-chain/blob/main/protocol/x/clob/types/orderbook.go#L105 | ||
uint32 order_status = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what are the possible values of order_status? Link to codebase? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's not link main since that is subject to change. link to some release or some commit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also just to make sure - PO is the only thing missing from these enum values? status captures all possible results and we don't need the |
||
|
||
// The amount of remaining (non-matched) base quantums of this taker order. | ||
uint64 remaining_quantums = 2; | ||
Comment on lines
+249
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for my understanding - this is the quantums remaining after optimisitic fills? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, after the matching loop, remaining quantums |
||
|
||
// The amount of base quantums that were *optimistically* filled for this taker order | ||
// when the order is matched against the orderbook. Note that if any quantums of this order | ||
// were optimistically filled or filled in state before this invocation of the matching loop, | ||
// this value will not include them. | ||
uint64 optimistically_filled_quantums = 3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use
Side
similar toOrder
for consistency?no strong preference though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think it would be a little weird since we nest
Side
in the Order proto currently, and if we change it to Side for liquidation order we would have to nest it in the Liquidation order proto. I'll keep it as is for minimal changes.