Skip to content

Batch Cancel Orders

Cancel a batch of short-terms orders.

Method Declaration

Python
async def batch_cancel_orders(
    self,
    wallet: Wallet,
    subaccount_id: SubaccountId,
    short_term_cancels: List[OrderBatch],
    good_til_block: int,
    tx_options: Optional[TxOptions] = None,
)
Unification plan
  • TxOptions is not available in Rust

Parameters

ParameterLocationTypeRequiredDescription
walletqueryWallettrueThe wallet to use for signing the transaction.
subaccount_idquerySubaccountIdtrueThe subaccount ID for which to cancel orders.
short_term_cancelsqueryOrderBatch ⛁trueList of OrderBatch objects containing the orders to cancel.
good_til_blockqueryHeighttrueThe last block the short term order cancellations can be executed at.
tx_optionsqueryTxOptionsfalseOptions for transaction to support authenticators.

Response

StatusMeaningSchema
200OKTxHash
400Bad RequestThe request was malformed or invalid.
404Not FoundThe subaccount was not found.

Examples: Python | TypeScript | Rust