# cancelByCloid

## POST /exchange

> Cancel order(s) by cloid.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - exchange/cancelByCloid","version":"1.0.0"},"tags":[{"name":"cancelByCloid"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/exchange":{"post":{"tags":["cancelByCloid"],"description":"Cancel order(s) by cloid.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"object","properties":{"type":{"description":"Type of action.","enum":["cancelByCloid"]},"cancels":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"integer","minimum":0,"description":"Asset ID."},"cloid":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":34,"maxLength":34,"description":"Client Order ID."}},"required":["asset","cloid"]},"description":"Orders to cancel."}},"required":["type","cancels"],"description":"Action to perform."},"nonce":{"type":"integer","minimum":0,"description":"Nonce (timestamp in ms) used to prevent replay attacks."},"signature":{"type":"object","properties":{"r":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":66,"maxLength":66,"description":"First 32-byte component."},"s":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":66,"maxLength":66,"description":"Second 32-byte component."},"v":{"enum":[27,28],"description":"Recovery identifier."}},"required":["r","s","v"],"description":"ECDSA signature components."},"vaultAddress":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Vault address (for vault trading)."},"expiresAfter":{"type":"integer","minimum":0,"description":"Expiration time of the action."}},"required":["action","nonce","signature"],"description":"Cancel order(s) by cloid."}}},"required":true},"responses":{"200":{"description":"Response for order cancellation by cloid.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"Successful status.","enum":["ok"]},"response":{"type":"object","properties":{"type":{"description":"Type of response.","enum":["cancel"]},"data":{"type":"object","properties":{"statuses":{"type":"array","items":{"anyOf":[{"enum":["success"]},{"type":"object","properties":{"error":{"type":"string","description":"Error message."}},"required":["error"]}]},"description":"Array of statuses or error messages."}},"required":["statuses"],"description":"Specific data."}},"required":["type","data"],"description":"Response details."}},"required":["status","response"],"description":"Response for order cancellation by cloid."}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```
