Cancel Order
Terminate an existing order using the provided order ID and related parameters, such as block validity periods and transaction options.
Method Declaration
Python
async def cancel_order(
self,
wallet: Wallet,
order_id: OrderId,
good_til_block: int = None,
good_til_block_time: int = None,
tx_options: Optional[TxOptions] = None,
)Unification plan
- Check the
marketIdis really needed (used inTypeScript)
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
wallet | query | Wallet | true | The wallet to use for signing the transaction. |
order_id | query | OrderId | true | The ID of the order to cancel. |
good_til_block | query | i32 | false | The block number until which the order is valid. Defaults to None. |
good_til_block_time | query | i32 | false | The block time until which the order is valid. Defaults to None. |
tx_options | query | TxOptions | false | Options for transaction to support authenticators. |
Response
| Status | Meaning | Schema | |
|---|---|---|---|
200 | OK | TxHash | The transaction hash. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The order was not found. |
Examples: Rust | Guide - Cancel an order