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#
| Field | Type | Description |
|---|---|---|
type | string | Always "cancel" |
cancels | array | Array of cancel requests |
Cancel Object Fields#
| Field | Type | Description |
|---|---|---|
a | number | Asset index of the order to cancel |
o | number | Order ID (oid) to cancel |
Optional Fields#
| Field | Type | Description |
|---|---|---|
vaultAddress | string | Vault 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.
Related Action Types#
- order - Submit new orders
- cancelByCloid - Cancel by client order ID
- scheduleCancel - Schedule future cancellation