cancelByCloid
Cancel orders using the client-assigned order ID (cloid) instead of the exchange-assigned order ID. This is useful for trading systems that track orders by their own identifiers.
Sample Data#
{
"signature": {
"r": "0x2a0b6667955f197d530797576107b663fa08b20397286076f1684b3112738588",
"s": "0x91a7dee6fae7c212e7b3f3a6dfbec5c555ac13986c56ec39bdc361b1713b8fb",
"v": 28
},
"action": {
"type": "cancelByCloid",
"cancels": [
{
"asset": 159,
"cloid": "0x00000000000007550096147985161351"
},
{
"asset": 1,
"cloid": "0x00000000000007580071223980263264"
},
{
"asset": 5,
"cloid": "0x00000000000007580071644980263273"
}
]
},
"nonce": 1768146912996,
"vaultAddress": "0x621c5551678189b9a6c94d929924c225ff1d63ab"
}
View this transaction on Hypurrscan →
Field Reference#
Action Fields#
| Field | Type | Description |
|---|---|---|
type | string | Always "cancelByCloid" |
cancels | array | Array of cancel requests |
Cancel Object Fields#
| Field | Type | Description |
|---|---|---|
asset | number | Asset index of the order to cancel |
cloid | string | Client order ID (hex string) assigned when order was placed |
Optional Fields#
| Field | Type | Description |
|---|---|---|
vaultAddress | string | Vault address if cancelling vault orders |
expiresAfter | number | Timestamp after which the cancel request expires |
Client Order ID Format#
Client order IDs are 16-byte hex strings that you assign when placing orders. A common pattern encodes:
- Date/timestamp information
- Sequential counter
- System identifier
Example: 0x20260109000000000000000000150997
20260109- Date encoding (2026-01-09)150997- Sequence number
Use Cases#
Trading System Integration#
Use cloids to maintain order state without querying the exchange:
def process_cancelByCloid_action(action):
for cancel in action.get('cancels', []):
asset = cancel['asset']
cloid = cancel['cloid']
# Match against your order management system
order = order_tracker.get_by_cloid(cloid)
if order:
order.mark_cancelled()
Order Lifecycle Tracking#
Track orders from submission to cancellation using consistent identifiers across your systems.
Latency Analysis#
Compare timestamps between cancel request and block inclusion to measure execution latency.