curl -X POST "https://api.roxom.com/api/v1/orders/01234567-89ab-7def-8123-456789abcdea/cancel" \ -H "X-API-Key: your_api_key_here" \ -H "Content-Type: application/json"
{ "data": { "success": true } }
Cancel active trading orders
POST /api/v1/orders/{orderId}/cancel
Show Cancellation properties
POST /api/v1/orders/cancel-all
curl -X POST "https://api.roxom.com/api/v1/orders/cancel-all" \ -H "X-API-Key: your_api_key_here" \ -H "Content-Type: application/json"
{ "data": { "cancelledOrderIds": [ "01234567-89ab-7def-8123-456789abcdef", "98765432-10fe-dcba-9876-543210fedcba" ] }, "error": false }
Show Bulk cancellation properties
CANCELED
PENDING_CANCEL
Cannot Cancel
FILLED
PENDING
EXPIRED
Order Not Found
{ "error": { "code": 404, "message": "Order not found", "details": "Order 'order_invalid' does not exist" }, "timestamp": "2024-01-15T10:30:00Z", "requestId": "req_abc123" }
{ "error": { "code": 400, "message": "Cannot cancel order", "details": "Order is already filled" }, "timestamp": "2024-01-15T10:30:00Z", "requestId": "req_def456" }
def emergency_cancel_all(): """Emergency function to cancel all active orders.""" try: response = requests.post( 'https://api.roxom.com/api/v1/orders/cancel-all', headers=headers, timeout=5 ) if response.status_code == 200: result = response.json() print(f"Emergency cancel: {len(result['data']['cancelledOrderIds'])} orders canceled") return True else: print(f"Emergency cancel failed: {response.status_code}") return False except Exception as e: print(f"Emergency cancel error: {e}") return False
Order Management
Risk Management
Technical Considerations
Was this page helpful?