We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dd972e commit f3f08afCopy full SHA for f3f08af
forge/src/dispatcher.rs
@@ -208,10 +208,13 @@ impl OperationDispatcher {
208
match order {
209
Some(order) => {
210
let (status, amount) = match trade.limit_type {
211
- LimitType::GTC | LimitType::FOK if order.amount > trade.size => (
212
- OrderStatus::PartiallyMatched,
213
- Some(order.amount - trade.size),
214
- ),
+ LimitType::GTC | LimitType::MKT => {
+ if order.amount > trade.size {
+ (OrderStatus::PartiallyMatched, Some(order.amount - trade.size))
+ } else {
215
+ (OrderStatus::Matched, None)
216
+ }
217
218
// FOK or IOC as fully matched
219
_ => (OrderStatus::Matched, None),
220
};
0 commit comments