Cancel Order
Cancel a working order.
Available to: All authenticated users
Environments: Demo, Live
Rate Limit: No endpoint-specific limit
Requests cancellation of a working order, identified by its orderId. As with other order commands, success isn’t guaranteed — the order may already have filled or been cancelled. When the request is rejected, the response carries a failureReason and failureText.
Common Failure Scenarios
- The order already filled or was cancelled (
TooLate). - Another command for the order is still being processed (
AnotherCommandPending).
Error Messages
See the failureReason enum in the response schema for the complete list of values.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Operator ID for the order. Send it only if NinjaTrader configured an allow-list of operator IDs for your user. In that case it’s required on every order and must exactly match one approved value. If no allow-list is configured, omit it: a supplied value is denied. Organizations using passthrough also omit it, and NinjaTrader fills it in. Up to 64 characters. See Operator ID (customTag50) and Passthrough.