Skip to content
Docs
Actions
Cancelling Orders

Canceling Orders

aori_cancelOrder

You can cancel orders using the aori_cancelOrder method. This method allows users to cancel an existing order from the orderbook. Once an order is cancelled, it's marked as inactive and a cancellation timestamp is added.

ParametersTypeRequiredDescription
orderHashstringYesUnique identifier of the order to be cancelled
apiKeystringYesAPI key (see Authentication)
{
  "id": <request_id>,
  "jsonrpc": "2.0",`
  "method": "aori_cancelOrder",
  "params": [{
    "orderHash": "<order_id>",
    "apiKey": "<api_key>"
  }]
}

Response

{
  "id": <request_id>,
  "result": "Ok"
}

Related Subscription Events

{
    "id": null,
    "result": {
        "type": "OrderCancelled",
        "data": <order> // See Limit Order object
    }
}

Notes:

  • The method first checks if the order exists in the database.
  • It then verifies if the signer attempting to cancel the order is the original offerer.
  • Once validated, the order is marked as inactive in the database and a cancellation timestamp is added.
  • A message is published to orderbook subscribers indicating the cancellation.