cURL
curl --request DELETE \ --url https://api.example.com/api/v1/trading/orders
{ "message": "<string>", "cancelled": 123, "total": 123, "total_refund": 123, "errors": [ {} ] }
Cancel all open orders
result = client.cancel_all_orders()
from polyhush import PolyhushClient client = PolyhushClient(api_key="your-api-key") result = client.cancel_all_orders() print(f"Cancelled: {result['cancelled']}/{result['total']} orders") print(f"Total refund: ${result['total_refund']:.2f}") if result.get('errors'): print(f"\n⚠️ Errors:") for error in result['errors']: print(f" - {error}")
{ "message": "Cancelled 5 orders", "cancelled": 5, "total": 5, "total_refund": 275.50, "errors": [] }
errors