Skip to main content

cancel

Cancel one or more existing orders by their order ID (oid). This action removes orders from the order book before they can be filled.

Sample Data#

{
"signature": {
"r": "0xb7233b2b2b0cf0eb161f86319be9a86c197f860dbcbe4d4f189e5fa757137c89",
"s": "0x65e5d0ffd58b0bf7ed168a8d1a9b6f8df6050c7acf24db588fb62f9390e9a2c3",
"v": 27
},
"action": {
"type": "cancel",
"cancels": [
{
"a": 0,
"o": 291379970288
}
]
},
"nonce": 1768146913376
}

View this transaction on Hypurrscan →

Field Reference#

Action Fields#

FieldTypeDescription
typestringAlways "cancel"
cancelsarrayArray of cancel requests

Cancel Object Fields#

FieldTypeDescription
anumberAsset index of the order to cancel
onumberOrder ID (oid) to cancel

Optional Fields#

FieldTypeDescription
vaultAddressstringVault address if cancelling vault orders

Use Cases#

Order Management Systems#

Track cancellation activity to understand order lifecycle and fill rates:

def process_cancel_action(action):
for cancel in action.get('cancels', []):
asset = cancel['a']
order_id = cancel['o']

print(f"Order cancelled: asset={asset}, oid={order_id}")

Risk Management#

Monitor cancellation patterns to detect:

  • High cancellation rates (potential spoofing)
  • Emergency position exits
  • Market maker quote updates

Market Making Analytics#

Analyze the ratio of order placements to cancellations to understand market maker behavior and quote refresh rates.