Cancel account orders by ID batch, market or outcome asset
This commit is contained in:
@@ -143,6 +143,15 @@ pub(crate) fn apply(tx: &Transaction, books: &Books, command: Command) -> Result
|
||||
let qty = book::release(tx, order, &account, book::CancelReason::Cancelled)?;
|
||||
Ok(json!({"cancelled":qty}))
|
||||
}
|
||||
Command::CancelOrders { account, orders } => {
|
||||
crate::cancellation::by_id(tx, &account, &orders)
|
||||
}
|
||||
Command::CancelMarketOrders {
|
||||
account,
|
||||
market,
|
||||
outcome,
|
||||
} => crate::cancellation::in_scope(tx, &account, Some(&market), outcome.as_deref()),
|
||||
Command::CancelAll { account } => crate::cancellation::in_scope(tx, &account, None, None),
|
||||
Command::Open { market } => {
|
||||
phase(tx, &market, &["preopen"])?;
|
||||
// Run one auction. Using the earliest order's outcome as the quote unit
|
||||
|
||||
Reference in New Issue
Block a user