Skip to Content

Cancel Smart Order

This API allows you to cancel a pending smart order.

USE CASE

Cancel a smart order you no longer want. A cancelled order cannot be resumed, so pause it instead if you may need it later.

Details

  • Cancel a pending Smart Order. Once cancelled, the order cannot be resumed.
  • Send only the flowId of the smart order. You can find it in the Smart Order Book.
  • Cancellation is rejected if the order is already executed, already cancelled or was cancelled by the system.
  • The success message says the request was sent. Check the Smart Order Book for the final state.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Request Attributes

AttributeData TypeRequiredDescription
flowIdstringYesUnique identifier of the Smart Order to cancel

Validations & Error Handling

ScenarioError Message
Invalid flowid"The provided smart order ID is invalid."
Invalid request payload"The input details entered is invalid."
Internal error"Error in Unmarshal"
Order already executed"The cancellation attempt failed as the smart order was already executed."
Order already cancelled"The cancellation attempt failed as the smart order was already cancelled."
Order cancelled by system"The cancellation attempt failed as the smart order cancelled by system"
Invalid cancel request"Smart order cannot be cancel."

Response Attributes

AttributeData TypeDescription
codeintStatus code: 200 for success; negative values indicate errors.
messagestring"Request sent successfully to cancel smart order" or error description.
sstring"ok" for success, "error" for failure.
Last updated on